mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-30 04:29:21 +03:00
Improved AbstractScreen properties
Improved settings screens Views: * sDefaultScope & sCurrentScope to sub-class keyScope * drop viewModelVisible * rename viewModelTemplateID to templateID * rename viewModelPosition to viewType
This commit is contained in:
parent
11f69ef9e4
commit
8be4c384bb
27 changed files with 136 additions and 196 deletions
|
|
@ -2,23 +2,9 @@ import { isArray, arrayLength } from 'Common/Utils';
|
|||
|
||||
export class AbstractScreen {
|
||||
constructor(screenName, viewModels = []) {
|
||||
this.oCross = null;
|
||||
this.sScreenName = screenName;
|
||||
this.aViewModels = isArray(viewModels) ? viewModels : [];
|
||||
}
|
||||
|
||||
/**
|
||||
* @returns {Array}
|
||||
*/
|
||||
get viewModels() {
|
||||
return this.aViewModels;
|
||||
}
|
||||
|
||||
/**
|
||||
* @returns {string}
|
||||
*/
|
||||
screenName() {
|
||||
return this.sScreenName;
|
||||
this.__cross = null;
|
||||
this.screenName = screenName;
|
||||
this.viewModels = isArray(viewModels) ? viewModels : [];
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -28,12 +14,13 @@ export class AbstractScreen {
|
|||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @returns {?Object}
|
||||
*/
|
||||
get __cross() {
|
||||
return this.oCross;
|
||||
}
|
||||
/*
|
||||
onBuild(viewModelDom) {}
|
||||
onShow() {}
|
||||
onHide() {}
|
||||
__started
|
||||
__builded
|
||||
*/
|
||||
|
||||
/**
|
||||
* @returns {void}
|
||||
|
|
@ -48,7 +35,7 @@ export class AbstractScreen {
|
|||
|
||||
routes.forEach(item => item && route && (route.addRoute(item[0], fMatcher).rules = item[1]));
|
||||
|
||||
this.oCross = route;
|
||||
this.__cross = route;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue