snappymail/dev/View/App/Settings/Pane.js
RainLoop Team 06274c6a7c Code refactoring
Fixed owncloud password encoder/decoder (#291)
Fixed ckeditor in ownCloud iframe (Closes #302)
Release commit
2014-09-06 01:44:29 +04:00

53 lines
No EOL
1 KiB
JavaScript

(function () {
'use strict';
var
_ = require('_'),
key = require('key'),
Enums = require('Common/Enums'),
LinkBuilder = require('Common/LinkBuilder'),
Data = require('Storage/App/Data'),
kn = require('Knoin/Knoin'),
AbstractView = require('Knoin/AbstractView')
;
/**
* @constructor
* @extends AbstractView
*/
function PaneSettingsAppView()
{
AbstractView.call(this, 'Right', 'SettingsPane');
kn.constructorEnd(this);
}
kn.extendAsViewModel(['View/App/Settings/Pane', 'SettingsPaneViewModel'], PaneSettingsAppView);
_.extend(PaneSettingsAppView.prototype, AbstractView.prototype);
PaneSettingsAppView.prototype.onBuild = function ()
{
var self = this;
key('esc', Enums.KeyState.Settings, function () {
self.backToMailBoxClick();
});
};
PaneSettingsAppView.prototype.onShow = function ()
{
Data.message(null);
};
PaneSettingsAppView.prototype.backToMailBoxClick = function ()
{
kn.setHash(LinkBuilder.inbox());
};
module.exports = PaneSettingsAppView;
}());