snappymail/dev/Screens/Settings.js

46 lines
1.2 KiB
JavaScript
Raw Normal View History

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