snappymail/dev/Screen/Admin/Settings.js

97 lines
2.5 KiB
JavaScript
Raw Normal View History

2016-06-07 05:57:52 +08:00
/* global RL_COMMUNITY */
(function () {
'use strict';
var
_ = require('_'),
kn = require('Knoin/Knoin'),
Plugins = require('Common/Plugins'),
AbstractSettings = require('Screen/AbstractSettings')
;
/**
* @constructor
* @extends AbstractSettings
*/
function SettingsAdminScreen()
{
AbstractSettings.call(this, [
require('View/Admin/Settings/Menu'),
require('View/Admin/Settings/Pane')
]);
}
_.extend(SettingsAdminScreen.prototype, AbstractSettings.prototype);
/**
* @param {Function=} fCallback
*/
SettingsAdminScreen.prototype.setupSettings = function (fCallback)
{
kn.addSettingsViewModel(require('Settings/Admin/General'),
2015-03-28 06:06:56 +08:00
'AdminSettingsGeneral', 'TABS_LABELS/LABEL_GENERAL_NAME', 'general', true);
kn.addSettingsViewModel(require('Settings/Admin/Login'),
2015-03-28 06:06:56 +08:00
'AdminSettingsLogin', 'TABS_LABELS/LABEL_LOGIN_NAME', 'login');
2015-05-03 04:22:32 +08:00
if (RL_COMMUNITY)
{
kn.addSettingsViewModel(require('Settings/Admin/Branding'),
'AdminSettingsBranding', 'TABS_LABELS/LABEL_BRANDING_NAME', 'branding');
}
else
{
kn.addSettingsViewModel(require('Settings/Admin/Prem/Branding'),
'AdminSettingsBranding', 'TABS_LABELS/LABEL_BRANDING_NAME', 'branding');
}
kn.addSettingsViewModel(require('Settings/Admin/Contacts'),
2015-03-28 06:06:56 +08:00
'AdminSettingsContacts', 'TABS_LABELS/LABEL_CONTACTS_NAME', 'contacts');
kn.addSettingsViewModel(require('Settings/Admin/Domains'),
2015-03-28 06:06:56 +08:00
'AdminSettingsDomains', 'TABS_LABELS/LABEL_DOMAINS_NAME', 'domains');
kn.addSettingsViewModel(require('Settings/Admin/Security'),
2015-03-28 06:06:56 +08:00
'AdminSettingsSecurity', 'TABS_LABELS/LABEL_SECURITY_NAME', 'security');
kn.addSettingsViewModel(require('Settings/Admin/Social'),
2015-03-28 06:06:56 +08:00
'AdminSettingsSocial', 'TABS_LABELS/LABEL_INTEGRATION_NAME', 'integrations');
kn.addSettingsViewModel(require('Settings/Admin/Plugins'),
2015-03-28 06:06:56 +08:00
'AdminSettingsPlugins', 'TABS_LABELS/LABEL_PLUGINS_NAME', 'plugins');
2015-05-20 21:09:21 +08:00
kn.addSettingsViewModel(require('Settings/Admin/Packages'),
'AdminSettingsPackages', 'TABS_LABELS/LABEL_PACKAGES_NAME', 'packages');
2015-05-03 04:22:32 +08:00
if (!RL_COMMUNITY)
{
kn.addSettingsViewModel(require('Settings/Admin/Prem/Licensing'),
'AdminSettingsLicensing', 'TABS_LABELS/LABEL_LICENSING_NAME', 'licensing');
}
kn.addSettingsViewModel(require('Settings/Admin/About'),
2015-03-28 06:06:56 +08:00
'AdminSettingsAbout', 'TABS_LABELS/LABEL_ABOUT_NAME', 'about');
Plugins.runSettingsViewModelHooks(true);
if (fCallback)
{
fCallback();
}
};
SettingsAdminScreen.prototype.onShow = function ()
{
2015-11-19 01:32:29 +08:00
require('App/Admin').default.setWindowTitle('');
};
module.exports = SettingsAdminScreen;
2016-06-28 04:54:38 +08:00
}());