mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-28 03:29:20 +03:00
Added "[labs] startup_url" setting
This commit is contained in:
parent
9a98bff931
commit
28d93f70ae
4 changed files with 13 additions and 3 deletions
|
|
@ -225,6 +225,7 @@
|
|||
{
|
||||
var
|
||||
kn = require('Knoin/Knoin'),
|
||||
sStartupUrl = Utils.pString(Settings.settingsGet('StartupUrl')),
|
||||
sCustomLogoutLink = Utils.pString(Settings.settingsGet('CustomLogoutLink')),
|
||||
bInIframe = !!Settings.settingsGet('InIframe')
|
||||
;
|
||||
|
|
@ -234,6 +235,7 @@
|
|||
|
||||
if (bLogout)
|
||||
{
|
||||
sStartupUrl = '';
|
||||
this.clearClientSideToken();
|
||||
}
|
||||
|
||||
|
|
@ -242,6 +244,11 @@
|
|||
window.close();
|
||||
}
|
||||
|
||||
if (bAdmin)
|
||||
{
|
||||
sStartupUrl = '';
|
||||
}
|
||||
|
||||
sCustomLogoutLink = sCustomLogoutLink || (bAdmin ? Links.rootAdmin() : Links.rootUser());
|
||||
|
||||
if (bLogout && window.location.href !== sCustomLogoutLink)
|
||||
|
|
@ -260,7 +267,7 @@
|
|||
else
|
||||
{
|
||||
kn.routeOff();
|
||||
kn.setHash(Links.root(), true);
|
||||
kn.setHash(Links.root(sStartupUrl), true);
|
||||
kn.routeOff();
|
||||
|
||||
_.delay(function () {
|
||||
|
|
|
|||
|
|
@ -39,11 +39,12 @@
|
|||
};
|
||||
|
||||
/**
|
||||
* @param {string=} sStartupUrl
|
||||
* @return {string}
|
||||
*/
|
||||
Links.prototype.root = function ()
|
||||
Links.prototype.root = function (sStartupUrl)
|
||||
{
|
||||
return this.sBase;
|
||||
return this.sBase + Utils.pString(sStartupUrl);
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue