mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-03 22:47:03 +03:00
Source refactoring
This commit is contained in:
parent
09b04740e7
commit
104ac0806a
27 changed files with 204 additions and 715 deletions
|
|
@ -67,6 +67,8 @@
|
|||
});
|
||||
|
||||
this.loginPowered = ko.observable(!!Settings.settingsGet('LoginPowered'));
|
||||
|
||||
this.community = RL_COMMUNITY || AppStore.community();
|
||||
}
|
||||
|
||||
BrandingAdminSettings.prototype.onBuild = function ()
|
||||
|
|
@ -76,85 +78,6 @@
|
|||
Remote = require('Remote/Admin/Ajax')
|
||||
;
|
||||
|
||||
if (this.capa())
|
||||
{
|
||||
_.delay(function () {
|
||||
|
||||
var
|
||||
f1 = Utils.settingsSaveHelperSimpleFunction(self.loginLogo.trigger, self),
|
||||
f2 = Utils.settingsSaveHelperSimpleFunction(self.loginDescription.trigger, self),
|
||||
f3 = Utils.settingsSaveHelperSimpleFunction(self.loginCss.trigger, self),
|
||||
f4 = Utils.settingsSaveHelperSimpleFunction(self.userLogo.trigger, self),
|
||||
f5 = Utils.settingsSaveHelperSimpleFunction(self.userLogoTitle.trigger, self),
|
||||
f6 = Utils.settingsSaveHelperSimpleFunction(self.loginBackground.trigger, self),
|
||||
f7 = Utils.settingsSaveHelperSimpleFunction(self.userCss.trigger, self),
|
||||
f8 = Utils.settingsSaveHelperSimpleFunction(self.welcomePageUrl.trigger, self),
|
||||
f9 = Utils.settingsSaveHelperSimpleFunction(self.welcomePageDisplay.trigger, self)
|
||||
;
|
||||
|
||||
self.loginLogo.subscribe(function (sValue) {
|
||||
Remote.saveAdminConfig(f1, {
|
||||
'LoginLogo': Utils.trim(sValue)
|
||||
});
|
||||
});
|
||||
|
||||
self.loginDescription.subscribe(function (sValue) {
|
||||
Remote.saveAdminConfig(f2, {
|
||||
'LoginDescription': Utils.trim(sValue)
|
||||
});
|
||||
});
|
||||
|
||||
self.loginCss.subscribe(function (sValue) {
|
||||
Remote.saveAdminConfig(f3, {
|
||||
'LoginCss': Utils.trim(sValue)
|
||||
});
|
||||
});
|
||||
|
||||
self.userLogo.subscribe(function (sValue) {
|
||||
Remote.saveAdminConfig(f4, {
|
||||
'UserLogo': Utils.trim(sValue)
|
||||
});
|
||||
});
|
||||
|
||||
self.userLogoTitle.subscribe(function (sValue) {
|
||||
Remote.saveAdminConfig(f5, {
|
||||
'UserLogoTitle': Utils.trim(sValue)
|
||||
});
|
||||
});
|
||||
|
||||
self.loginBackground.subscribe(function (sValue) {
|
||||
Remote.saveAdminConfig(f6, {
|
||||
'LoginBackground': Utils.trim(sValue)
|
||||
});
|
||||
});
|
||||
|
||||
self.userCss.subscribe(function (sValue) {
|
||||
Remote.saveAdminConfig(f7, {
|
||||
'UserCss': Utils.trim(sValue)
|
||||
});
|
||||
});
|
||||
|
||||
self.welcomePageUrl.subscribe(function (sValue) {
|
||||
Remote.saveAdminConfig(f8, {
|
||||
'WelcomePageUrl': Utils.trim(sValue)
|
||||
});
|
||||
});
|
||||
|
||||
self.welcomePageDisplay.subscribe(function (sValue) {
|
||||
Remote.saveAdminConfig(f9, {
|
||||
'WelcomePageDisplay': Utils.trim(sValue)
|
||||
});
|
||||
});
|
||||
|
||||
self.loginPowered.subscribe(function (bValue) {
|
||||
Remote.saveAdminConfig(null, {
|
||||
'LoginPowered': bValue ? '1' : '0'
|
||||
});
|
||||
});
|
||||
|
||||
}, 50);
|
||||
}
|
||||
|
||||
_.delay(function () {
|
||||
|
||||
var
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue