mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-14 09:12:58 -07:00
Fixed tab spacing
This commit is contained in:
parent
357797df6b
commit
22cc06dec3
1 changed files with 29 additions and 29 deletions
|
@ -263,35 +263,35 @@
|
||||||
<script>
|
<script>
|
||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
|
|
||||||
// Save graph state to cookies
|
// Save graph state to cookies
|
||||||
$('input[name=yaxis-options]').change(function() {
|
$('input[name=yaxis-options]').change(function() {
|
||||||
setCookie('graphType', $(this).val(), 365, '/');
|
setCookie('graphType', $(this).val(), 365, '/');
|
||||||
});
|
});
|
||||||
$('input[name=date-options]').change(function() {
|
$('input[name=date-options]').change(function() {
|
||||||
setCookie('graphDate', $(this).val(), 365, '/');
|
setCookie('graphDate', $(this).val(), 365, '/');
|
||||||
});
|
});
|
||||||
$('a[data-toggle=tab]').click(function() {
|
$('a[data-toggle=tab]').click(function() {
|
||||||
setCookie('graphTab', $(this).attr('href'), 365, '/');
|
setCookie('graphTab', $(this).attr('href'), 365, '/');
|
||||||
});
|
});
|
||||||
|
|
||||||
// Initial values for graph if no saved state
|
// Initial values for graph if no saved state
|
||||||
var yaxis = 'plays';
|
var yaxis = 'plays';
|
||||||
var current_range = 30;
|
var current_range = 30;
|
||||||
var current_tab = '#tabs-1';
|
var current_tab = '#tabs-1';
|
||||||
|
|
||||||
// Read saved graph state from cookies and set initial values
|
// Read saved graph state from cookies and set initial values
|
||||||
if(getCookie('graphType')) {
|
if(getCookie('graphType')) {
|
||||||
var yaxis = getCookie('graphType');
|
var yaxis = getCookie('graphType');
|
||||||
$('input[name=yaxis-options][value=' + yaxis + ']').prop('checked', true).trigger('click');
|
$('input[name=yaxis-options][value=' + yaxis + ']').prop('checked', true).trigger('click');
|
||||||
}
|
}
|
||||||
if(getCookie('graphDate')) {
|
if(getCookie('graphDate')) {
|
||||||
var current_range = getCookie('graphDate');
|
var current_range = getCookie('graphDate');
|
||||||
$('input[name=date-options][value=' + current_range + ']').prop('checked', true).trigger('click');
|
$('input[name=date-options][value=' + current_range + ']').prop('checked', true).trigger('click');
|
||||||
}
|
}
|
||||||
if(getCookie('graphTab')) {
|
if(getCookie('graphTab')) {
|
||||||
var current_tab = getCookie('graphTab');
|
var current_tab = getCookie('graphTab');
|
||||||
$('a[data-toggle=tab][href=' + current_tab + ']').trigger('click');
|
$('a[data-toggle=tab][href=' + current_tab + ']').trigger('click');
|
||||||
}
|
}
|
||||||
|
|
||||||
function loadGraphsTab1(time_range, yaxis) {
|
function loadGraphsTab1(time_range, yaxis) {
|
||||||
setGraphFormat(yaxis);
|
setGraphFormat(yaxis);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue