mirror of
https://github.com/myvesta/vesta
synced 2025-08-20 05:14:10 -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
|
@ -1,7 +1,21 @@
|
|||
$(document).ready(function(){
|
||||
try{
|
||||
App.Utils.detectBrowser();
|
||||
App.Env.world = 'CRON';
|
||||
|
||||
if ('undefined' != typeof App.Tmp.loadTAB) {
|
||||
App.Env.world = App.Tmp.loadTAB;
|
||||
}
|
||||
|
||||
if ('undefined' == typeof App.Tmp.loadTAB && cookieEnabled()) {
|
||||
var tab = getCookie('tab');
|
||||
if (null != tab && $.inArray(tab, App.Constants.TABS)) {
|
||||
App.Env.world = tab;
|
||||
}
|
||||
else {
|
||||
App.Env.world = App.Constants.TABS[0];
|
||||
}
|
||||
}
|
||||
|
||||
App.Pages.init();
|
||||
App.Ref.init();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue