mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-28 11:39:21 +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
|
|
@ -66,6 +66,8 @@ function AdminLoginViewModel()
|
|||
}, function () {
|
||||
return !this.submitRequest();
|
||||
});
|
||||
|
||||
Knoin.constructorEnd(this);
|
||||
}
|
||||
|
||||
Utils.extendAsViewModel('AdminLoginViewModel', AdminLoginViewModel);
|
||||
|
|
|
|||
|
|
@ -11,6 +11,8 @@ function AdminMenuViewModel(oScreen)
|
|||
KnoinAbstractViewModel.call(this, 'Left', 'AdminMenu');
|
||||
|
||||
this.menu = oScreen.menu;
|
||||
|
||||
Knoin.constructorEnd(this);
|
||||
}
|
||||
|
||||
Utils.extendAsViewModel('AdminMenuViewModel', AdminMenuViewModel);
|
||||
|
|
|
|||
|
|
@ -10,6 +10,8 @@ function AdminPaneViewModel()
|
|||
|
||||
this.adminDomain = ko.observable(RL.settingsGet('AdminDomain'));
|
||||
this.version = ko.observable(RL.settingsGet('Version'));
|
||||
|
||||
Knoin.constructorEnd(this);
|
||||
}
|
||||
|
||||
Utils.extendAsViewModel('AdminPaneViewModel', AdminPaneViewModel);
|
||||
|
|
|
|||
|
|
@ -156,6 +156,8 @@ function LoginViewModel()
|
|||
|
||||
return bF || bG || bT;
|
||||
}, this);
|
||||
|
||||
Knoin.constructorEnd(this);
|
||||
}
|
||||
|
||||
Utils.extendAsViewModel('LoginViewModel', LoginViewModel);
|
||||
|
|
|
|||
|
|
@ -14,6 +14,8 @@ function MailBoxFolderListViewModel()
|
|||
this.iDropOverTimer = 0;
|
||||
|
||||
this.allowContacts = !!RL.settingsGet('ContactsIsAllowed');
|
||||
|
||||
Knoin.constructorEnd(this);
|
||||
}
|
||||
|
||||
Utils.extendAsViewModel('MailBoxFolderListViewModel', MailBoxFolderListViewModel);
|
||||
|
|
|
|||
|
|
@ -177,6 +177,8 @@ function MailBoxMessageListViewModel()
|
|||
this.deleteCommand();
|
||||
}
|
||||
}, this));
|
||||
|
||||
Knoin.constructorEnd(this);
|
||||
}
|
||||
|
||||
Utils.extendAsViewModel('MailBoxMessageListViewModel', MailBoxMessageListViewModel);
|
||||
|
|
|
|||
|
|
@ -141,6 +141,8 @@ function MailBoxMessageViewViewModel()
|
|||
this.messageActiveDom.subscribe(function () {
|
||||
this.scrollMessageToTop();
|
||||
}, this);
|
||||
|
||||
Knoin.constructorEnd(this);
|
||||
}
|
||||
|
||||
Utils.extendAsViewModel('MailBoxMessageViewViewModel', MailBoxMessageViewViewModel);
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@
|
|||
function MailBoxSystemDropDownViewModel()
|
||||
{
|
||||
AbstractSystemDropDownViewModel.call(this);
|
||||
Knoin.constructorEnd(this);
|
||||
}
|
||||
|
||||
_.extend(MailBoxSystemDropDownViewModel.prototype, AbstractSystemDropDownViewModel.prototype);
|
||||
Utils.extendAsViewModel('MailBoxSystemDropDownViewModel', MailBoxSystemDropDownViewModel, AbstractSystemDropDownViewModel);
|
||||
|
|
|
|||
|
|
@ -82,6 +82,8 @@ function PopupsActivateViewModel()
|
|||
}, function () {
|
||||
return !this.activateProcess() && '' !== this.domain() && '' !== this.key() && !this.activationSuccessed();
|
||||
});
|
||||
|
||||
Knoin.constructorEnd(this);
|
||||
}
|
||||
|
||||
Utils.extendAsViewModel('PopupsActivateViewModel', PopupsActivateViewModel);
|
||||
|
|
|
|||
|
|
@ -82,6 +82,8 @@ function PopupsAddAccountViewModel()
|
|||
this.login(this.email());
|
||||
}
|
||||
}, this);
|
||||
|
||||
Knoin.constructorEnd(this);
|
||||
}
|
||||
|
||||
Utils.extendAsViewModel('PopupsAddAccountViewModel', PopupsAddAccountViewModel);
|
||||
|
|
|
|||
|
|
@ -27,6 +27,8 @@ function PopupsAdvancedSearchViewModel()
|
|||
|
||||
this.cancelCommand();
|
||||
});
|
||||
|
||||
Knoin.constructorEnd(this);
|
||||
}
|
||||
|
||||
Utils.extendAsViewModel('PopupsAdvancedSearchViewModel', PopupsAdvancedSearchViewModel);
|
||||
|
|
|
|||
|
|
@ -397,6 +397,8 @@ function PopupsComposeViewModel()
|
|||
});
|
||||
|
||||
// this.driveCallback = _.bind(this.driveCallback, this);
|
||||
|
||||
Knoin.constructorEnd(this);
|
||||
}
|
||||
|
||||
Utils.extendAsViewModel('PopupsComposeViewModel', PopupsComposeViewModel);
|
||||
|
|
|
|||
|
|
@ -236,6 +236,8 @@ function PopupsContactsViewModel()
|
|||
});
|
||||
|
||||
this.bDropPageAfterDelete = false;
|
||||
|
||||
Knoin.constructorEnd(this);
|
||||
}
|
||||
|
||||
Utils.extendAsViewModel('PopupsContactsViewModel', PopupsContactsViewModel);
|
||||
|
|
|
|||
|
|
@ -109,6 +109,8 @@ function PopupsDomainViewModel()
|
|||
this.whiteListCommand = Utils.createCommand(this, function () {
|
||||
this.whiteListPage(!this.whiteListPage());
|
||||
});
|
||||
|
||||
Knoin.constructorEnd(this);
|
||||
}
|
||||
|
||||
Utils.extendAsViewModel('PopupsDomainViewModel', PopupsDomainViewModel);
|
||||
|
|
|
|||
|
|
@ -75,6 +75,8 @@ function PopupsFolderClearViewModel()
|
|||
return !bIsClearing && null !== oFolder;
|
||||
|
||||
});
|
||||
|
||||
Knoin.constructorEnd(this);
|
||||
}
|
||||
|
||||
Utils.extendAsViewModel('PopupsFolderClearViewModel', PopupsFolderClearViewModel);
|
||||
|
|
|
|||
|
|
@ -80,6 +80,8 @@ function PopupsFolderCreateViewModel()
|
|||
});
|
||||
|
||||
this.defautOptionsAfterRender = Utils.defautOptionsAfterRender;
|
||||
|
||||
Knoin.constructorEnd(this);
|
||||
}
|
||||
|
||||
Utils.extendAsViewModel('PopupsFolderCreateViewModel', PopupsFolderCreateViewModel);
|
||||
|
|
|
|||
|
|
@ -66,6 +66,8 @@ function PopupsFolderSystemViewModel()
|
|||
this.trashFolder.subscribe(fCallback);
|
||||
|
||||
this.defautOptionsAfterRender = Utils.defautOptionsAfterRender;
|
||||
|
||||
Knoin.constructorEnd(this);
|
||||
}
|
||||
|
||||
Utils.extendAsViewModel('PopupsFolderSystemViewModel', PopupsFolderSystemViewModel);
|
||||
|
|
|
|||
|
|
@ -94,6 +94,8 @@ function PopupsIdentityViewModel()
|
|||
this.button = ko.computed(function () {
|
||||
return Utils.i18n('POPUPS_IDENTITIES/' + (this.edit() ? 'BUTTON_UPDATE_IDENTITY': 'BUTTON_ADD_IDENTITY'));
|
||||
}, this);
|
||||
|
||||
Knoin.constructorEnd(this);
|
||||
}
|
||||
|
||||
Utils.extendAsViewModel('PopupsIdentityViewModel', PopupsIdentityViewModel);
|
||||
|
|
|
|||
|
|
@ -23,6 +23,8 @@ function PopupsLanguagesViewModel()
|
|||
RL.data().mainLanguage.subscribe(function () {
|
||||
this.resetMainLanguage();
|
||||
}, this);
|
||||
|
||||
Knoin.constructorEnd(this);
|
||||
}
|
||||
|
||||
Utils.extendAsViewModel('PopupsLanguagesViewModel', PopupsLanguagesViewModel);
|
||||
|
|
|
|||
|
|
@ -58,6 +58,8 @@ function PopupsPluginViewModel()
|
|||
RL.remote().pluginSettingsUpdate(this.onPluginSettingsUpdateResponse, oList);
|
||||
|
||||
}, this.hasConfiguration);
|
||||
|
||||
Knoin.constructorEnd(this);
|
||||
}
|
||||
|
||||
Utils.extendAsViewModel('PopupsPluginViewModel', PopupsPluginViewModel);
|
||||
|
|
|
|||
|
|
@ -11,6 +11,8 @@ function SettingsMenuViewModel(oScreen)
|
|||
KnoinAbstractViewModel.call(this, 'Left', 'SettingsMenu');
|
||||
|
||||
this.menu = oScreen.menu;
|
||||
|
||||
Knoin.constructorEnd(this);
|
||||
}
|
||||
|
||||
Utils.extendAsViewModel('SettingsMenuViewModel', SettingsMenuViewModel);
|
||||
|
|
|
|||
|
|
@ -7,6 +7,8 @@
|
|||
function SettingsPaneViewModel()
|
||||
{
|
||||
KnoinAbstractViewModel.call(this, 'Right', 'SettingsPane');
|
||||
|
||||
Knoin.constructorEnd(this);
|
||||
}
|
||||
|
||||
Utils.extendAsViewModel('SettingsPaneViewModel', SettingsPaneViewModel);
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@
|
|||
function SettingsSystemDropDownViewModel()
|
||||
{
|
||||
AbstractSystemDropDownViewModel.call(this);
|
||||
Knoin.constructorEnd(this);
|
||||
}
|
||||
|
||||
_.extend(SettingsSystemDropDownViewModel.prototype, AbstractSystemDropDownViewModel.prototype);
|
||||
Utils.extendAsViewModel('SettingsSystemDropDownViewModel', SettingsSystemDropDownViewModel, AbstractSystemDropDownViewModel);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue