mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-16 02:02:58 -07:00
Fix bug where graphs would make multiple ajax queries.
This commit is contained in:
parent
7f75966f43
commit
39160df79b
1 changed files with 14 additions and 21 deletions
|
@ -373,38 +373,31 @@
|
||||||
loadGraphsTab1(current_range, yaxis);
|
loadGraphsTab1(current_range, yaxis);
|
||||||
|
|
||||||
// Tab1 opened
|
// Tab1 opened
|
||||||
$('#graph-tabs a[href="#tabs-1"]').click(function (e) {
|
$('#graph-tabs a[href="#tabs-1"]').on('shown.bs.tab', function (e) {
|
||||||
current_tab = $(this).attr('href');
|
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
$(this).tab('show');
|
current_tab = $(this).attr('href');
|
||||||
$(this).on('shown.bs.tab', function (e) {
|
$('#days-selection').show();
|
||||||
$('#days-selection').show();
|
loadGraphsTab1(current_range, yaxis);
|
||||||
loadGraphsTab1(current_range, yaxis);
|
|
||||||
})
|
|
||||||
})
|
})
|
||||||
|
|
||||||
// Tab2 opened
|
// Tab2 opened
|
||||||
$('#graph-tabs a[href="#tabs-2"]').click(function (e) {
|
$('#graph-tabs a[href="#tabs-2"]').on('shown.bs.tab', function (e) {
|
||||||
current_tab = $(this).attr('href');
|
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
$(this).tab('show');
|
current_tab = $(this).attr('href');
|
||||||
$(this).on('shown.bs.tab', function (e) {
|
$('#days-selection').show();
|
||||||
$('#days-selection').show();
|
loadGraphsTab2(current_range, yaxis);
|
||||||
loadGraphsTab2(current_range, yaxis);
|
|
||||||
})
|
|
||||||
})
|
})
|
||||||
|
|
||||||
// Tab3 opened
|
// Tab3 opened
|
||||||
$('#graph-tabs a[href="#tabs-3"]').click(function (e) {
|
$('#graph-tabs a[href="#tabs-3"').on('shown.bs.tab', function (e) {
|
||||||
current_tab = $(this).attr('href');
|
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
$(this).tab('show');
|
current_tab = $(this).attr('href');
|
||||||
$(this).on('shown.bs.tab', function (e) {
|
$('#days-selection').hide();
|
||||||
$('#days-selection').hide();
|
console.log('loading....');
|
||||||
loadGraphsTab3(yaxis);
|
loadGraphsTab3(yaxis);
|
||||||
})
|
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
// Date range changed
|
// Date range changed
|
||||||
$('#days-selection').on('change', function() {
|
$('#days-selection').on('change', function() {
|
||||||
current_range = $('input[name=date-options]:checked', '#days-selection').val();
|
current_range = $('input[name=date-options]:checked', '#days-selection').val();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue