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