snappymail/dev/ViewModels/SettingsMenuViewModel.js
2014-08-27 19:59:44 +04:00

46 lines
No EOL
954 B
JavaScript

/* RainLoop Webmail (c) RainLoop Team | Licensed under CC BY-NC-SA 3.0 */
(function (module, require) {
'use strict';
var
LinkBuilder = require('LinkBuilder'),
Globals = require('Globals'),
kn = require('App:Knoin'),
KnoinAbstractViewModel = require('Knoin:AbstractViewModel')
;
/**
* @param {?} oScreen
*
* @constructor
* @extends KnoinAbstractViewModel
*/
function SettingsMenuViewModel(oScreen)
{
KnoinAbstractViewModel.call(this, 'Left', 'SettingsMenu');
this.leftPanelDisabled = Globals.leftPanelDisabled;
this.menu = oScreen.menu;
kn.constructorEnd(this);
}
kn.extendAsViewModel('SettingsMenuViewModel', SettingsMenuViewModel);
SettingsMenuViewModel.prototype.link = function (sRoute)
{
return LinkBuilder.settings(sRoute);
};
SettingsMenuViewModel.prototype.backToMailBoxClick = function ()
{
kn.setHash(LinkBuilder.inbox());
};
module.exports = SettingsMenuViewModel;
}(module, require));