From 109312f870ba02c9bbe99d53bdc0d83fb0863f08 Mon Sep 17 00:00:00 2001 From: Atul Pratap Singh Date: Sat, 11 Aug 2012 19:01:32 +0530 Subject: [PATCH] Fix cleartimeout problem --- js/server_status.js | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/js/server_status.js b/js/server_status.js index e8e40f77cc..4fc66ca6e1 100644 --- a/js/server_status.js +++ b/js/server_status.js @@ -434,14 +434,8 @@ $(function() { $tab.find('.buttonlinks a.tabRefresh').hide(); $tab.find('.buttonlinks .refreshList').show(); } else { - if(is_timer_on) { - clearTimeout(chart_replot_timer); - is_timer_on = 0; - } - else { - clearTimeout(chart_activeTimeouts[$tab.attr('id') + "_chart_cnt"]); - chart_activeTimeouts[$tab.attr('id') + "_chart_cnt"] = null; - } + clearTimeout(chart_activeTimeouts[$tab.attr('id') + "_chart_cnt"]); + chart_activeTimeouts[$tab.attr('id') + "_chart_cnt"] = null; $tab.find('.tabInnerContent').show(); $tab.find('div#' + $tab.attr('id') + '_chart_cnt').remove(); tabStatus[$tab.attr('id')] = 'static'; @@ -450,6 +444,10 @@ $(function() { $tab.find('.buttonlinks select').get(0).selectedIndex = 2; $tab.find('.buttonlinks .refreshList').hide(); } + if(is_timer_on) { + clearTimeout(chart_replot_timer); + is_timer_on = 0; + } previous_y_line1 = 0; previous_y_line2 = 0; series = new Array();