snappymail/dev/Screens/SettingsScreen.js

56 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 23:49:01 +08:00
(function (module, require) {
'use strict';
2014-08-20 23:03:12 +08:00
var
2014-08-25 23:49:01 +08:00
_ = require('_'),
2014-08-25 15:10:51 +08:00
2014-08-25 23:49:01 +08:00
Enums = require('Enums'),
Utils = require('Utils'),
Globals = require('Globals'),
2014-08-22 23:08:56 +08:00
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
2014-08-26 23:24:47 +08:00
App = require('../Apps/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-26 23:24:47 +08:00
App.setTitle(this.sSettingsTitle);
2014-08-20 23:03:12 +08:00
});
}
_.extend(SettingsScreen.prototype, AbstractSettings.prototype);
SettingsScreen.prototype.onShow = function ()
{
2014-08-26 23:24:47 +08:00
var App = require('../Apps/RainLoopApp.js');
2014-08-25 15:10:51 +08:00
2014-08-26 23:24:47 +08:00
App.setTitle(this.sSettingsTitle);
2014-08-22 23:08:56 +08:00
Globals.keyScope(Enums.KeyState.Settings);
2014-08-20 23:03:12 +08:00
};
module.exports = SettingsScreen;
2014-08-25 23:49:01 +08:00
}(module, require));