mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-30 12:39:20 +03:00
Fix js error (TypeError: Cannot call method 'settingsGet' of undefined)
+ small other fixes
This commit is contained in:
parent
cf0968b5a8
commit
726fa6982b
12 changed files with 87 additions and 124 deletions
|
|
@ -35,20 +35,6 @@ function AdminGeneral()
|
|||
return Utils.convertLangName(this.mainLanguage());
|
||||
}, this);
|
||||
|
||||
this.languagesOptions = ko.computed(function () {
|
||||
return _.map(oData.languages(), function (sLanguage) {
|
||||
var
|
||||
sName = Utils.convertLangName(sLanguage),
|
||||
sEn = Utils.convertLangName(sLanguage, true)
|
||||
;
|
||||
|
||||
return {
|
||||
'optValue': sLanguage,
|
||||
'optText': sName + (sEn !== sName ? ' (' + sEn + ')' : '')
|
||||
};
|
||||
});
|
||||
});
|
||||
|
||||
this.contactsSupported = RL.settingsGet('ContactsIsSupported');
|
||||
this.contactsIsAllowed = RL.settingsGet('ContactsIsAllowed');
|
||||
this.weakPassword = !!RL.settingsGet('WeakPassword');
|
||||
|
|
|
|||
|
|
@ -143,15 +143,12 @@ AbstractApp.prototype.settingsSet = function (sName, mValue)
|
|||
AbstractApp.prototype.setTitle = function (sTitle)
|
||||
{
|
||||
sTitle = ((0 < sTitle.length) ? sTitle + ' - ' : '') +
|
||||
this.settingsGet('Title') || '';
|
||||
RL.settingsGet('Title') || '';
|
||||
|
||||
if (sTitle !== window.document.title)
|
||||
{
|
||||
window.document.title = sTitle;
|
||||
_.delay(function () {
|
||||
window.document.title = sTitle;
|
||||
_.delay(function () {
|
||||
window.document.title = sTitle;
|
||||
}, 5);
|
||||
}
|
||||
}, 5);
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -161,8 +158,8 @@ AbstractApp.prototype.setTitle = function (sTitle)
|
|||
AbstractApp.prototype.loginAndLogoutReload = function (bLogout, bClose)
|
||||
{
|
||||
var
|
||||
sCustomLogoutLink = Utils.pString(this.settingsGet('CustomLogoutLink')),
|
||||
bInIframe = !!this.settingsGet('InIframe')
|
||||
sCustomLogoutLink = Utils.pString(RL.settingsGet('CustomLogoutLink')),
|
||||
bInIframe = !!RL.settingsGet('InIframe')
|
||||
;
|
||||
|
||||
bLogout = Utils.isUnd(bLogout) ? false : !!bLogout;
|
||||
|
|
|
|||
|
|
@ -200,7 +200,7 @@ AdminApp.prototype.bootstart = function ()
|
|||
|
||||
kn.hideLoading();
|
||||
|
||||
if (!this.settingsGet('AllowAdminPanel'))
|
||||
if (!RL.settingsGet('AllowAdminPanel'))
|
||||
{
|
||||
kn.routeOff();
|
||||
kn.setHash(RL.link().root(), true);
|
||||
|
|
@ -212,10 +212,10 @@ AdminApp.prototype.bootstart = function ()
|
|||
}
|
||||
else
|
||||
{
|
||||
if (!!this.settingsGet('Auth'))
|
||||
if (!!RL.settingsGet('Auth'))
|
||||
{
|
||||
// TODO
|
||||
// if (!this.settingsGet('AllowPackages') && AdminPackages)
|
||||
// if (!RL.settingsGet('AllowPackages') && AdminPackages)
|
||||
// {
|
||||
// Utils.disableSettingsViewModel(AdminPackages);
|
||||
// }
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ function RainLoopApp()
|
|||
|
||||
$.wakeUp(function (iSleepTime) {
|
||||
RL.remote().jsInfo(Utils.emptyFunction, {
|
||||
'Version': this.settingsGet('Version'),
|
||||
'Version': RL.settingsGet('Version'),
|
||||
'WakeUpTime': Math.round(iSleepTime / 1000)
|
||||
}, true);
|
||||
}, {}, 60 * 60 * 1000);
|
||||
|
|
@ -564,23 +564,23 @@ RainLoopApp.prototype.bootstart = function ()
|
|||
|
||||
var
|
||||
sCustomLoginLink = '',
|
||||
sJsHash = this.settingsGet('JsHash'),
|
||||
bGoogle = this.settingsGet('AllowGoogleSocial'),
|
||||
bFacebook = this.settingsGet('AllowFacebookSocial'),
|
||||
bTwitter = this.settingsGet('AllowTwitterSocial')
|
||||
sJsHash = RL.settingsGet('JsHash'),
|
||||
bGoogle = RL.settingsGet('AllowGoogleSocial'),
|
||||
bFacebook = RL.settingsGet('AllowFacebookSocial'),
|
||||
bTwitter = RL.settingsGet('AllowTwitterSocial')
|
||||
;
|
||||
|
||||
if (!this.settingsGet('AllowChangePassword'))
|
||||
if (!RL.settingsGet('AllowChangePassword'))
|
||||
{
|
||||
Utils.removeSettingsViewModel(SettingsChangePasswordScreen);
|
||||
}
|
||||
|
||||
if (!this.settingsGet('AllowAdditionalAccounts'))
|
||||
if (!RL.settingsGet('AllowAdditionalAccounts'))
|
||||
{
|
||||
Utils.removeSettingsViewModel(SettingsAccounts);
|
||||
}
|
||||
|
||||
if (this.settingsGet('AllowIdentities'))
|
||||
if (RL.settingsGet('AllowIdentities'))
|
||||
{
|
||||
Utils.removeSettingsViewModel(SettingsIdentity);
|
||||
}
|
||||
|
|
@ -594,7 +594,7 @@ RainLoopApp.prototype.bootstart = function ()
|
|||
Utils.removeSettingsViewModel(SettingsSocialScreen);
|
||||
}
|
||||
|
||||
if (!this.settingsGet('AllowThemes'))
|
||||
if (!RL.settingsGet('AllowThemes'))
|
||||
{
|
||||
Utils.removeSettingsViewModel(SettingsThemes);
|
||||
}
|
||||
|
|
@ -625,7 +625,7 @@ RainLoopApp.prototype.bootstart = function ()
|
|||
window.SimplePace.sleep();
|
||||
}
|
||||
|
||||
if (!!this.settingsGet('Auth'))
|
||||
if (!!RL.settingsGet('Auth'))
|
||||
{
|
||||
this.setTitle(Utils.i18n('TITLES/LOADING'));
|
||||
|
||||
|
|
@ -699,7 +699,7 @@ RainLoopApp.prototype.bootstart = function ()
|
|||
}
|
||||
else
|
||||
{
|
||||
sCustomLoginLink = Utils.pString(this.settingsGet('CustomLoginLink'));
|
||||
sCustomLoginLink = Utils.pString(RL.settingsGet('CustomLoginLink'));
|
||||
if (!sCustomLoginLink)
|
||||
{
|
||||
kn.hideLoading();
|
||||
|
|
|
|||
|
|
@ -8,16 +8,16 @@ $window.unload(function () {
|
|||
});
|
||||
|
||||
// export
|
||||
window.rl = window.rl || {};
|
||||
window.rl.addHook = Plugins.addHook;
|
||||
window.rl.settingsGet = Plugins.mainSettingsGet;
|
||||
window.rl.remoteRequest = Plugins.remoteRequest;
|
||||
window.rl.pluginSettingsGet = Plugins.settingsGet;
|
||||
window.rl.addSettingsViewModel = Utils.addSettingsViewModel;
|
||||
window.rl.createCommand = Utils.createCommand;
|
||||
window['rl'] = window['rl'] || {};
|
||||
window['rl']['addHook'] = Plugins.addHook;
|
||||
window['rl']['settingsGet'] = Plugins.mainSettingsGet;
|
||||
window['rl']['remoteRequest'] = Plugins.remoteRequest;
|
||||
window['rl']['pluginSettingsGet'] = Plugins.settingsGet;
|
||||
window['rl']['addSettingsViewModel'] = Utils.addSettingsViewModel;
|
||||
window['rl']['createCommand'] = Utils.createCommand;
|
||||
|
||||
window.rl.EmailModel = EmailModel;
|
||||
window.rl.Enums = Enums;
|
||||
window['rl']['EmailModel'] = EmailModel;
|
||||
window['rl']['Enums'] = Enums;
|
||||
|
||||
window['__RLBOOT'] = function (fCall) {
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue