mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-06 21:21:15 -07:00
Fix graphs tab not saving
This commit is contained in:
parent
88a5db05b7
commit
1e807af2d4
2 changed files with 8 additions and 7 deletions
|
@ -347,13 +347,12 @@
|
||||||
current_tab = '#tabs-plays'
|
current_tab = '#tabs-plays'
|
||||||
break
|
break
|
||||||
case '#tabs-2':
|
case '#tabs-2':
|
||||||
current_tab = '#tabs-strea'
|
current_tab = '#tabs-stream'
|
||||||
break
|
break
|
||||||
case '#tabs-3':
|
case '#tabs-3':
|
||||||
current_tab = '#tabs-total'
|
current_tab = '#tabs-total'
|
||||||
break
|
break
|
||||||
default:
|
default:
|
||||||
current_tab = '#tabs-plays'
|
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -361,7 +360,7 @@
|
||||||
$('#yaxis-' + yaxis).closest('label').addClass('active');
|
$('#yaxis-' + yaxis).closest('label').addClass('active');
|
||||||
$('#graph-days').val(current_day_range);
|
$('#graph-days').val(current_day_range);
|
||||||
$('#graph-months').val(current_month_range);
|
$('#graph-months').val(current_month_range);
|
||||||
$('#nav-' + current_tab.replace('#', "")).tab('show').trigger('show.bs.tab');
|
$('#nav-' + current_tab.replace('#', '')).tab('show').trigger('show.bs.tab');
|
||||||
//$(current_tab).addClass('active');
|
//$(current_tab).addClass('active');
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -591,16 +591,18 @@ function PopupCenter(url, title, w, h) {
|
||||||
|
|
||||||
|
|
||||||
function setLocalStorage(key, value, path) {
|
function setLocalStorage(key, value, path) {
|
||||||
|
var key_path = key;
|
||||||
if (path !== false) {
|
if (path !== false) {
|
||||||
key = key + '_' + window.location.pathname;
|
key_path = key_path + '_' + window.location.pathname;
|
||||||
}
|
}
|
||||||
localStorage.setItem(key, value);
|
localStorage.setItem(key_path, value);
|
||||||
}
|
}
|
||||||
function getLocalStorage(key, default_value, path) {
|
function getLocalStorage(key, default_value, path) {
|
||||||
|
var key_path = key;
|
||||||
if (path !== false) {
|
if (path !== false) {
|
||||||
key = key + '_' + window.location.pathname;
|
key_path = key_path + '_' + window.location.pathname;
|
||||||
}
|
}
|
||||||
var value = localStorage.getItem(key);
|
var value = localStorage.getItem(key_path);
|
||||||
if (value !== null) {
|
if (value !== null) {
|
||||||
return value
|
return value
|
||||||
} else if (default_value !== undefined) {
|
} else if (default_value !== undefined) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue