Small fixes

Release commit
This commit is contained in:
RainLoop Team 2014-10-05 22:37:31 +04:00
parent 78f09856e3
commit c26ab305a1
29 changed files with 385 additions and 371 deletions

View file

@ -10,7 +10,7 @@
Globals = require('Common/Globals'),
Utils = require('Common/Utils'),
LinkBuilder = require('Common/LinkBuilder'),
Links = require('Common/Links'),
Events = require('Common/Events'),
Settings = require('Storage/Settings'),
@ -132,10 +132,18 @@
AbstractApp.prototype.redirectToAdminPanel = function ()
{
_.delay(function () {
window.location.href = './?/Admin/';
window.location.href = Links.rootAdmin();
}, 100);
};
AbstractApp.prototype.clearClientSideToken = function ()
{
if (window.__rlah_clear)
{
window.__rlah_clear();
}
};
/**
* @param {boolean=} bLogout = false
* @param {boolean=} bClose = false
@ -151,6 +159,11 @@
bLogout = Utils.isUnd(bLogout) ? false : !!bLogout;
bClose = Utils.isUnd(bClose) ? false : !!bClose;
if (bLogout)
{
this.clearClientSideToken();
}
if (bLogout && bClose && window.close)
{
window.close();
@ -173,7 +186,7 @@
else
{
kn.routeOff();
kn.setHash(LinkBuilder.root(), true);
kn.setHash(Links.root(), true);
kn.routeOff();
_.delay(function () {