mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-03 14:37:02 +03:00
Code refactoring
This commit is contained in:
parent
79233ad83c
commit
286ab567af
53 changed files with 618 additions and 581 deletions
|
|
@ -19,7 +19,7 @@
|
|||
*/
|
||||
function DomainsAdminSettings()
|
||||
{
|
||||
this.domains = DomainStore.collection;
|
||||
this.domains = DomainStore.domains;
|
||||
|
||||
this.iDomainForDeletionTimeout = 0;
|
||||
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@
|
|||
{
|
||||
this.packagesError = ko.observable('');
|
||||
|
||||
this.packages = PackageStore.collection;
|
||||
this.packages = PackageStore.packages;
|
||||
this.packagesReal = PackageStore.packagesReal;
|
||||
this.packagesMainUpdatable = PackageStore.packagesMainUpdatable;
|
||||
|
||||
|
|
@ -39,7 +39,7 @@
|
|||
});
|
||||
|
||||
this.visibility = ko.computed(function () {
|
||||
return PackageStore.collection.loading() ? 'visible' : 'hidden';
|
||||
return PackageStore.packages.loading() ? 'visible' : 'hidden';
|
||||
}, this);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -23,11 +23,11 @@
|
|||
{
|
||||
this.enabledPlugins = ko.observable(!!Settings.settingsGet('EnabledPlugins'));
|
||||
|
||||
this.plugins = PluginStore.collection;
|
||||
this.pluginsError = PluginStore.collection.error;
|
||||
this.plugins = PluginStore.plugins;
|
||||
this.pluginsError = PluginStore.plugins.error;
|
||||
|
||||
this.visibility = ko.computed(function () {
|
||||
return PluginStore.collection.loading() ? 'visible' : 'hidden';
|
||||
return PluginStore.plugins.loading() ? 'visible' : 'hidden';
|
||||
}, this);
|
||||
|
||||
this.onPluginLoadRequest = _.bind(this.onPluginLoadRequest, this);
|
||||
|
|
@ -75,7 +75,7 @@
|
|||
|
||||
PluginsAdminSettings.prototype.onShow = function ()
|
||||
{
|
||||
PluginStore.collection.error('');
|
||||
PluginStore.plugins.error('');
|
||||
require('App/Admin').reloadPluginList();
|
||||
};
|
||||
|
||||
|
|
@ -95,11 +95,11 @@
|
|||
{
|
||||
if (Enums.Notification.UnsupportedPluginPackage === oData.ErrorCode && oData.ErrorMessage && '' !== oData.ErrorMessage)
|
||||
{
|
||||
PluginStore.collection.error(oData.ErrorMessage);
|
||||
PluginStore.plugins.error(oData.ErrorMessage);
|
||||
}
|
||||
else
|
||||
{
|
||||
PluginStore.collection.error(Translator.getNotification(oData.ErrorCode));
|
||||
PluginStore.plugins.error(Translator.getNotification(oData.ErrorCode));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue