mirror of
https://github.com/serghey-rodin/vesta.git
synced 2025-07-07 21:41:49 -07:00
Save active tab in cookie in order to restore after page refresh
This commit is contained in:
parent
0f2c093148
commit
f651c68a6a
9 changed files with 99 additions and 65 deletions
|
@ -264,3 +264,26 @@ App.Helpers.closeInnerPopup = function(evt)
|
|||
{
|
||||
$('#inner-popup').remove();
|
||||
}
|
||||
|
||||
App.Helpers.getBackendUrl = function()
|
||||
{
|
||||
var url_parts = location.href.split('#');
|
||||
if (url_parts.length > 1) {
|
||||
var tab = url_parts[url_parts.length - 1];
|
||||
if ($.inArray(tab, App.Constants.TABS) != -1) {
|
||||
App.Tmp.loadTAB = tab;
|
||||
}
|
||||
}
|
||||
|
||||
var url_parts = location.href.split('?', 1);
|
||||
var url = url_parts[0];
|
||||
url_parts = url.split('/');
|
||||
if (url_parts[url_parts.length -1] == 'index.html') {
|
||||
url_parts[url_parts.length -1] = 'dispatch.php';
|
||||
}
|
||||
else {
|
||||
url_parts.push('dispatch.php');
|
||||
}
|
||||
|
||||
return url_parts.join('/');
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue