snappymail/dev/Screens/SettingsScreen.js

55 lines
1.3 KiB
JavaScript
Raw Normal View History

/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
2014-08-25 15:10:51 +08:00
'use strict';
2014-08-20 23:03:12 +08:00
(function (module) {
var
2014-08-21 23:08:34 +08:00
_ = require('../External/underscore.js'),
2014-08-25 15:10:51 +08:00
2014-08-21 23:08:34 +08:00
Enums = require('../Common/Enums.js'),
Utils = require('../Common/Utils.js'),
2014-08-22 23:08:56 +08:00
Globals = require('../Common/Globals.js'),
AbstractSettings = require('./AbstractSettings.js')
2014-08-20 23:03:12 +08:00
;
/**
* @constructor
* @extends AbstractSettings
*/
function SettingsScreen()
{
2014-08-22 23:08:56 +08:00
var
RL = require('../Boots/RainLoopApp.js'),
2014-08-25 15:10:51 +08:00
2014-08-22 23:08:56 +08:00
SettingsSystemDropDownViewModel = require('../ViewModels/SettingsSystemDropDownViewModel.js'),
SettingsMenuViewModel = require('../ViewModels/SettingsMenuViewModel.js'),
SettingsPaneViewModel = require('../ViewModels/SettingsPaneViewModel.js')
;
2014-08-20 23:03:12 +08:00
AbstractSettings.call(this, [
SettingsSystemDropDownViewModel,
SettingsMenuViewModel,
SettingsPaneViewModel
]);
Utils.initOnStartOrLangChange(function () {
this.sSettingsTitle = Utils.i18n('TITLES/SETTINGS');
}, this, function () {
2014-08-22 23:08:56 +08:00
RL.setTitle(this.sSettingsTitle);
2014-08-20 23:03:12 +08:00
});
}
_.extend(SettingsScreen.prototype, AbstractSettings.prototype);
SettingsScreen.prototype.onShow = function ()
{
2014-08-22 23:08:56 +08:00
var RL = require('../Boots/RainLoopApp.js');
2014-08-25 15:10:51 +08:00
2014-08-22 23:08:56 +08:00
RL.setTitle(this.sSettingsTitle);
Globals.keyScope(Enums.KeyState.Settings);
2014-08-20 23:03:12 +08:00
};
module.exports = SettingsScreen;
}(module));