Save active tab in cookie in order to restore after page refresh

This commit is contained in:
Malishev Dmitry 2011-09-02 21:38:27 +03:00
commit f651c68a6a
9 changed files with 99 additions and 65 deletions

View file

@ -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();