mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-30 04:29:21 +03:00
Code refactoring
This commit is contained in:
parent
345e7c58af
commit
8cf8b94d39
103 changed files with 664 additions and 659 deletions
50
dev/View/User/Settings/Menu.js
Normal file
50
dev/View/User/Settings/Menu.js
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
|
||||
(function () {
|
||||
|
||||
'use strict';
|
||||
|
||||
var
|
||||
_ = require('_'),
|
||||
|
||||
Globals = require('Common/Globals'),
|
||||
Links = require('Common/Links'),
|
||||
|
||||
Cache = require('Storage/User/Cache'),
|
||||
|
||||
kn = require('Knoin/Knoin'),
|
||||
AbstractView = require('Knoin/AbstractView')
|
||||
;
|
||||
|
||||
/**
|
||||
* @param {?} oScreen
|
||||
*
|
||||
* @constructor
|
||||
* @extends AbstractView
|
||||
*/
|
||||
function MenuSettingsUserView(oScreen)
|
||||
{
|
||||
AbstractView.call(this, 'Left', 'SettingsMenu');
|
||||
|
||||
this.leftPanelDisabled = Globals.leftPanelDisabled;
|
||||
|
||||
this.menu = oScreen.menu;
|
||||
|
||||
kn.constructorEnd(this);
|
||||
}
|
||||
|
||||
kn.extendAsViewModel(['View/User/Settings/Menu', 'View/App/Settings/Menu', 'SettingsMenuViewModel'], MenuSettingsUserView);
|
||||
_.extend(MenuSettingsUserView.prototype, AbstractView.prototype);
|
||||
|
||||
MenuSettingsUserView.prototype.link = function (sRoute)
|
||||
{
|
||||
return Links.settings(sRoute);
|
||||
};
|
||||
|
||||
MenuSettingsUserView.prototype.backToMailBoxClick = function ()
|
||||
{
|
||||
kn.setHash(Links.inbox(Cache.getFolderInboxName()));
|
||||
};
|
||||
|
||||
module.exports = MenuSettingsUserView;
|
||||
|
||||
}());
|
||||
Loading…
Add table
Add a link
Reference in a new issue