mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-01 21:49: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
|
|
@ -1116,14 +1116,20 @@ Utils.removeBlockquoteSwitcher = function (oMessageTextBody)
|
|||
/**
|
||||
* @param {string} sName
|
||||
* @param {Function} ViewModelClass
|
||||
* @param {Function=} AbstractViewModel = KnoinAbstractViewModel
|
||||
*/
|
||||
Utils.extendAsViewModel = function (sName, ViewModelClass)
|
||||
Utils.extendAsViewModel = function (sName, ViewModelClass, AbstractViewModel)
|
||||
{
|
||||
if (ViewModelClass)
|
||||
{
|
||||
if (!AbstractViewModel)
|
||||
{
|
||||
AbstractViewModel = KnoinAbstractViewModel;
|
||||
}
|
||||
|
||||
ViewModelClass.__name = sName;
|
||||
Plugins.regViewModelHook(sName, ViewModelClass);
|
||||
_.extend(ViewModelClass.prototype, KnoinAbstractViewModel.prototype);
|
||||
_.extend(ViewModelClass.prototype, AbstractViewModel.prototype);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue