Add mobile version (beta)

This commit is contained in:
RainLoop Team 2016-05-01 04:07:10 +03:00
parent 1391648e1b
commit b0ffd84ac6
76 changed files with 2945 additions and 845 deletions

View file

@ -6,6 +6,10 @@
var
_ = require('_'),
Globals = require('Common/Globals'),
Settings = require('Storage/Settings'),
kn = require('Knoin/Knoin'),
AbstractView = require('Knoin/AbstractView')
;
@ -18,6 +22,10 @@
{
AbstractView.call(this, 'Right', 'SettingsPane');
this.mobile = Settings.appSettingsGet('mobile');
this.leftPanelDisabled = Globals.leftPanelDisabled;
kn.constructorEnd(this);
}
@ -29,6 +37,34 @@
require('Stores/User/Message').message(null);
};
PaneSettingsUserView.prototype.hideLeft = function (oItem, oEvent)
{
oEvent.preventDefault();
oEvent.stopPropagation();
Globals.leftPanelDisabled(true);
};
PaneSettingsUserView.prototype.showLeft = function (oItem, oEvent)
{
oEvent.preventDefault();
oEvent.stopPropagation();
Globals.leftPanelDisabled(false);
};
PaneSettingsUserView.prototype.onBuild = function (oDom)
{
if (this.mobile)
{
oDom
.on('click', function () {
Globals.leftPanelDisabled(true);
})
;
}
};
PaneSettingsUserView.prototype.backToMailBoxClick = function ()
{
kn.setHash(require('Common/Links').inbox(