snappymail/dev/View/App/Settings/Menu.js

48 lines
912 B
JavaScript
Raw Normal View History

(function () {
'use strict';
var
_ = require('_'),
Globals = require('Common/Globals'),
2014-10-06 02:37:31 +08:00
Links = require('Common/Links'),
kn = require('Knoin/Knoin'),
AbstractView = require('Knoin/AbstractView')
;
/**
* @param {?} oScreen
*
* @constructor
* @extends AbstractView
*/
function MenuSettingsAppView(oScreen)
{
AbstractView.call(this, 'Left', 'SettingsMenu');
this.leftPanelDisabled = Globals.leftPanelDisabled;
this.menu = oScreen.menu;
kn.constructorEnd(this);
}
kn.extendAsViewModel(['View/App/Settings/Menu', 'SettingsMenuViewModel'], MenuSettingsAppView);
_.extend(MenuSettingsAppView.prototype, AbstractView.prototype);
MenuSettingsAppView.prototype.link = function (sRoute)
{
2014-10-06 02:37:31 +08:00
return Links.settings(sRoute);
};
MenuSettingsAppView.prototype.backToMailBoxClick = function ()
{
2014-10-06 02:37:31 +08:00
kn.setHash(Links.inbox());
};
module.exports = MenuSettingsAppView;
}());