mirror of
https://github.com/avecms/AVE.cms.git
synced 2025-05-02 13:18:19 +00:00
Fixes
This commit is contained in:
parent
e2a35c89a6
commit
9ceed4e4fa
@ -14,7 +14,7 @@ var Debug = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
build: function () {
|
build: function () {
|
||||||
this.debugCookie();
|
//
|
||||||
},
|
},
|
||||||
|
|
||||||
events: function () {
|
events: function () {
|
||||||
@ -27,9 +27,9 @@ var Debug = {
|
|||||||
|
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
|
|
||||||
$bar = $('#debug_bar');
|
let $bar = $('#debug_bar');
|
||||||
|
|
||||||
if ($bar.css('display') == 'none') {
|
if ($bar.css('display') === 'none') {
|
||||||
$(document.body).css('overflow', 'hidden');
|
$(document.body).css('overflow', 'hidden');
|
||||||
$bar.show();
|
$bar.show();
|
||||||
} else {
|
} else {
|
||||||
@ -37,6 +37,7 @@ var Debug = {
|
|||||||
$bar.hide();
|
$bar.hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Debug.debugStorage();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -53,17 +54,17 @@ var Debug = {
|
|||||||
|
|
||||||
$('#' + this.id + '-cont').show();
|
$('#' + this.id + '-cont').show();
|
||||||
|
|
||||||
if ($.cookie) {
|
localStorage.setItem('__debug_bar', this.id);
|
||||||
$.cookie('__debug_bar', this.id, {expires: 7, path: '/'});
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
debugCookie: function () {
|
debugStorage: function () {
|
||||||
if ($.cookie) {
|
|
||||||
var id = $.cookie('__debug_bar');
|
|
||||||
|
|
||||||
var tab = $('.debug_tabs > li#' + id);
|
let localValue = localStorage.getItem('__debug_bar');
|
||||||
|
|
||||||
|
if (localValue !== '') {
|
||||||
|
|
||||||
|
let tab = $('.debug_tabs > li#' + localValue);
|
||||||
|
|
||||||
if (tab.length > 0) {
|
if (tab.length > 0) {
|
||||||
tab.click();
|
tab.click();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user