mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-30 20:49:20 +03:00
Code refactoring
Fixed owncloud password encoder/decoder (#291) Fixed ckeditor in ownCloud iframe (Closes #302) Release commit
This commit is contained in:
parent
7a374ebe03
commit
06274c6a7c
112 changed files with 2667 additions and 1862 deletions
|
|
@ -10,11 +10,11 @@
|
|||
/**
|
||||
* @constructor
|
||||
*/
|
||||
function AdminSettingsAbout()
|
||||
function AboutAdminSetting()
|
||||
{
|
||||
var
|
||||
Settings = require('Storage:Settings'),
|
||||
Data = require('Storage:Admin:Data')
|
||||
Settings = require('Storage/Settings'),
|
||||
Data = require('Storage/Admin/Data')
|
||||
;
|
||||
|
||||
this.version = ko.observable(Settings.settingsGet('Version'));
|
||||
|
|
@ -67,22 +67,22 @@
|
|||
}, this);
|
||||
}
|
||||
|
||||
AdminSettingsAbout.prototype.onBuild = function ()
|
||||
AboutAdminSetting.prototype.onBuild = function ()
|
||||
{
|
||||
if (this.access())
|
||||
{
|
||||
require('App:Admin').reloadCoreData();
|
||||
require('App/Admin').reloadCoreData();
|
||||
}
|
||||
};
|
||||
|
||||
AdminSettingsAbout.prototype.updateCoreData = function ()
|
||||
AboutAdminSetting.prototype.updateCoreData = function ()
|
||||
{
|
||||
if (!this.coreUpdating())
|
||||
{
|
||||
require('App:Admin').updateCoreData();
|
||||
require('App/Admin').updateCoreData();
|
||||
}
|
||||
};
|
||||
|
||||
module.exports = AdminSettingsAbout;
|
||||
module.exports = AboutAdminSetting;
|
||||
|
||||
}());
|
||||
|
|
@ -13,11 +13,11 @@
|
|||
/**
|
||||
* @constructor
|
||||
*/
|
||||
function AdminSettingsBranding()
|
||||
function BrandingAdminSetting()
|
||||
{
|
||||
var
|
||||
Enums = require('Common/Enums'),
|
||||
Settings = require('Storage:Settings')
|
||||
Settings = require('Storage/Settings')
|
||||
;
|
||||
|
||||
this.title = ko.observable(Settings.settingsGet('Title'));
|
||||
|
|
@ -36,11 +36,11 @@
|
|||
this.loginCss.trigger = ko.observable(Enums.SaveSettingsStep.Idle);
|
||||
}
|
||||
|
||||
AdminSettingsBranding.prototype.onBuild = function ()
|
||||
BrandingAdminSetting.prototype.onBuild = function ()
|
||||
{
|
||||
var
|
||||
self = this,
|
||||
Remote = require('Storage:Admin:Remote')
|
||||
Remote = require('Storage/Admin/Remote')
|
||||
;
|
||||
|
||||
_.delay(function () {
|
||||
|
|
@ -86,6 +86,6 @@
|
|||
}, 50);
|
||||
};
|
||||
|
||||
module.exports = AdminSettingsBranding;
|
||||
module.exports = BrandingAdminSetting;
|
||||
|
||||
}());
|
||||
|
|
@ -10,16 +10,16 @@
|
|||
Enums = require('Common/Enums'),
|
||||
Utils = require('Common/Utils'),
|
||||
|
||||
Settings = require('Storage:Settings')
|
||||
Settings = require('Storage/Settings')
|
||||
;
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
*/
|
||||
function AdminSettingsContacts()
|
||||
function ContactsAdminSetting()
|
||||
{
|
||||
var
|
||||
Remote = require('Storage:Admin:Remote')
|
||||
Remote = require('Storage/Admin/Remote')
|
||||
;
|
||||
|
||||
this.defautOptionsAfterRender = Utils.defautOptionsAfterRender;
|
||||
|
|
@ -141,7 +141,7 @@
|
|||
this.onTestContactsResponse = _.bind(this.onTestContactsResponse, this);
|
||||
}
|
||||
|
||||
AdminSettingsContacts.prototype.onTestContactsResponse = function (sResult, oData)
|
||||
ContactsAdminSetting.prototype.onTestContactsResponse = function (sResult, oData)
|
||||
{
|
||||
this.testContactsSuccess(false);
|
||||
this.testContactsError(false);
|
||||
|
|
@ -167,18 +167,18 @@
|
|||
this.testing(false);
|
||||
};
|
||||
|
||||
AdminSettingsContacts.prototype.onShow = function ()
|
||||
ContactsAdminSetting.prototype.onShow = function ()
|
||||
{
|
||||
this.testContactsSuccess(false);
|
||||
this.testContactsError(false);
|
||||
this.testContactsErrorMessage('');
|
||||
};
|
||||
|
||||
AdminSettingsContacts.prototype.onBuild = function ()
|
||||
ContactsAdminSetting.prototype.onBuild = function ()
|
||||
{
|
||||
var
|
||||
self = this,
|
||||
Remote = require('Storage:Admin:Remote')
|
||||
Remote = require('Storage/Admin/Remote')
|
||||
;
|
||||
|
||||
_.delay(function () {
|
||||
|
|
@ -237,6 +237,6 @@
|
|||
}, 50);
|
||||
};
|
||||
|
||||
module.exports = AdminSettingsContacts;
|
||||
module.exports = ContactsAdminSetting;
|
||||
|
||||
}());
|
||||
|
|
@ -10,16 +10,16 @@
|
|||
|
||||
Enums = require('Common/Enums'),
|
||||
|
||||
PopupsDomainViewModel = require('View:Popup:Domain'),
|
||||
PopupsDomainViewModel = require('View/Popup/Domain'),
|
||||
|
||||
Data = require('Storage:Admin:Data'),
|
||||
Remote = require('Storage:Admin:Remote')
|
||||
Data = require('Storage/Admin/Data'),
|
||||
Remote = require('Storage/Admin/Remote')
|
||||
;
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
*/
|
||||
function AdminSettingsDomains()
|
||||
function DomainsAdminSetting()
|
||||
{
|
||||
this.domains = Data.domains;
|
||||
this.domainsLoading = Data.domainsLoading;
|
||||
|
|
@ -46,7 +46,7 @@
|
|||
]});
|
||||
}
|
||||
|
||||
AdminSettingsDomains.prototype.startDomainForDeletionTimeout = function ()
|
||||
DomainsAdminSetting.prototype.startDomainForDeletionTimeout = function ()
|
||||
{
|
||||
var self = this;
|
||||
window.clearInterval(this.iDomainForDeletionTimeout);
|
||||
|
|
@ -55,24 +55,24 @@
|
|||
}, 1000 * 3);
|
||||
};
|
||||
|
||||
AdminSettingsDomains.prototype.createDomain = function ()
|
||||
DomainsAdminSetting.prototype.createDomain = function ()
|
||||
{
|
||||
require('App:Knoin').showScreenPopup(PopupsDomainViewModel);
|
||||
require('Knoin/Knoin').showScreenPopup(PopupsDomainViewModel);
|
||||
};
|
||||
|
||||
AdminSettingsDomains.prototype.deleteDomain = function (oDomain)
|
||||
DomainsAdminSetting.prototype.deleteDomain = function (oDomain)
|
||||
{
|
||||
this.domains.remove(oDomain);
|
||||
Remote.domainDelete(_.bind(this.onDomainListChangeRequest, this), oDomain.name);
|
||||
};
|
||||
|
||||
AdminSettingsDomains.prototype.disableDomain = function (oDomain)
|
||||
DomainsAdminSetting.prototype.disableDomain = function (oDomain)
|
||||
{
|
||||
oDomain.disabled(!oDomain.disabled());
|
||||
Remote.domainDisable(_.bind(this.onDomainListChangeRequest, this), oDomain.name, oDomain.disabled());
|
||||
};
|
||||
|
||||
AdminSettingsDomains.prototype.onBuild = function (oDom)
|
||||
DomainsAdminSetting.prototype.onBuild = function (oDom)
|
||||
{
|
||||
var self = this;
|
||||
oDom
|
||||
|
|
@ -85,22 +85,22 @@
|
|||
})
|
||||
;
|
||||
|
||||
require('App:Admin').reloadDomainList();
|
||||
require('App/Admin').reloadDomainList();
|
||||
};
|
||||
|
||||
AdminSettingsDomains.prototype.onDomainLoadRequest = function (sResult, oData)
|
||||
DomainsAdminSetting.prototype.onDomainLoadRequest = function (sResult, oData)
|
||||
{
|
||||
if (Enums.StorageResultType.Success === sResult && oData && oData.Result)
|
||||
{
|
||||
require('App:Knoin').showScreenPopup(PopupsDomainViewModel, [oData.Result]);
|
||||
require('Knoin/Knoin').showScreenPopup(PopupsDomainViewModel, [oData.Result]);
|
||||
}
|
||||
};
|
||||
|
||||
AdminSettingsDomains.prototype.onDomainListChangeRequest = function ()
|
||||
DomainsAdminSetting.prototype.onDomainListChangeRequest = function ()
|
||||
{
|
||||
require('App:Admin').reloadDomainList();
|
||||
require('App/Admin').reloadDomainList();
|
||||
};
|
||||
|
||||
module.exports = AdminSettingsDomains;
|
||||
module.exports = DomainsAdminSetting;
|
||||
|
||||
}());
|
||||
|
|
@ -11,14 +11,14 @@
|
|||
Utils = require('Common/Utils'),
|
||||
LinkBuilder = require('Common/LinkBuilder'),
|
||||
|
||||
Settings = require('Storage:Settings'),
|
||||
Data = require('Storage:Admin:Data')
|
||||
Settings = require('Storage/Settings'),
|
||||
Data = require('Storage/Admin/Data')
|
||||
;
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
*/
|
||||
function AdminSettingsGeneral()
|
||||
function GeneralAdminSetting()
|
||||
{
|
||||
this.mainLanguage = Data.mainLanguage;
|
||||
this.mainTheme = Data.mainTheme;
|
||||
|
|
@ -61,11 +61,11 @@
|
|||
this.themeTrigger = ko.observable(Enums.SaveSettingsStep.Idle);
|
||||
}
|
||||
|
||||
AdminSettingsGeneral.prototype.onBuild = function ()
|
||||
GeneralAdminSetting.prototype.onBuild = function ()
|
||||
{
|
||||
var
|
||||
self = this,
|
||||
Remote = require('Storage:Admin:Remote')
|
||||
Remote = require('Storage/Admin/Remote')
|
||||
;
|
||||
|
||||
_.delay(function () {
|
||||
|
|
@ -127,19 +127,19 @@
|
|||
}, 50);
|
||||
};
|
||||
|
||||
AdminSettingsGeneral.prototype.selectLanguage = function ()
|
||||
GeneralAdminSetting.prototype.selectLanguage = function ()
|
||||
{
|
||||
require('App:Knoin').showScreenPopup(require('View:Popup:Languages'));
|
||||
require('Knoin/Knoin').showScreenPopup(require('View/Popup/Languages'));
|
||||
};
|
||||
|
||||
/**
|
||||
* @return {string}
|
||||
*/
|
||||
AdminSettingsGeneral.prototype.phpInfoLink = function ()
|
||||
GeneralAdminSetting.prototype.phpInfoLink = function ()
|
||||
{
|
||||
return LinkBuilder.phpInfo();
|
||||
};
|
||||
|
||||
module.exports = AdminSettingsGeneral;
|
||||
module.exports = GeneralAdminSetting;
|
||||
|
||||
}());
|
||||
|
|
@ -7,14 +7,14 @@
|
|||
ko = require('ko'),
|
||||
moment = require('moment'),
|
||||
|
||||
Settings = require('Storage:Settings'),
|
||||
Data = require('Storage:Admin:Data')
|
||||
Settings = require('Storage/Settings'),
|
||||
Data = require('Storage/Admin/Data')
|
||||
;
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
*/
|
||||
function AdminSettingsLicensing()
|
||||
function LicensingAdminSetting()
|
||||
{
|
||||
this.licensing = Data.licensing;
|
||||
this.licensingProcess = Data.licensingProcess;
|
||||
|
|
@ -29,33 +29,33 @@
|
|||
this.licenseTrigger.subscribe(function () {
|
||||
if (this.subscriptionEnabled())
|
||||
{
|
||||
require('App:Admin').reloadLicensing(true);
|
||||
require('App/Admin').reloadLicensing(true);
|
||||
}
|
||||
}, this);
|
||||
}
|
||||
|
||||
AdminSettingsLicensing.prototype.onBuild = function ()
|
||||
LicensingAdminSetting.prototype.onBuild = function ()
|
||||
{
|
||||
if (this.subscriptionEnabled())
|
||||
{
|
||||
require('App:Admin').reloadLicensing(false);
|
||||
require('App/Admin').reloadLicensing(false);
|
||||
}
|
||||
};
|
||||
|
||||
AdminSettingsLicensing.prototype.onShow = function ()
|
||||
LicensingAdminSetting.prototype.onShow = function ()
|
||||
{
|
||||
this.adminDomain(Settings.settingsGet('AdminDomain'));
|
||||
};
|
||||
|
||||
AdminSettingsLicensing.prototype.showActivationForm = function ()
|
||||
LicensingAdminSetting.prototype.showActivationForm = function ()
|
||||
{
|
||||
require('App:Knoin').showScreenPopup(require('View:Popup:Activate'));
|
||||
require('Knoin/Knoin').showScreenPopup(require('View/Popup/Activate'));
|
||||
};
|
||||
|
||||
/**
|
||||
* @returns {string}
|
||||
*/
|
||||
AdminSettingsLicensing.prototype.licenseExpiredMomentValue = function ()
|
||||
LicensingAdminSetting.prototype.licenseExpiredMomentValue = function ()
|
||||
{
|
||||
var
|
||||
iTime = this.licenseExpired(),
|
||||
|
|
@ -65,6 +65,6 @@
|
|||
return iTime && 1898625600 === iTime ? 'Never' : (oDate.format('LL') + ' (' + oDate.from(moment()) + ')');
|
||||
};
|
||||
|
||||
module.exports = AdminSettingsLicensing;
|
||||
module.exports = LicensingAdminSetting;
|
||||
|
||||
}());
|
||||
|
|
@ -10,14 +10,14 @@
|
|||
Enums = require('Common/Enums'),
|
||||
Utils = require('Common/Utils'),
|
||||
|
||||
Settings = require('Storage:Settings'),
|
||||
Data = require('Storage:Admin:Data')
|
||||
Settings = require('Storage/Settings'),
|
||||
Data = require('Storage/Admin/Data')
|
||||
;
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
*/
|
||||
function AdminSettingsLogin()
|
||||
function LoginAdminSetting()
|
||||
{
|
||||
this.determineUserLanguage = Data.determineUserLanguage;
|
||||
this.determineUserDomain = Data.determineUserDomain;
|
||||
|
|
@ -28,11 +28,11 @@
|
|||
this.defaultDomainTrigger = ko.observable(Enums.SaveSettingsStep.Idle);
|
||||
}
|
||||
|
||||
AdminSettingsLogin.prototype.onBuild = function ()
|
||||
LoginAdminSetting.prototype.onBuild = function ()
|
||||
{
|
||||
var
|
||||
self = this,
|
||||
Remote = require('Storage:Admin:Remote')
|
||||
Remote = require('Storage/Admin/Remote')
|
||||
;
|
||||
|
||||
_.delay(function () {
|
||||
|
|
@ -66,6 +66,6 @@
|
|||
}, 50);
|
||||
};
|
||||
|
||||
module.exports = AdminSettingsLogin;
|
||||
module.exports = LoginAdminSetting;
|
||||
|
||||
}());
|
||||
|
|
@ -10,14 +10,14 @@
|
|||
Enums = require('Common/Enums'),
|
||||
Utils = require('Common/Utils'),
|
||||
|
||||
Data = require('Storage:Admin:Data'),
|
||||
Remote = require('Storage:Admin:Remote')
|
||||
Data = require('Storage/Admin/Data'),
|
||||
Remote = require('Storage/Admin/Remote')
|
||||
;
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
*/
|
||||
function AdminSettingsPackages()
|
||||
function PackagesAdminSetting()
|
||||
{
|
||||
this.packagesError = ko.observable('');
|
||||
|
||||
|
|
@ -43,17 +43,17 @@
|
|||
}, this);
|
||||
}
|
||||
|
||||
AdminSettingsPackages.prototype.onShow = function ()
|
||||
PackagesAdminSetting.prototype.onShow = function ()
|
||||
{
|
||||
this.packagesError('');
|
||||
};
|
||||
|
||||
AdminSettingsPackages.prototype.onBuild = function ()
|
||||
PackagesAdminSetting.prototype.onBuild = function ()
|
||||
{
|
||||
require('App:Admin').reloadPackagesList();
|
||||
require('App/Admin').reloadPackagesList();
|
||||
};
|
||||
|
||||
AdminSettingsPackages.prototype.requestHelper = function (oPackage, bInstall)
|
||||
PackagesAdminSetting.prototype.requestHelper = function (oPackage, bInstall)
|
||||
{
|
||||
var self = this;
|
||||
return function (sResult, oData) {
|
||||
|
|
@ -85,12 +85,12 @@
|
|||
}
|
||||
else
|
||||
{
|
||||
require('App:Admin').reloadPackagesList();
|
||||
require('App/Admin').reloadPackagesList();
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
AdminSettingsPackages.prototype.deletePackage = function (oPackage)
|
||||
PackagesAdminSetting.prototype.deletePackage = function (oPackage)
|
||||
{
|
||||
if (oPackage)
|
||||
{
|
||||
|
|
@ -99,7 +99,7 @@
|
|||
}
|
||||
};
|
||||
|
||||
AdminSettingsPackages.prototype.installPackage = function (oPackage)
|
||||
PackagesAdminSetting.prototype.installPackage = function (oPackage)
|
||||
{
|
||||
if (oPackage)
|
||||
{
|
||||
|
|
@ -108,6 +108,6 @@
|
|||
}
|
||||
};
|
||||
|
||||
module.exports = AdminSettingsPackages;
|
||||
module.exports = PackagesAdminSetting;
|
||||
|
||||
}());
|
||||
|
|
@ -10,15 +10,15 @@
|
|||
Enums = require('Common/Enums'),
|
||||
Utils = require('Common/Utils'),
|
||||
|
||||
Settings = require('Storage:Settings'),
|
||||
Data = require('Storage:Admin:Data'),
|
||||
Remote = require('Storage:Admin:Remote')
|
||||
Settings = require('Storage/Settings'),
|
||||
Data = require('Storage/Admin/Data'),
|
||||
Remote = require('Storage/Admin/Remote')
|
||||
;
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
*/
|
||||
function AdminSettingsPlugins()
|
||||
function PluginsAdminSetting()
|
||||
{
|
||||
this.enabledPlugins = ko.observable(!!Settings.settingsGet('EnabledPlugins'));
|
||||
|
||||
|
|
@ -35,18 +35,18 @@
|
|||
this.onPluginDisableRequest = _.bind(this.onPluginDisableRequest, this);
|
||||
}
|
||||
|
||||
AdminSettingsPlugins.prototype.disablePlugin = function (oPlugin)
|
||||
PluginsAdminSetting.prototype.disablePlugin = function (oPlugin)
|
||||
{
|
||||
oPlugin.disabled(!oPlugin.disabled());
|
||||
Remote.pluginDisable(this.onPluginDisableRequest, oPlugin.name, oPlugin.disabled());
|
||||
};
|
||||
|
||||
AdminSettingsPlugins.prototype.configurePlugin = function (oPlugin)
|
||||
PluginsAdminSetting.prototype.configurePlugin = function (oPlugin)
|
||||
{
|
||||
Remote.plugin(this.onPluginLoadRequest, oPlugin.name);
|
||||
};
|
||||
|
||||
AdminSettingsPlugins.prototype.onBuild = function (oDom)
|
||||
PluginsAdminSetting.prototype.onBuild = function (oDom)
|
||||
{
|
||||
var self = this;
|
||||
|
||||
|
|
@ -74,21 +74,21 @@
|
|||
});
|
||||
};
|
||||
|
||||
AdminSettingsPlugins.prototype.onShow = function ()
|
||||
PluginsAdminSetting.prototype.onShow = function ()
|
||||
{
|
||||
this.pluginsError('');
|
||||
require('App:Admin').reloadPluginList();
|
||||
require('App/Admin').reloadPluginList();
|
||||
};
|
||||
|
||||
AdminSettingsPlugins.prototype.onPluginLoadRequest = function (sResult, oData)
|
||||
PluginsAdminSetting.prototype.onPluginLoadRequest = function (sResult, oData)
|
||||
{
|
||||
if (Enums.StorageResultType.Success === sResult && oData && oData.Result)
|
||||
{
|
||||
require('App:Knoin').showScreenPopup(require('View:Popup:Plugin'), [oData.Result]);
|
||||
require('Knoin/Knoin').showScreenPopup(require('View/Popup/Plugin'), [oData.Result]);
|
||||
}
|
||||
};
|
||||
|
||||
AdminSettingsPlugins.prototype.onPluginDisableRequest = function (sResult, oData)
|
||||
PluginsAdminSetting.prototype.onPluginDisableRequest = function (sResult, oData)
|
||||
{
|
||||
if (Enums.StorageResultType.Success === sResult && oData)
|
||||
{
|
||||
|
|
@ -105,9 +105,9 @@
|
|||
}
|
||||
}
|
||||
|
||||
require('App:Admin').reloadPluginList();
|
||||
require('App/Admin').reloadPluginList();
|
||||
};
|
||||
|
||||
module.exports = AdminSettingsPlugins;
|
||||
module.exports = PluginsAdminSetting;
|
||||
|
||||
}());
|
||||
|
|
@ -11,15 +11,15 @@
|
|||
Utils = require('Common/Utils'),
|
||||
LinkBuilder = require('Common/LinkBuilder'),
|
||||
|
||||
Settings = require('Storage:Settings'),
|
||||
Data = require('Storage:Admin:Data'),
|
||||
Remote = require('Storage:Admin:Remote')
|
||||
Settings = require('Storage/Settings'),
|
||||
Data = require('Storage/Admin/Data'),
|
||||
Remote = require('Storage/Admin/Remote')
|
||||
;
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
*/
|
||||
function AdminSettingsSecurity()
|
||||
function SecurityAdminSetting()
|
||||
{
|
||||
this.useLocalProxyForExternalImages = Data.useLocalProxyForExternalImages;
|
||||
|
||||
|
|
@ -75,7 +75,7 @@
|
|||
this.onNewAdminPasswordResponse = _.bind(this.onNewAdminPasswordResponse, this);
|
||||
}
|
||||
|
||||
AdminSettingsSecurity.prototype.onNewAdminPasswordResponse = function (sResult, oData)
|
||||
SecurityAdminSetting.prototype.onNewAdminPasswordResponse = function (sResult, oData)
|
||||
{
|
||||
if (Enums.StorageResultType.Success === sResult && oData && oData.Result)
|
||||
{
|
||||
|
|
@ -91,10 +91,10 @@
|
|||
}
|
||||
};
|
||||
|
||||
AdminSettingsSecurity.prototype.onBuild = function ()
|
||||
SecurityAdminSetting.prototype.onBuild = function ()
|
||||
{
|
||||
var
|
||||
Remote = require('Storage:Admin:Remote')
|
||||
Remote = require('Storage/Admin/Remote')
|
||||
;
|
||||
|
||||
this.capaOpenPGP.subscribe(function (bValue) {
|
||||
|
|
@ -116,7 +116,7 @@
|
|||
});
|
||||
};
|
||||
|
||||
AdminSettingsSecurity.prototype.onHide = function ()
|
||||
SecurityAdminSetting.prototype.onHide = function ()
|
||||
{
|
||||
this.adminPassword('');
|
||||
this.adminPasswordNew('');
|
||||
|
|
@ -126,11 +126,11 @@
|
|||
/**
|
||||
* @return {string}
|
||||
*/
|
||||
AdminSettingsSecurity.prototype.phpInfoLink = function ()
|
||||
SecurityAdminSetting.prototype.phpInfoLink = function ()
|
||||
{
|
||||
return LinkBuilder.phpInfo();
|
||||
};
|
||||
|
||||
module.exports = AdminSettingsSecurity;
|
||||
module.exports = SecurityAdminSetting;
|
||||
|
||||
}());
|
||||
|
|
@ -14,14 +14,15 @@
|
|||
/**
|
||||
* @constructor
|
||||
*/
|
||||
function AdminSettingsSocial()
|
||||
function SocialAdminSetting()
|
||||
{
|
||||
var Data = require('Storage:Admin:Data');
|
||||
var Data = require('Storage/Admin/Data');
|
||||
|
||||
this.googleEnable = Data.googleEnable;
|
||||
this.googleClientID = Data.googleClientID;
|
||||
this.googleApiKey = Data.googleApiKey;
|
||||
this.googleClientSecret = Data.googleClientSecret;
|
||||
|
||||
this.googleTrigger1 = ko.observable(Enums.SaveSettingsStep.Idle);
|
||||
this.googleTrigger2 = ko.observable(Enums.SaveSettingsStep.Idle);
|
||||
this.googleTrigger3 = ko.observable(Enums.SaveSettingsStep.Idle);
|
||||
|
|
@ -44,11 +45,11 @@
|
|||
this.dropboxTrigger1 = ko.observable(Enums.SaveSettingsStep.Idle);
|
||||
}
|
||||
|
||||
AdminSettingsSocial.prototype.onBuild = function ()
|
||||
SocialAdminSetting.prototype.onBuild = function ()
|
||||
{
|
||||
var
|
||||
self = this,
|
||||
Remote = require('Storage:Admin:Remote')
|
||||
Remote = require('Storage/Admin/Remote')
|
||||
;
|
||||
|
||||
_.delay(function () {
|
||||
|
|
@ -148,6 +149,6 @@
|
|||
}, 50);
|
||||
};
|
||||
|
||||
module.exports = AdminSettingsSocial;
|
||||
module.exports = SocialAdminSetting;
|
||||
|
||||
}());
|
||||
|
|
@ -12,14 +12,14 @@
|
|||
Utils = require('Common/Utils'),
|
||||
LinkBuilder = require('Common/LinkBuilder'),
|
||||
|
||||
Data = require('Storage:RainLoop:Data'),
|
||||
Remote = require('Storage:RainLoop:Remote')
|
||||
Data = require('Storage/App/Data'),
|
||||
Remote = require('Storage/App/Remote')
|
||||
;
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
*/
|
||||
function SettingsAccounts()
|
||||
function AccountsAppSetting()
|
||||
{
|
||||
this.accounts = Data.accounts;
|
||||
|
||||
|
|
@ -46,22 +46,22 @@
|
|||
]});
|
||||
}
|
||||
|
||||
SettingsAccounts.prototype.addNewAccount = function ()
|
||||
AccountsAppSetting.prototype.addNewAccount = function ()
|
||||
{
|
||||
require('App:Knoin').showScreenPopup(require('View:Popup:AddAccount'));
|
||||
require('Knoin/Knoin').showScreenPopup(require('View/Popup/AddAccount'));
|
||||
};
|
||||
|
||||
/**
|
||||
* @param {AccountModel} oAccountToRemove
|
||||
*/
|
||||
SettingsAccounts.prototype.deleteAccount = function (oAccountToRemove)
|
||||
AccountsAppSetting.prototype.deleteAccount = function (oAccountToRemove)
|
||||
{
|
||||
if (oAccountToRemove && oAccountToRemove.deleteAccess())
|
||||
{
|
||||
this.accountForDeletion(null);
|
||||
|
||||
var
|
||||
kn = require('App:Knoin'),
|
||||
kn = require('Knoin/Knoin'),
|
||||
fRemoveAccount = function (oAccount) {
|
||||
return oAccountToRemove === oAccount;
|
||||
}
|
||||
|
|
@ -86,7 +86,7 @@
|
|||
}
|
||||
else
|
||||
{
|
||||
require('App:RainLoop').accountsAndIdentities();
|
||||
require('App/App').accountsAndIdentities();
|
||||
}
|
||||
|
||||
}, oAccountToRemove.email);
|
||||
|
|
@ -94,6 +94,6 @@
|
|||
}
|
||||
};
|
||||
|
||||
module.exports = SettingsAccounts;
|
||||
module.exports = AccountsAppSetting;
|
||||
|
||||
}());
|
||||
|
|
@ -10,13 +10,13 @@
|
|||
Enums = require('Common/Enums'),
|
||||
Utils = require('Common/Utils'),
|
||||
|
||||
Remote = require('Storage:RainLoop:Remote')
|
||||
Remote = require('Storage/App/Remote')
|
||||
;
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
*/
|
||||
function SettingsChangePassword()
|
||||
function ChangePasswordAppSetting()
|
||||
{
|
||||
this.changeProcess = ko.observable(false);
|
||||
|
||||
|
|
@ -76,7 +76,7 @@
|
|||
this.onChangePasswordResponse = _.bind(this.onChangePasswordResponse, this);
|
||||
}
|
||||
|
||||
SettingsChangePassword.prototype.onHide = function ()
|
||||
ChangePasswordAppSetting.prototype.onHide = function ()
|
||||
{
|
||||
this.changeProcess(false);
|
||||
this.currentPassword('');
|
||||
|
|
@ -87,7 +87,7 @@
|
|||
this.currentPassword.error(false);
|
||||
};
|
||||
|
||||
SettingsChangePassword.prototype.onChangePasswordResponse = function (sResult, oData)
|
||||
ChangePasswordAppSetting.prototype.onChangePasswordResponse = function (sResult, oData)
|
||||
{
|
||||
this.changeProcess(false);
|
||||
this.passwordMismatch(false);
|
||||
|
|
@ -116,6 +116,6 @@
|
|||
}
|
||||
};
|
||||
|
||||
module.exports = SettingsChangePassword;
|
||||
module.exports = ChangePasswordAppSetting;
|
||||
|
||||
}());
|
||||
|
|
@ -6,16 +6,14 @@
|
|||
var
|
||||
ko = require('ko'),
|
||||
|
||||
Utils = require('Common/Utils'),
|
||||
|
||||
Remote = require('Storage:RainLoop:Remote'),
|
||||
Data = require('Storage:RainLoop:Data')
|
||||
Remote = require('Storage/App/Remote'),
|
||||
Data = require('Storage/App/Data')
|
||||
;
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
*/
|
||||
function SettingsContacts()
|
||||
function ContactsAppSetting()
|
||||
{
|
||||
this.contactsAutosave = Data.contactsAutosave;
|
||||
|
||||
|
|
@ -44,7 +42,7 @@
|
|||
}, this);
|
||||
}
|
||||
|
||||
SettingsContacts.prototype.onBuild = function ()
|
||||
ContactsAppSetting.prototype.onBuild = function ()
|
||||
{
|
||||
Data.contactsAutosave.subscribe(function (bValue) {
|
||||
Remote.saveSettings(null, {
|
||||
|
|
@ -53,6 +51,6 @@
|
|||
});
|
||||
};
|
||||
|
||||
module.exports = SettingsContacts;
|
||||
module.exports = ContactsAppSetting;
|
||||
|
||||
}());
|
||||
|
|
@ -12,7 +12,7 @@
|
|||
/**
|
||||
* @constructor
|
||||
*/
|
||||
function SettingsFilters()
|
||||
function FiltersAppSetting()
|
||||
{
|
||||
this.filters = ko.observableArray([]);
|
||||
this.filters.loading = ko.observable(false);
|
||||
|
|
@ -22,21 +22,21 @@
|
|||
});
|
||||
}
|
||||
|
||||
SettingsFilters.prototype.deleteFilter = function (oFilter)
|
||||
FiltersAppSetting.prototype.deleteFilter = function (oFilter)
|
||||
{
|
||||
this.filters.remove(oFilter);
|
||||
};
|
||||
|
||||
SettingsFilters.prototype.addFilter = function ()
|
||||
FiltersAppSetting.prototype.addFilter = function ()
|
||||
{
|
||||
var
|
||||
FilterModel = require('Model/Filter')
|
||||
;
|
||||
|
||||
require('App:Knoin').showScreenPopup(
|
||||
require('View:Popup:Filter'), [new FilterModel()]);
|
||||
require('Knoin/Knoin').showScreenPopup(
|
||||
require('View/Popup/Filter'), [new FilterModel()]);
|
||||
};
|
||||
|
||||
module.exports = SettingsFilters;
|
||||
module.exports = FiltersAppSetting;
|
||||
|
||||
}());
|
||||
|
|
@ -9,17 +9,17 @@
|
|||
Enums = require('Common/Enums'),
|
||||
Utils = require('Common/Utils'),
|
||||
|
||||
Settings = require('Storage:Settings'),
|
||||
Data = require('Storage:RainLoop:Data'),
|
||||
Cache = require('Storage:RainLoop:Cache'),
|
||||
Remote = require('Storage:RainLoop:Remote'),
|
||||
LocalStorage = require('Storage:LocalStorage')
|
||||
Settings = require('Storage/Settings'),
|
||||
Data = require('Storage/App/Data'),
|
||||
Cache = require('Storage/App/Cache'),
|
||||
Remote = require('Storage/App/Remote'),
|
||||
Local = require('Storage/Local')
|
||||
;
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
*/
|
||||
function SettingsFolders()
|
||||
function FoldersAppSetting()
|
||||
{
|
||||
this.foldersListError = Data.foldersListError;
|
||||
this.folderList = Data.folderList;
|
||||
|
|
@ -89,7 +89,7 @@
|
|||
this.useImapSubscribe = !!Settings.settingsGet('UseImapSubscribe');
|
||||
}
|
||||
|
||||
SettingsFolders.prototype.folderEditOnEnter = function (oFolder)
|
||||
FoldersAppSetting.prototype.folderEditOnEnter = function (oFolder)
|
||||
{
|
||||
var
|
||||
sEditName = oFolder ? Utils.trim(oFolder.nameForEdit()) : ''
|
||||
|
|
@ -97,7 +97,7 @@
|
|||
|
||||
if ('' !== sEditName && oFolder.name() !== sEditName)
|
||||
{
|
||||
LocalStorage.set(Enums.ClientSideKeyName.FoldersLashHash, '');
|
||||
Local.set(Enums.ClientSideKeyName.FoldersLashHash, '');
|
||||
|
||||
Data.foldersRenaming(true);
|
||||
Remote.folderRename(function (sResult, oData) {
|
||||
|
|
@ -109,7 +109,7 @@
|
|||
oData && oData.ErrorCode ? Utils.getNotification(oData.ErrorCode) : Utils.i18n('NOTIFICATIONS/CANT_RENAME_FOLDER'));
|
||||
}
|
||||
|
||||
require('App:RainLoop').folders();
|
||||
require('App/App').folders();
|
||||
|
||||
}, oFolder.fullNameRaw, sEditName);
|
||||
|
||||
|
|
@ -121,7 +121,7 @@
|
|||
oFolder.edited(false);
|
||||
};
|
||||
|
||||
SettingsFolders.prototype.folderEditOnEsc = function (oFolder)
|
||||
FoldersAppSetting.prototype.folderEditOnEsc = function (oFolder)
|
||||
{
|
||||
if (oFolder)
|
||||
{
|
||||
|
|
@ -129,22 +129,22 @@
|
|||
}
|
||||
};
|
||||
|
||||
SettingsFolders.prototype.onShow = function ()
|
||||
FoldersAppSetting.prototype.onShow = function ()
|
||||
{
|
||||
Data.foldersListError('');
|
||||
};
|
||||
|
||||
SettingsFolders.prototype.createFolder = function ()
|
||||
FoldersAppSetting.prototype.createFolder = function ()
|
||||
{
|
||||
require('App:Knoin').showScreenPopup(require('View:Popup:FolderCreate'));
|
||||
require('Knoin/Knoin').showScreenPopup(require('View/Popup/FolderCreate'));
|
||||
};
|
||||
|
||||
SettingsFolders.prototype.systemFolder = function ()
|
||||
FoldersAppSetting.prototype.systemFolder = function ()
|
||||
{
|
||||
require('App:Knoin').showScreenPopup(require('View:Popup:FolderSystem'));
|
||||
require('Knoin/Knoin').showScreenPopup(require('View/Popup/FolderSystem'));
|
||||
};
|
||||
|
||||
SettingsFolders.prototype.deleteFolder = function (oFolderToRemove)
|
||||
FoldersAppSetting.prototype.deleteFolder = function (oFolderToRemove)
|
||||
{
|
||||
if (oFolderToRemove && oFolderToRemove.canBeDeleted() && oFolderToRemove.deleteAccess() &&
|
||||
0 === oFolderToRemove.privateMessageCountAll())
|
||||
|
|
@ -166,7 +166,7 @@
|
|||
|
||||
if (oFolderToRemove)
|
||||
{
|
||||
LocalStorage.set(Enums.ClientSideKeyName.FoldersLashHash, '');
|
||||
Local.set(Enums.ClientSideKeyName.FoldersLashHash, '');
|
||||
|
||||
Data.folderList.remove(fRemoveFolder);
|
||||
|
||||
|
|
@ -180,7 +180,7 @@
|
|||
oData && oData.ErrorCode ? Utils.getNotification(oData.ErrorCode) : Utils.i18n('NOTIFICATIONS/CANT_DELETE_FOLDER'));
|
||||
}
|
||||
|
||||
require('App:RainLoop').folders();
|
||||
require('App/App').folders();
|
||||
|
||||
}, oFolderToRemove.fullNameRaw);
|
||||
|
||||
|
|
@ -193,22 +193,22 @@
|
|||
}
|
||||
};
|
||||
|
||||
SettingsFolders.prototype.subscribeFolder = function (oFolder)
|
||||
FoldersAppSetting.prototype.subscribeFolder = function (oFolder)
|
||||
{
|
||||
LocalStorage.set(Enums.ClientSideKeyName.FoldersLashHash, '');
|
||||
Local.set(Enums.ClientSideKeyName.FoldersLashHash, '');
|
||||
Remote.folderSetSubscribe(Utils.emptyFunction, oFolder.fullNameRaw, true);
|
||||
|
||||
oFolder.subScribed(true);
|
||||
};
|
||||
|
||||
SettingsFolders.prototype.unSubscribeFolder = function (oFolder)
|
||||
FoldersAppSetting.prototype.unSubscribeFolder = function (oFolder)
|
||||
{
|
||||
LocalStorage.set(Enums.ClientSideKeyName.FoldersLashHash, '');
|
||||
Local.set(Enums.ClientSideKeyName.FoldersLashHash, '');
|
||||
Remote.folderSetSubscribe(Utils.emptyFunction, oFolder.fullNameRaw, false);
|
||||
|
||||
oFolder.subScribed(false);
|
||||
};
|
||||
|
||||
module.exports = SettingsFolders;
|
||||
module.exports = FoldersAppSetting;
|
||||
|
||||
}());
|
||||
|
|
@ -5,23 +5,21 @@
|
|||
|
||||
var
|
||||
_ = require('_'),
|
||||
$ = require('$'),
|
||||
ko = require('ko'),
|
||||
|
||||
Enums = require('Common/Enums'),
|
||||
Consts = require('Common/Consts'),
|
||||
Globals = require('Common/Globals'),
|
||||
Utils = require('Common/Utils'),
|
||||
LinkBuilder = require('Common/LinkBuilder'),
|
||||
|
||||
Data = require('Storage:RainLoop:Data'),
|
||||
Remote = require('Storage:RainLoop:Remote')
|
||||
Data = require('Storage/App/Data'),
|
||||
Remote = require('Storage/App/Remote')
|
||||
;
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
*/
|
||||
function SettingsGeneral()
|
||||
function GeneralAppSetting()
|
||||
{
|
||||
this.mainLanguage = Data.mainLanguage;
|
||||
this.mainMessagesPerPage = Data.mainMessagesPerPage;
|
||||
|
|
@ -57,12 +55,12 @@
|
|||
this.isAnimationSupported = Globals.bAnimationSupported;
|
||||
}
|
||||
|
||||
SettingsGeneral.prototype.toggleLayout = function ()
|
||||
GeneralAppSetting.prototype.toggleLayout = function ()
|
||||
{
|
||||
this.layout(Enums.Layout.NoPreview === this.layout() ? Enums.Layout.SidePreview : Enums.Layout.NoPreview);
|
||||
};
|
||||
|
||||
SettingsGeneral.prototype.onBuild = function ()
|
||||
GeneralAppSetting.prototype.onBuild = function ()
|
||||
{
|
||||
var self = this;
|
||||
|
||||
|
|
@ -158,16 +156,16 @@
|
|||
}, 50);
|
||||
};
|
||||
|
||||
SettingsGeneral.prototype.onShow = function ()
|
||||
GeneralAppSetting.prototype.onShow = function ()
|
||||
{
|
||||
Data.desktopNotifications.valueHasMutated();
|
||||
};
|
||||
|
||||
SettingsGeneral.prototype.selectLanguage = function ()
|
||||
GeneralAppSetting.prototype.selectLanguage = function ()
|
||||
{
|
||||
require('App:Knoin').showScreenPopup(require('View:Popup:Languages'));
|
||||
require('Knoin/Knoin').showScreenPopup(require('View/Popup/Languages'));
|
||||
};
|
||||
|
||||
module.exports = SettingsGeneral;
|
||||
module.exports = GeneralAppSetting;
|
||||
|
||||
}());
|
||||
|
|
@ -11,14 +11,14 @@
|
|||
Utils = require('Common/Utils'),
|
||||
HtmlEditor = require('Common/HtmlEditor'),
|
||||
|
||||
Data = require('Storage:RainLoop:Data'),
|
||||
Remote = require('Storage:RainLoop:Remote')
|
||||
Data = require('Storage/App/Data'),
|
||||
Remote = require('Storage/App/Remote')
|
||||
;
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
*/
|
||||
function SettingsIdentities()
|
||||
function IdentitiesAppSetting()
|
||||
{
|
||||
this.editor = null;
|
||||
this.defautOptionsAfterRender = Utils.defautOptionsAfterRender;
|
||||
|
|
@ -100,7 +100,7 @@
|
|||
*
|
||||
* @return {string}
|
||||
*/
|
||||
SettingsIdentities.prototype.formattedAccountIdentity = function ()
|
||||
IdentitiesAppSetting.prototype.formattedAccountIdentity = function ()
|
||||
{
|
||||
var
|
||||
sDisplayName = this.displayName.peek(),
|
||||
|
|
@ -110,20 +110,20 @@
|
|||
return '' === sDisplayName ? sEmail : '"' + Utils.quoteName(sDisplayName) + '" <' + sEmail + '>';
|
||||
};
|
||||
|
||||
SettingsIdentities.prototype.addNewIdentity = function ()
|
||||
IdentitiesAppSetting.prototype.addNewIdentity = function ()
|
||||
{
|
||||
require('App:Knoin').showScreenPopup(require('View:Popup:Identity'));
|
||||
require('Knoin/Knoin').showScreenPopup(require('View/Popup/Identity'));
|
||||
};
|
||||
|
||||
SettingsIdentities.prototype.editIdentity = function (oIdentity)
|
||||
IdentitiesAppSetting.prototype.editIdentity = function (oIdentity)
|
||||
{
|
||||
require('App:Knoin').showScreenPopup(require('View:Popup:Identity'), [oIdentity]);
|
||||
require('Knoin/Knoin').showScreenPopup(require('View/Popup/Identity'), [oIdentity]);
|
||||
};
|
||||
|
||||
/**
|
||||
* @param {IdentityModel} oIdentityToRemove
|
||||
*/
|
||||
SettingsIdentities.prototype.deleteIdentity = function (oIdentityToRemove)
|
||||
IdentitiesAppSetting.prototype.deleteIdentity = function (oIdentityToRemove)
|
||||
{
|
||||
if (oIdentityToRemove && oIdentityToRemove.deleteAccess())
|
||||
{
|
||||
|
|
@ -140,13 +140,13 @@
|
|||
this.identities.remove(fRemoveFolder);
|
||||
|
||||
Remote.identityDelete(function () {
|
||||
require('App:RainLoop').accountsAndIdentities();
|
||||
require('App/App').accountsAndIdentities();
|
||||
}, oIdentityToRemove.id);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
SettingsIdentities.prototype.onFocus = function ()
|
||||
IdentitiesAppSetting.prototype.onFocus = function ()
|
||||
{
|
||||
if (!this.editor && this.signatureDom())
|
||||
{
|
||||
|
|
@ -172,7 +172,7 @@
|
|||
}
|
||||
};
|
||||
|
||||
SettingsIdentities.prototype.onBuild = function (oDom)
|
||||
IdentitiesAppSetting.prototype.onBuild = function (oDom)
|
||||
{
|
||||
var self = this;
|
||||
|
||||
|
|
@ -228,6 +228,6 @@
|
|||
}, 50);
|
||||
};
|
||||
|
||||
module.exports = SettingsIdentities;
|
||||
module.exports = IdentitiesAppSetting;
|
||||
|
||||
}());
|
||||
|
|
@ -11,14 +11,14 @@
|
|||
Utils = require('Common/Utils'),
|
||||
HtmlEditor = require('Common/HtmlEditor'),
|
||||
|
||||
Data = require('Storage:RainLoop:Data'),
|
||||
Remote = require('Storage:RainLoop:Remote')
|
||||
Data = require('Storage/App/Data'),
|
||||
Remote = require('Storage/App/Remote')
|
||||
;
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
*/
|
||||
function SettingsIdentity()
|
||||
function IdentityAppSetting()
|
||||
{
|
||||
this.editor = null;
|
||||
|
||||
|
|
@ -34,7 +34,7 @@
|
|||
this.signatureTrigger = ko.observable(Enums.SaveSettingsStep.Idle);
|
||||
}
|
||||
|
||||
SettingsIdentity.prototype.onFocus = function ()
|
||||
IdentityAppSetting.prototype.onFocus = function ()
|
||||
{
|
||||
if (!this.editor && this.signatureDom())
|
||||
{
|
||||
|
|
@ -60,7 +60,7 @@
|
|||
}
|
||||
};
|
||||
|
||||
SettingsIdentity.prototype.onBuild = function ()
|
||||
IdentityAppSetting.prototype.onBuild = function ()
|
||||
{
|
||||
var self = this;
|
||||
_.delay(function () {
|
||||
|
|
@ -98,6 +98,6 @@
|
|||
}, 50);
|
||||
};
|
||||
|
||||
module.exports = SettingsIdentity;
|
||||
module.exports = IdentityAppSetting;
|
||||
|
||||
}());
|
||||
|
|
@ -6,15 +6,15 @@
|
|||
var
|
||||
ko = require('ko'),
|
||||
|
||||
kn = require('App:Knoin'),
|
||||
kn = require('Knoin/Knoin'),
|
||||
|
||||
Data = require('Storage:RainLoop:Data')
|
||||
Data = require('Storage/App/Data')
|
||||
;
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
*/
|
||||
function SettingsOpenPGP()
|
||||
function OpenPGPAppSetting()
|
||||
{
|
||||
this.openpgpkeys = Data.openpgpkeys;
|
||||
this.openpgpkeysPublic = Data.openpgpkeysPublic;
|
||||
|
|
@ -35,28 +35,28 @@
|
|||
]});
|
||||
}
|
||||
|
||||
SettingsOpenPGP.prototype.addOpenPgpKey = function ()
|
||||
OpenPGPAppSetting.prototype.addOpenPgpKey = function ()
|
||||
{
|
||||
kn.showScreenPopup(require('View:Popup:AddOpenPgpKey'));
|
||||
kn.showScreenPopup(require('View/Popup/AddOpenPgpKey'));
|
||||
};
|
||||
|
||||
SettingsOpenPGP.prototype.generateOpenPgpKey = function ()
|
||||
OpenPGPAppSetting.prototype.generateOpenPgpKey = function ()
|
||||
{
|
||||
kn.showScreenPopup(require('View:Popup:NewOpenPgpKey'));
|
||||
kn.showScreenPopup(require('View/Popup/NewOpenPgpKey'));
|
||||
};
|
||||
|
||||
SettingsOpenPGP.prototype.viewOpenPgpKey = function (oOpenPgpKey)
|
||||
OpenPGPAppSetting.prototype.viewOpenPgpKey = function (oOpenPgpKey)
|
||||
{
|
||||
if (oOpenPgpKey)
|
||||
{
|
||||
kn.showScreenPopup(require('View:Popup:ViewOpenPgpKey'), [oOpenPgpKey]);
|
||||
kn.showScreenPopup(require('View/Popup/ViewOpenPgpKey'), [oOpenPgpKey]);
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* @param {OpenPgpKeyModel} oOpenPgpKeyToRemove
|
||||
*/
|
||||
SettingsOpenPGP.prototype.deleteOpenPgpKey = function (oOpenPgpKeyToRemove)
|
||||
OpenPGPAppSetting.prototype.deleteOpenPgpKey = function (oOpenPgpKeyToRemove)
|
||||
{
|
||||
if (oOpenPgpKeyToRemove && oOpenPgpKeyToRemove.deleteAccess())
|
||||
{
|
||||
|
|
@ -73,11 +73,11 @@
|
|||
|
||||
Data.openpgpKeyring.store();
|
||||
|
||||
require('App:RainLoop').reloadOpenPgpKeys();
|
||||
require('App/App').reloadOpenPgpKeys();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
module.exports = SettingsOpenPGP;
|
||||
module.exports = OpenPGPAppSetting;
|
||||
|
||||
}());
|
||||
|
|
@ -10,13 +10,13 @@
|
|||
Globals = require('Common/Globals'),
|
||||
Utils = require('Common/Utils'),
|
||||
|
||||
Remote = require('Storage:RainLoop:Remote')
|
||||
Remote = require('Storage/App/Remote')
|
||||
;
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
*/
|
||||
function SettingsSecurity()
|
||||
function SecurityAppSetting()
|
||||
{
|
||||
this.processing = ko.observable(false);
|
||||
this.clearing = ko.observable(false);
|
||||
|
|
@ -46,37 +46,37 @@
|
|||
this.onSecretResult = _.bind(this.onSecretResult, this);
|
||||
}
|
||||
|
||||
SettingsSecurity.prototype.showSecret = function ()
|
||||
SecurityAppSetting.prototype.showSecret = function ()
|
||||
{
|
||||
this.secreting(true);
|
||||
Remote.showTwoFactorSecret(this.onSecretResult);
|
||||
};
|
||||
|
||||
SettingsSecurity.prototype.hideSecret = function ()
|
||||
SecurityAppSetting.prototype.hideSecret = function ()
|
||||
{
|
||||
this.viewSecret('');
|
||||
this.viewBackupCodes('');
|
||||
this.viewUrl('');
|
||||
};
|
||||
|
||||
SettingsSecurity.prototype.createTwoFactor = function ()
|
||||
SecurityAppSetting.prototype.createTwoFactor = function ()
|
||||
{
|
||||
this.processing(true);
|
||||
Remote.createTwoFactor(this.onResult);
|
||||
};
|
||||
|
||||
SettingsSecurity.prototype.enableTwoFactor = function ()
|
||||
SecurityAppSetting.prototype.enableTwoFactor = function ()
|
||||
{
|
||||
this.processing(true);
|
||||
Remote.enableTwoFactor(this.onResult, this.viewEnable());
|
||||
};
|
||||
|
||||
SettingsSecurity.prototype.testTwoFactor = function ()
|
||||
SecurityAppSetting.prototype.testTwoFactor = function ()
|
||||
{
|
||||
require('App:Knoin').showScreenPopup(require('View:Popup:TwoFactorTest'));
|
||||
require('Knoin/Knoin').showScreenPopup(require('View/Popup/TwoFactorTest'));
|
||||
};
|
||||
|
||||
SettingsSecurity.prototype.clearTwoFactor = function ()
|
||||
SecurityAppSetting.prototype.clearTwoFactor = function ()
|
||||
{
|
||||
this.viewSecret('');
|
||||
this.viewBackupCodes('');
|
||||
|
|
@ -86,14 +86,14 @@
|
|||
Remote.clearTwoFactor(this.onResult);
|
||||
};
|
||||
|
||||
SettingsSecurity.prototype.onShow = function ()
|
||||
SecurityAppSetting.prototype.onShow = function ()
|
||||
{
|
||||
this.viewSecret('');
|
||||
this.viewBackupCodes('');
|
||||
this.viewUrl('');
|
||||
};
|
||||
|
||||
SettingsSecurity.prototype.onResult = function (sResult, oData)
|
||||
SecurityAppSetting.prototype.onResult = function (sResult, oData)
|
||||
{
|
||||
this.processing(false);
|
||||
this.clearing(false);
|
||||
|
|
@ -139,7 +139,7 @@
|
|||
}
|
||||
};
|
||||
|
||||
SettingsSecurity.prototype.onSecretResult = function (sResult, oData)
|
||||
SecurityAppSetting.prototype.onSecretResult = function (sResult, oData)
|
||||
{
|
||||
this.secreting(false);
|
||||
|
||||
|
|
@ -155,12 +155,12 @@
|
|||
}
|
||||
};
|
||||
|
||||
SettingsSecurity.prototype.onBuild = function ()
|
||||
SecurityAppSetting.prototype.onBuild = function ()
|
||||
{
|
||||
this.processing(true);
|
||||
Remote.getTwoFactor(this.onResult);
|
||||
};
|
||||
|
||||
module.exports = SettingsSecurity;
|
||||
module.exports = SecurityAppSetting;
|
||||
|
||||
}());
|
||||
|
|
@ -6,11 +6,11 @@
|
|||
/**
|
||||
* @constructor
|
||||
*/
|
||||
function SettingsSocial()
|
||||
function SocialAppSetting()
|
||||
{
|
||||
var
|
||||
Utils = require('Common/Utils'),
|
||||
Data = require('Storage:RainLoop:Data')
|
||||
Data = require('Storage/App/Data')
|
||||
;
|
||||
|
||||
this.googleEnable = Data.googleEnable;
|
||||
|
|
@ -34,43 +34,43 @@
|
|||
this.connectGoogle = Utils.createCommand(this, function () {
|
||||
if (!this.googleLoggined())
|
||||
{
|
||||
require('App:RainLoop').googleConnect();
|
||||
require('App/App').googleConnect();
|
||||
}
|
||||
}, function () {
|
||||
return !this.googleLoggined() && !this.googleActions();
|
||||
});
|
||||
|
||||
this.disconnectGoogle = Utils.createCommand(this, function () {
|
||||
require('App:RainLoop').googleDisconnect();
|
||||
require('App/App').googleDisconnect();
|
||||
});
|
||||
|
||||
this.connectFacebook = Utils.createCommand(this, function () {
|
||||
if (!this.facebookLoggined())
|
||||
{
|
||||
require('App:RainLoop').facebookConnect();
|
||||
require('App/App').facebookConnect();
|
||||
}
|
||||
}, function () {
|
||||
return !this.facebookLoggined() && !this.facebookActions();
|
||||
});
|
||||
|
||||
this.disconnectFacebook = Utils.createCommand(this, function () {
|
||||
require('App:RainLoop').facebookDisconnect();
|
||||
require('App/App').facebookDisconnect();
|
||||
});
|
||||
|
||||
this.connectTwitter = Utils.createCommand(this, function () {
|
||||
if (!this.twitterLoggined())
|
||||
{
|
||||
require('App:RainLoop').twitterConnect();
|
||||
require('App/App').twitterConnect();
|
||||
}
|
||||
}, function () {
|
||||
return !this.twitterLoggined() && !this.twitterActions();
|
||||
});
|
||||
|
||||
this.disconnectTwitter = Utils.createCommand(this, function () {
|
||||
require('App:RainLoop').twitterDisconnect();
|
||||
require('App/App').twitterDisconnect();
|
||||
});
|
||||
}
|
||||
|
||||
module.exports = SettingsSocial;
|
||||
module.exports = SocialAppSetting;
|
||||
|
||||
}());
|
||||
|
|
@ -13,14 +13,14 @@
|
|||
Utils = require('Common/Utils'),
|
||||
LinkBuilder = require('Common/LinkBuilder'),
|
||||
|
||||
Data = require('Storage:RainLoop:Data'),
|
||||
Remote = require('Storage:RainLoop:Remote')
|
||||
Data = require('Storage/App/Data'),
|
||||
Remote = require('Storage/App/Remote')
|
||||
;
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
*/
|
||||
function SettingsThemes()
|
||||
function ThemesAppSetting()
|
||||
{
|
||||
var self = this;
|
||||
|
||||
|
|
@ -114,7 +114,7 @@
|
|||
}, this);
|
||||
}
|
||||
|
||||
SettingsThemes.prototype.onBuild = function ()
|
||||
ThemesAppSetting.prototype.onBuild = function ()
|
||||
{
|
||||
var sCurrentTheme = Data.theme();
|
||||
this.themesObjects(_.map(Data.themes(), function (sTheme) {
|
||||
|
|
@ -127,6 +127,6 @@
|
|||
}));
|
||||
};
|
||||
|
||||
module.exports = SettingsThemes;
|
||||
module.exports = ThemesAppSetting;
|
||||
|
||||
}());
|
||||
Loading…
Add table
Add a link
Reference in a new issue