mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-13 03:27:39 +03:00
Special __constructor_end hook to extend js constructors.
This commit is contained in:
parent
f7106f375c
commit
f562d80985
29 changed files with 161 additions and 20 deletions
|
|
@ -1116,14 +1116,20 @@ Utils.removeBlockquoteSwitcher = function (oMessageTextBody)
|
||||||
/**
|
/**
|
||||||
* @param {string} sName
|
* @param {string} sName
|
||||||
* @param {Function} ViewModelClass
|
* @param {Function} ViewModelClass
|
||||||
|
* @param {Function=} AbstractViewModel = KnoinAbstractViewModel
|
||||||
*/
|
*/
|
||||||
Utils.extendAsViewModel = function (sName, ViewModelClass)
|
Utils.extendAsViewModel = function (sName, ViewModelClass, AbstractViewModel)
|
||||||
{
|
{
|
||||||
if (ViewModelClass)
|
if (ViewModelClass)
|
||||||
{
|
{
|
||||||
|
if (!AbstractViewModel)
|
||||||
|
{
|
||||||
|
AbstractViewModel = KnoinAbstractViewModel;
|
||||||
|
}
|
||||||
|
|
||||||
ViewModelClass.__name = sName;
|
ViewModelClass.__name = sName;
|
||||||
Plugins.regViewModelHook(sName, ViewModelClass);
|
Plugins.regViewModelHook(sName, ViewModelClass);
|
||||||
_.extend(ViewModelClass.prototype, KnoinAbstractViewModel.prototype);
|
_.extend(ViewModelClass.prototype, AbstractViewModel.prototype);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,17 @@ function Knoin()
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param {Object} thisObject
|
||||||
|
*/
|
||||||
|
Knoin.constructorEnd = function (thisObject)
|
||||||
|
{
|
||||||
|
if (Utils.isFunc(thisObject['__constructor_end']))
|
||||||
|
{
|
||||||
|
thisObject['__constructor_end'].call(thisObject);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
Knoin.prototype.sDefaultScreenName = '';
|
Knoin.prototype.sDefaultScreenName = '';
|
||||||
Knoin.prototype.oScreens = {};
|
Knoin.prototype.oScreens = {};
|
||||||
Knoin.prototype.oBoot = null;
|
Knoin.prototype.oBoot = null;
|
||||||
|
|
|
||||||
|
|
@ -66,6 +66,8 @@ function AdminLoginViewModel()
|
||||||
}, function () {
|
}, function () {
|
||||||
return !this.submitRequest();
|
return !this.submitRequest();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Knoin.constructorEnd(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
Utils.extendAsViewModel('AdminLoginViewModel', AdminLoginViewModel);
|
Utils.extendAsViewModel('AdminLoginViewModel', AdminLoginViewModel);
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,8 @@ function AdminMenuViewModel(oScreen)
|
||||||
KnoinAbstractViewModel.call(this, 'Left', 'AdminMenu');
|
KnoinAbstractViewModel.call(this, 'Left', 'AdminMenu');
|
||||||
|
|
||||||
this.menu = oScreen.menu;
|
this.menu = oScreen.menu;
|
||||||
|
|
||||||
|
Knoin.constructorEnd(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
Utils.extendAsViewModel('AdminMenuViewModel', AdminMenuViewModel);
|
Utils.extendAsViewModel('AdminMenuViewModel', AdminMenuViewModel);
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,8 @@ function AdminPaneViewModel()
|
||||||
|
|
||||||
this.adminDomain = ko.observable(RL.settingsGet('AdminDomain'));
|
this.adminDomain = ko.observable(RL.settingsGet('AdminDomain'));
|
||||||
this.version = ko.observable(RL.settingsGet('Version'));
|
this.version = ko.observable(RL.settingsGet('Version'));
|
||||||
|
|
||||||
|
Knoin.constructorEnd(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
Utils.extendAsViewModel('AdminPaneViewModel', AdminPaneViewModel);
|
Utils.extendAsViewModel('AdminPaneViewModel', AdminPaneViewModel);
|
||||||
|
|
|
||||||
|
|
@ -156,6 +156,8 @@ function LoginViewModel()
|
||||||
|
|
||||||
return bF || bG || bT;
|
return bF || bG || bT;
|
||||||
}, this);
|
}, this);
|
||||||
|
|
||||||
|
Knoin.constructorEnd(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
Utils.extendAsViewModel('LoginViewModel', LoginViewModel);
|
Utils.extendAsViewModel('LoginViewModel', LoginViewModel);
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,8 @@ function MailBoxFolderListViewModel()
|
||||||
this.iDropOverTimer = 0;
|
this.iDropOverTimer = 0;
|
||||||
|
|
||||||
this.allowContacts = !!RL.settingsGet('ContactsIsAllowed');
|
this.allowContacts = !!RL.settingsGet('ContactsIsAllowed');
|
||||||
|
|
||||||
|
Knoin.constructorEnd(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
Utils.extendAsViewModel('MailBoxFolderListViewModel', MailBoxFolderListViewModel);
|
Utils.extendAsViewModel('MailBoxFolderListViewModel', MailBoxFolderListViewModel);
|
||||||
|
|
|
||||||
|
|
@ -177,6 +177,8 @@ function MailBoxMessageListViewModel()
|
||||||
this.deleteCommand();
|
this.deleteCommand();
|
||||||
}
|
}
|
||||||
}, this));
|
}, this));
|
||||||
|
|
||||||
|
Knoin.constructorEnd(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
Utils.extendAsViewModel('MailBoxMessageListViewModel', MailBoxMessageListViewModel);
|
Utils.extendAsViewModel('MailBoxMessageListViewModel', MailBoxMessageListViewModel);
|
||||||
|
|
|
||||||
|
|
@ -141,6 +141,8 @@ function MailBoxMessageViewViewModel()
|
||||||
this.messageActiveDom.subscribe(function () {
|
this.messageActiveDom.subscribe(function () {
|
||||||
this.scrollMessageToTop();
|
this.scrollMessageToTop();
|
||||||
}, this);
|
}, this);
|
||||||
|
|
||||||
|
Knoin.constructorEnd(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
Utils.extendAsViewModel('MailBoxMessageViewViewModel', MailBoxMessageViewViewModel);
|
Utils.extendAsViewModel('MailBoxMessageViewViewModel', MailBoxMessageViewViewModel);
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,7 @@
|
||||||
function MailBoxSystemDropDownViewModel()
|
function MailBoxSystemDropDownViewModel()
|
||||||
{
|
{
|
||||||
AbstractSystemDropDownViewModel.call(this);
|
AbstractSystemDropDownViewModel.call(this);
|
||||||
|
Knoin.constructorEnd(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
_.extend(MailBoxSystemDropDownViewModel.prototype, AbstractSystemDropDownViewModel.prototype);
|
Utils.extendAsViewModel('MailBoxSystemDropDownViewModel', MailBoxSystemDropDownViewModel, AbstractSystemDropDownViewModel);
|
||||||
|
|
|
||||||
|
|
@ -82,6 +82,8 @@ function PopupsActivateViewModel()
|
||||||
}, function () {
|
}, function () {
|
||||||
return !this.activateProcess() && '' !== this.domain() && '' !== this.key() && !this.activationSuccessed();
|
return !this.activateProcess() && '' !== this.domain() && '' !== this.key() && !this.activationSuccessed();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Knoin.constructorEnd(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
Utils.extendAsViewModel('PopupsActivateViewModel', PopupsActivateViewModel);
|
Utils.extendAsViewModel('PopupsActivateViewModel', PopupsActivateViewModel);
|
||||||
|
|
|
||||||
|
|
@ -82,6 +82,8 @@ function PopupsAddAccountViewModel()
|
||||||
this.login(this.email());
|
this.login(this.email());
|
||||||
}
|
}
|
||||||
}, this);
|
}, this);
|
||||||
|
|
||||||
|
Knoin.constructorEnd(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
Utils.extendAsViewModel('PopupsAddAccountViewModel', PopupsAddAccountViewModel);
|
Utils.extendAsViewModel('PopupsAddAccountViewModel', PopupsAddAccountViewModel);
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,8 @@ function PopupsAdvancedSearchViewModel()
|
||||||
|
|
||||||
this.cancelCommand();
|
this.cancelCommand();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Knoin.constructorEnd(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
Utils.extendAsViewModel('PopupsAdvancedSearchViewModel', PopupsAdvancedSearchViewModel);
|
Utils.extendAsViewModel('PopupsAdvancedSearchViewModel', PopupsAdvancedSearchViewModel);
|
||||||
|
|
|
||||||
|
|
@ -397,6 +397,8 @@ function PopupsComposeViewModel()
|
||||||
});
|
});
|
||||||
|
|
||||||
// this.driveCallback = _.bind(this.driveCallback, this);
|
// this.driveCallback = _.bind(this.driveCallback, this);
|
||||||
|
|
||||||
|
Knoin.constructorEnd(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
Utils.extendAsViewModel('PopupsComposeViewModel', PopupsComposeViewModel);
|
Utils.extendAsViewModel('PopupsComposeViewModel', PopupsComposeViewModel);
|
||||||
|
|
|
||||||
|
|
@ -236,6 +236,8 @@ function PopupsContactsViewModel()
|
||||||
});
|
});
|
||||||
|
|
||||||
this.bDropPageAfterDelete = false;
|
this.bDropPageAfterDelete = false;
|
||||||
|
|
||||||
|
Knoin.constructorEnd(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
Utils.extendAsViewModel('PopupsContactsViewModel', PopupsContactsViewModel);
|
Utils.extendAsViewModel('PopupsContactsViewModel', PopupsContactsViewModel);
|
||||||
|
|
|
||||||
|
|
@ -109,6 +109,8 @@ function PopupsDomainViewModel()
|
||||||
this.whiteListCommand = Utils.createCommand(this, function () {
|
this.whiteListCommand = Utils.createCommand(this, function () {
|
||||||
this.whiteListPage(!this.whiteListPage());
|
this.whiteListPage(!this.whiteListPage());
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Knoin.constructorEnd(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
Utils.extendAsViewModel('PopupsDomainViewModel', PopupsDomainViewModel);
|
Utils.extendAsViewModel('PopupsDomainViewModel', PopupsDomainViewModel);
|
||||||
|
|
|
||||||
|
|
@ -75,6 +75,8 @@ function PopupsFolderClearViewModel()
|
||||||
return !bIsClearing && null !== oFolder;
|
return !bIsClearing && null !== oFolder;
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Knoin.constructorEnd(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
Utils.extendAsViewModel('PopupsFolderClearViewModel', PopupsFolderClearViewModel);
|
Utils.extendAsViewModel('PopupsFolderClearViewModel', PopupsFolderClearViewModel);
|
||||||
|
|
|
||||||
|
|
@ -80,6 +80,8 @@ function PopupsFolderCreateViewModel()
|
||||||
});
|
});
|
||||||
|
|
||||||
this.defautOptionsAfterRender = Utils.defautOptionsAfterRender;
|
this.defautOptionsAfterRender = Utils.defautOptionsAfterRender;
|
||||||
|
|
||||||
|
Knoin.constructorEnd(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
Utils.extendAsViewModel('PopupsFolderCreateViewModel', PopupsFolderCreateViewModel);
|
Utils.extendAsViewModel('PopupsFolderCreateViewModel', PopupsFolderCreateViewModel);
|
||||||
|
|
|
||||||
|
|
@ -66,6 +66,8 @@ function PopupsFolderSystemViewModel()
|
||||||
this.trashFolder.subscribe(fCallback);
|
this.trashFolder.subscribe(fCallback);
|
||||||
|
|
||||||
this.defautOptionsAfterRender = Utils.defautOptionsAfterRender;
|
this.defautOptionsAfterRender = Utils.defautOptionsAfterRender;
|
||||||
|
|
||||||
|
Knoin.constructorEnd(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
Utils.extendAsViewModel('PopupsFolderSystemViewModel', PopupsFolderSystemViewModel);
|
Utils.extendAsViewModel('PopupsFolderSystemViewModel', PopupsFolderSystemViewModel);
|
||||||
|
|
|
||||||
|
|
@ -94,6 +94,8 @@ function PopupsIdentityViewModel()
|
||||||
this.button = ko.computed(function () {
|
this.button = ko.computed(function () {
|
||||||
return Utils.i18n('POPUPS_IDENTITIES/' + (this.edit() ? 'BUTTON_UPDATE_IDENTITY': 'BUTTON_ADD_IDENTITY'));
|
return Utils.i18n('POPUPS_IDENTITIES/' + (this.edit() ? 'BUTTON_UPDATE_IDENTITY': 'BUTTON_ADD_IDENTITY'));
|
||||||
}, this);
|
}, this);
|
||||||
|
|
||||||
|
Knoin.constructorEnd(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
Utils.extendAsViewModel('PopupsIdentityViewModel', PopupsIdentityViewModel);
|
Utils.extendAsViewModel('PopupsIdentityViewModel', PopupsIdentityViewModel);
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,8 @@ function PopupsLanguagesViewModel()
|
||||||
RL.data().mainLanguage.subscribe(function () {
|
RL.data().mainLanguage.subscribe(function () {
|
||||||
this.resetMainLanguage();
|
this.resetMainLanguage();
|
||||||
}, this);
|
}, this);
|
||||||
|
|
||||||
|
Knoin.constructorEnd(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
Utils.extendAsViewModel('PopupsLanguagesViewModel', PopupsLanguagesViewModel);
|
Utils.extendAsViewModel('PopupsLanguagesViewModel', PopupsLanguagesViewModel);
|
||||||
|
|
|
||||||
|
|
@ -58,6 +58,8 @@ function PopupsPluginViewModel()
|
||||||
RL.remote().pluginSettingsUpdate(this.onPluginSettingsUpdateResponse, oList);
|
RL.remote().pluginSettingsUpdate(this.onPluginSettingsUpdateResponse, oList);
|
||||||
|
|
||||||
}, this.hasConfiguration);
|
}, this.hasConfiguration);
|
||||||
|
|
||||||
|
Knoin.constructorEnd(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
Utils.extendAsViewModel('PopupsPluginViewModel', PopupsPluginViewModel);
|
Utils.extendAsViewModel('PopupsPluginViewModel', PopupsPluginViewModel);
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,8 @@ function SettingsMenuViewModel(oScreen)
|
||||||
KnoinAbstractViewModel.call(this, 'Left', 'SettingsMenu');
|
KnoinAbstractViewModel.call(this, 'Left', 'SettingsMenu');
|
||||||
|
|
||||||
this.menu = oScreen.menu;
|
this.menu = oScreen.menu;
|
||||||
|
|
||||||
|
Knoin.constructorEnd(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
Utils.extendAsViewModel('SettingsMenuViewModel', SettingsMenuViewModel);
|
Utils.extendAsViewModel('SettingsMenuViewModel', SettingsMenuViewModel);
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,8 @@
|
||||||
function SettingsPaneViewModel()
|
function SettingsPaneViewModel()
|
||||||
{
|
{
|
||||||
KnoinAbstractViewModel.call(this, 'Right', 'SettingsPane');
|
KnoinAbstractViewModel.call(this, 'Right', 'SettingsPane');
|
||||||
|
|
||||||
|
Knoin.constructorEnd(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
Utils.extendAsViewModel('SettingsPaneViewModel', SettingsPaneViewModel);
|
Utils.extendAsViewModel('SettingsPaneViewModel', SettingsPaneViewModel);
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,7 @@
|
||||||
function SettingsSystemDropDownViewModel()
|
function SettingsSystemDropDownViewModel()
|
||||||
{
|
{
|
||||||
AbstractSystemDropDownViewModel.call(this);
|
AbstractSystemDropDownViewModel.call(this);
|
||||||
|
Knoin.constructorEnd(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
_.extend(SettingsSystemDropDownViewModel.prototype, AbstractSystemDropDownViewModel.prototype);
|
Utils.extendAsViewModel('SettingsSystemDropDownViewModel', SettingsSystemDropDownViewModel, AbstractSystemDropDownViewModel);
|
||||||
|
|
|
||||||
|
|
@ -1703,14 +1703,20 @@ Utils.removeBlockquoteSwitcher = function (oMessageTextBody)
|
||||||
/**
|
/**
|
||||||
* @param {string} sName
|
* @param {string} sName
|
||||||
* @param {Function} ViewModelClass
|
* @param {Function} ViewModelClass
|
||||||
|
* @param {Function=} AbstractViewModel = KnoinAbstractViewModel
|
||||||
*/
|
*/
|
||||||
Utils.extendAsViewModel = function (sName, ViewModelClass)
|
Utils.extendAsViewModel = function (sName, ViewModelClass, AbstractViewModel)
|
||||||
{
|
{
|
||||||
if (ViewModelClass)
|
if (ViewModelClass)
|
||||||
{
|
{
|
||||||
|
if (!AbstractViewModel)
|
||||||
|
{
|
||||||
|
AbstractViewModel = KnoinAbstractViewModel;
|
||||||
|
}
|
||||||
|
|
||||||
ViewModelClass.__name = sName;
|
ViewModelClass.__name = sName;
|
||||||
Plugins.regViewModelHook(sName, ViewModelClass);
|
Plugins.regViewModelHook(sName, ViewModelClass);
|
||||||
_.extend(ViewModelClass.prototype, KnoinAbstractViewModel.prototype);
|
_.extend(ViewModelClass.prototype, AbstractViewModel.prototype);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -3613,6 +3619,17 @@ function Knoin()
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param {Object} thisObject
|
||||||
|
*/
|
||||||
|
Knoin.constructorEnd = function (thisObject)
|
||||||
|
{
|
||||||
|
if (Utils.isFunc(thisObject['__constructor_end']))
|
||||||
|
{
|
||||||
|
thisObject['__constructor_end'].call(thisObject);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
Knoin.prototype.sDefaultScreenName = '';
|
Knoin.prototype.sDefaultScreenName = '';
|
||||||
Knoin.prototype.oScreens = {};
|
Knoin.prototype.oScreens = {};
|
||||||
Knoin.prototype.oBoot = null;
|
Knoin.prototype.oBoot = null;
|
||||||
|
|
@ -4501,6 +4518,8 @@ function PopupsDomainViewModel()
|
||||||
this.whiteListCommand = Utils.createCommand(this, function () {
|
this.whiteListCommand = Utils.createCommand(this, function () {
|
||||||
this.whiteListPage(!this.whiteListPage());
|
this.whiteListPage(!this.whiteListPage());
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Knoin.constructorEnd(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
Utils.extendAsViewModel('PopupsDomainViewModel', PopupsDomainViewModel);
|
Utils.extendAsViewModel('PopupsDomainViewModel', PopupsDomainViewModel);
|
||||||
|
|
@ -4654,6 +4673,8 @@ function PopupsPluginViewModel()
|
||||||
RL.remote().pluginSettingsUpdate(this.onPluginSettingsUpdateResponse, oList);
|
RL.remote().pluginSettingsUpdate(this.onPluginSettingsUpdateResponse, oList);
|
||||||
|
|
||||||
}, this.hasConfiguration);
|
}, this.hasConfiguration);
|
||||||
|
|
||||||
|
Knoin.constructorEnd(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
Utils.extendAsViewModel('PopupsPluginViewModel', PopupsPluginViewModel);
|
Utils.extendAsViewModel('PopupsPluginViewModel', PopupsPluginViewModel);
|
||||||
|
|
@ -4788,6 +4809,8 @@ function PopupsActivateViewModel()
|
||||||
}, function () {
|
}, function () {
|
||||||
return !this.activateProcess() && '' !== this.domain() && '' !== this.key() && !this.activationSuccessed();
|
return !this.activateProcess() && '' !== this.domain() && '' !== this.key() && !this.activationSuccessed();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Knoin.constructorEnd(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
Utils.extendAsViewModel('PopupsActivateViewModel', PopupsActivateViewModel);
|
Utils.extendAsViewModel('PopupsActivateViewModel', PopupsActivateViewModel);
|
||||||
|
|
@ -4837,6 +4860,8 @@ function PopupsLanguagesViewModel()
|
||||||
RL.data().mainLanguage.subscribe(function () {
|
RL.data().mainLanguage.subscribe(function () {
|
||||||
this.resetMainLanguage();
|
this.resetMainLanguage();
|
||||||
}, this);
|
}, this);
|
||||||
|
|
||||||
|
Knoin.constructorEnd(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
Utils.extendAsViewModel('PopupsLanguagesViewModel', PopupsLanguagesViewModel);
|
Utils.extendAsViewModel('PopupsLanguagesViewModel', PopupsLanguagesViewModel);
|
||||||
|
|
@ -4938,6 +4963,8 @@ function AdminLoginViewModel()
|
||||||
}, function () {
|
}, function () {
|
||||||
return !this.submitRequest();
|
return !this.submitRequest();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Knoin.constructorEnd(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
Utils.extendAsViewModel('AdminLoginViewModel', AdminLoginViewModel);
|
Utils.extendAsViewModel('AdminLoginViewModel', AdminLoginViewModel);
|
||||||
|
|
@ -4968,6 +4995,8 @@ function AdminMenuViewModel(oScreen)
|
||||||
KnoinAbstractViewModel.call(this, 'Left', 'AdminMenu');
|
KnoinAbstractViewModel.call(this, 'Left', 'AdminMenu');
|
||||||
|
|
||||||
this.menu = oScreen.menu;
|
this.menu = oScreen.menu;
|
||||||
|
|
||||||
|
Knoin.constructorEnd(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
Utils.extendAsViewModel('AdminMenuViewModel', AdminMenuViewModel);
|
Utils.extendAsViewModel('AdminMenuViewModel', AdminMenuViewModel);
|
||||||
|
|
@ -4987,6 +5016,8 @@ function AdminPaneViewModel()
|
||||||
|
|
||||||
this.adminDomain = ko.observable(RL.settingsGet('AdminDomain'));
|
this.adminDomain = ko.observable(RL.settingsGet('AdminDomain'));
|
||||||
this.version = ko.observable(RL.settingsGet('Version'));
|
this.version = ko.observable(RL.settingsGet('Version'));
|
||||||
|
|
||||||
|
Knoin.constructorEnd(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
Utils.extendAsViewModel('AdminPaneViewModel', AdminPaneViewModel);
|
Utils.extendAsViewModel('AdminPaneViewModel', AdminPaneViewModel);
|
||||||
|
|
|
||||||
6
rainloop/v/0.0.0/static/js/admin.min.js
vendored
6
rainloop/v/0.0.0/static/js/admin.min.js
vendored
File diff suppressed because one or more lines are too long
|
|
@ -1703,14 +1703,20 @@ Utils.removeBlockquoteSwitcher = function (oMessageTextBody)
|
||||||
/**
|
/**
|
||||||
* @param {string} sName
|
* @param {string} sName
|
||||||
* @param {Function} ViewModelClass
|
* @param {Function} ViewModelClass
|
||||||
|
* @param {Function=} AbstractViewModel = KnoinAbstractViewModel
|
||||||
*/
|
*/
|
||||||
Utils.extendAsViewModel = function (sName, ViewModelClass)
|
Utils.extendAsViewModel = function (sName, ViewModelClass, AbstractViewModel)
|
||||||
{
|
{
|
||||||
if (ViewModelClass)
|
if (ViewModelClass)
|
||||||
{
|
{
|
||||||
|
if (!AbstractViewModel)
|
||||||
|
{
|
||||||
|
AbstractViewModel = KnoinAbstractViewModel;
|
||||||
|
}
|
||||||
|
|
||||||
ViewModelClass.__name = sName;
|
ViewModelClass.__name = sName;
|
||||||
Plugins.regViewModelHook(sName, ViewModelClass);
|
Plugins.regViewModelHook(sName, ViewModelClass);
|
||||||
_.extend(ViewModelClass.prototype, KnoinAbstractViewModel.prototype);
|
_.extend(ViewModelClass.prototype, AbstractViewModel.prototype);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -5033,6 +5039,17 @@ function Knoin()
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param {Object} thisObject
|
||||||
|
*/
|
||||||
|
Knoin.constructorEnd = function (thisObject)
|
||||||
|
{
|
||||||
|
if (Utils.isFunc(thisObject['__constructor_end']))
|
||||||
|
{
|
||||||
|
thisObject['__constructor_end'].call(thisObject);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
Knoin.prototype.sDefaultScreenName = '';
|
Knoin.prototype.sDefaultScreenName = '';
|
||||||
Knoin.prototype.oScreens = {};
|
Knoin.prototype.oScreens = {};
|
||||||
Knoin.prototype.oBoot = null;
|
Knoin.prototype.oBoot = null;
|
||||||
|
|
@ -7555,6 +7572,8 @@ function PopupsFolderClearViewModel()
|
||||||
return !bIsClearing && null !== oFolder;
|
return !bIsClearing && null !== oFolder;
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Knoin.constructorEnd(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
Utils.extendAsViewModel('PopupsFolderClearViewModel', PopupsFolderClearViewModel);
|
Utils.extendAsViewModel('PopupsFolderClearViewModel', PopupsFolderClearViewModel);
|
||||||
|
|
@ -7654,6 +7673,8 @@ function PopupsFolderCreateViewModel()
|
||||||
});
|
});
|
||||||
|
|
||||||
this.defautOptionsAfterRender = Utils.defautOptionsAfterRender;
|
this.defautOptionsAfterRender = Utils.defautOptionsAfterRender;
|
||||||
|
|
||||||
|
Knoin.constructorEnd(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
Utils.extendAsViewModel('PopupsFolderCreateViewModel', PopupsFolderCreateViewModel);
|
Utils.extendAsViewModel('PopupsFolderCreateViewModel', PopupsFolderCreateViewModel);
|
||||||
|
|
@ -7744,6 +7765,8 @@ function PopupsFolderSystemViewModel()
|
||||||
this.trashFolder.subscribe(fCallback);
|
this.trashFolder.subscribe(fCallback);
|
||||||
|
|
||||||
this.defautOptionsAfterRender = Utils.defautOptionsAfterRender;
|
this.defautOptionsAfterRender = Utils.defautOptionsAfterRender;
|
||||||
|
|
||||||
|
Knoin.constructorEnd(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
Utils.extendAsViewModel('PopupsFolderSystemViewModel', PopupsFolderSystemViewModel);
|
Utils.extendAsViewModel('PopupsFolderSystemViewModel', PopupsFolderSystemViewModel);
|
||||||
|
|
@ -8177,6 +8200,8 @@ function PopupsComposeViewModel()
|
||||||
});
|
});
|
||||||
|
|
||||||
// this.driveCallback = _.bind(this.driveCallback, this);
|
// this.driveCallback = _.bind(this.driveCallback, this);
|
||||||
|
|
||||||
|
Knoin.constructorEnd(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
Utils.extendAsViewModel('PopupsComposeViewModel', PopupsComposeViewModel);
|
Utils.extendAsViewModel('PopupsComposeViewModel', PopupsComposeViewModel);
|
||||||
|
|
@ -9393,6 +9418,8 @@ function PopupsContactsViewModel()
|
||||||
});
|
});
|
||||||
|
|
||||||
this.bDropPageAfterDelete = false;
|
this.bDropPageAfterDelete = false;
|
||||||
|
|
||||||
|
Knoin.constructorEnd(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
Utils.extendAsViewModel('PopupsContactsViewModel', PopupsContactsViewModel);
|
Utils.extendAsViewModel('PopupsContactsViewModel', PopupsContactsViewModel);
|
||||||
|
|
@ -9659,6 +9686,8 @@ function PopupsAdvancedSearchViewModel()
|
||||||
|
|
||||||
this.cancelCommand();
|
this.cancelCommand();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Knoin.constructorEnd(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
Utils.extendAsViewModel('PopupsAdvancedSearchViewModel', PopupsAdvancedSearchViewModel);
|
Utils.extendAsViewModel('PopupsAdvancedSearchViewModel', PopupsAdvancedSearchViewModel);
|
||||||
|
|
@ -9818,6 +9847,8 @@ function PopupsAddAccountViewModel()
|
||||||
this.login(this.email());
|
this.login(this.email());
|
||||||
}
|
}
|
||||||
}, this);
|
}, this);
|
||||||
|
|
||||||
|
Knoin.constructorEnd(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
Utils.extendAsViewModel('PopupsAddAccountViewModel', PopupsAddAccountViewModel);
|
Utils.extendAsViewModel('PopupsAddAccountViewModel', PopupsAddAccountViewModel);
|
||||||
|
|
@ -9942,6 +9973,8 @@ function PopupsIdentityViewModel()
|
||||||
this.button = ko.computed(function () {
|
this.button = ko.computed(function () {
|
||||||
return Utils.i18n('POPUPS_IDENTITIES/' + (this.edit() ? 'BUTTON_UPDATE_IDENTITY': 'BUTTON_ADD_IDENTITY'));
|
return Utils.i18n('POPUPS_IDENTITIES/' + (this.edit() ? 'BUTTON_UPDATE_IDENTITY': 'BUTTON_ADD_IDENTITY'));
|
||||||
}, this);
|
}, this);
|
||||||
|
|
||||||
|
Knoin.constructorEnd(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
Utils.extendAsViewModel('PopupsIdentityViewModel', PopupsIdentityViewModel);
|
Utils.extendAsViewModel('PopupsIdentityViewModel', PopupsIdentityViewModel);
|
||||||
|
|
@ -10015,6 +10048,8 @@ function PopupsLanguagesViewModel()
|
||||||
RL.data().mainLanguage.subscribe(function () {
|
RL.data().mainLanguage.subscribe(function () {
|
||||||
this.resetMainLanguage();
|
this.resetMainLanguage();
|
||||||
}, this);
|
}, this);
|
||||||
|
|
||||||
|
Knoin.constructorEnd(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
Utils.extendAsViewModel('PopupsLanguagesViewModel', PopupsLanguagesViewModel);
|
Utils.extendAsViewModel('PopupsLanguagesViewModel', PopupsLanguagesViewModel);
|
||||||
|
|
@ -10206,6 +10241,8 @@ function LoginViewModel()
|
||||||
|
|
||||||
return bF || bG || bT;
|
return bF || bG || bT;
|
||||||
}, this);
|
}, this);
|
||||||
|
|
||||||
|
Knoin.constructorEnd(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
Utils.extendAsViewModel('LoginViewModel', LoginViewModel);
|
Utils.extendAsViewModel('LoginViewModel', LoginViewModel);
|
||||||
|
|
@ -10392,9 +10429,10 @@ AbstractSystemDropDownViewModel.prototype.logoutClick = function ()
|
||||||
function MailBoxSystemDropDownViewModel()
|
function MailBoxSystemDropDownViewModel()
|
||||||
{
|
{
|
||||||
AbstractSystemDropDownViewModel.call(this);
|
AbstractSystemDropDownViewModel.call(this);
|
||||||
|
Knoin.constructorEnd(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
_.extend(MailBoxSystemDropDownViewModel.prototype, AbstractSystemDropDownViewModel.prototype);
|
Utils.extendAsViewModel('MailBoxSystemDropDownViewModel', MailBoxSystemDropDownViewModel, AbstractSystemDropDownViewModel);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @constructor
|
* @constructor
|
||||||
|
|
@ -10403,9 +10441,10 @@ _.extend(MailBoxSystemDropDownViewModel.prototype, AbstractSystemDropDownViewMod
|
||||||
function SettingsSystemDropDownViewModel()
|
function SettingsSystemDropDownViewModel()
|
||||||
{
|
{
|
||||||
AbstractSystemDropDownViewModel.call(this);
|
AbstractSystemDropDownViewModel.call(this);
|
||||||
|
Knoin.constructorEnd(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
_.extend(SettingsSystemDropDownViewModel.prototype, AbstractSystemDropDownViewModel.prototype);
|
Utils.extendAsViewModel('SettingsSystemDropDownViewModel', SettingsSystemDropDownViewModel, AbstractSystemDropDownViewModel);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @constructor
|
* @constructor
|
||||||
|
|
@ -10421,6 +10460,8 @@ function MailBoxFolderListViewModel()
|
||||||
this.iDropOverTimer = 0;
|
this.iDropOverTimer = 0;
|
||||||
|
|
||||||
this.allowContacts = !!RL.settingsGet('ContactsIsAllowed');
|
this.allowContacts = !!RL.settingsGet('ContactsIsAllowed');
|
||||||
|
|
||||||
|
Knoin.constructorEnd(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
Utils.extendAsViewModel('MailBoxFolderListViewModel', MailBoxFolderListViewModel);
|
Utils.extendAsViewModel('MailBoxFolderListViewModel', MailBoxFolderListViewModel);
|
||||||
|
|
@ -10697,6 +10738,8 @@ function MailBoxMessageListViewModel()
|
||||||
this.deleteCommand();
|
this.deleteCommand();
|
||||||
}
|
}
|
||||||
}, this));
|
}, this));
|
||||||
|
|
||||||
|
Knoin.constructorEnd(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
Utils.extendAsViewModel('MailBoxMessageListViewModel', MailBoxMessageListViewModel);
|
Utils.extendAsViewModel('MailBoxMessageListViewModel', MailBoxMessageListViewModel);
|
||||||
|
|
@ -11494,6 +11537,8 @@ function MailBoxMessageViewViewModel()
|
||||||
this.messageActiveDom.subscribe(function () {
|
this.messageActiveDom.subscribe(function () {
|
||||||
this.scrollMessageToTop();
|
this.scrollMessageToTop();
|
||||||
}, this);
|
}, this);
|
||||||
|
|
||||||
|
Knoin.constructorEnd(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
Utils.extendAsViewModel('MailBoxMessageViewViewModel', MailBoxMessageViewViewModel);
|
Utils.extendAsViewModel('MailBoxMessageViewViewModel', MailBoxMessageViewViewModel);
|
||||||
|
|
@ -11683,6 +11728,8 @@ function SettingsMenuViewModel(oScreen)
|
||||||
KnoinAbstractViewModel.call(this, 'Left', 'SettingsMenu');
|
KnoinAbstractViewModel.call(this, 'Left', 'SettingsMenu');
|
||||||
|
|
||||||
this.menu = oScreen.menu;
|
this.menu = oScreen.menu;
|
||||||
|
|
||||||
|
Knoin.constructorEnd(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
Utils.extendAsViewModel('SettingsMenuViewModel', SettingsMenuViewModel);
|
Utils.extendAsViewModel('SettingsMenuViewModel', SettingsMenuViewModel);
|
||||||
|
|
@ -11704,6 +11751,8 @@ SettingsMenuViewModel.prototype.backToMailBoxClick = function ()
|
||||||
function SettingsPaneViewModel()
|
function SettingsPaneViewModel()
|
||||||
{
|
{
|
||||||
KnoinAbstractViewModel.call(this, 'Right', 'SettingsPane');
|
KnoinAbstractViewModel.call(this, 'Right', 'SettingsPane');
|
||||||
|
|
||||||
|
Knoin.constructorEnd(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
Utils.extendAsViewModel('SettingsPaneViewModel', SettingsPaneViewModel);
|
Utils.extendAsViewModel('SettingsPaneViewModel', SettingsPaneViewModel);
|
||||||
|
|
|
||||||
14
rainloop/v/0.0.0/static/js/app.min.js
vendored
14
rainloop/v/0.0.0/static/js/app.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue