From 73b5104d6ea6c7db846fce786c548ad0730484c3 Mon Sep 17 00:00:00 2001 From: Atul Pratap Singh Date: Thu, 20 Sep 2012 21:14:51 +0530 Subject: [PATCH] Left in 2548043adf32b8c8add18079 --- js/server_status_monitor.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/js/server_status_monitor.js b/js/server_status_monitor.js index 1d8a7b9ca8..193f568d51 100644 --- a/js/server_status_monitor.js +++ b/js/server_status_monitor.js @@ -1187,8 +1187,10 @@ $(function() { // time span selection $('#gridchart' + runtime.chartAI).bind('jqplotMouseDown', function(ev, gridpos, datapos, neighbor, plot) { selectionTimeDiff.push(datapos.xaxis); - $('#selection_box').remove(); - selectionBox = $('
'); + if($('#selection_box').length) { + $('#selection_box').remove(); + } + selectionBox = $('
'); $(document.body).append(selectionBox); selectionStartX = ev.pageX; selectionStartY = ev.pageY; @@ -1203,7 +1205,6 @@ $(function() { $('#gridchart' + runtime.chartAI).bind('jqplotMouseUp', function(ev, gridpos, datapos, neighbor, plot) { selectionTimeDiff.push(datapos.xaxis); - $('#selection_box').attr({ id: '' }); //get date from timestamp var min = new Date(Math.ceil(selectionTimeDiff[0])); var max = new Date(Math.ceil(selectionTimeDiff[1]));