Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/phpmyadmin/phpmyadmin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRouslan Placella <rouslan@placella.com>2012-06-21 01:36:54 +0400
committerRouslan Placella <rouslan@placella.com>2012-10-31 00:07:01 +0400
commit3ca7d34240d5e6c173cc492662a2d4a2713b8306 (patch)
treeda3ed8aa4bd4f3be91b6a0fb0f977c09cee94a5b /js/tbl_zoom_plot_jqplot.js
parent5838a4433921f285c70706146343bb21f0430b4a (diff)
Destroy registered jQuery events on page tear down
Diffstat (limited to 'js/tbl_zoom_plot_jqplot.js')
-rw-r--r--js/tbl_zoom_plot_jqplot.js16
1 files changed, 16 insertions, 0 deletions
diff --git a/js/tbl_zoom_plot_jqplot.js b/js/tbl_zoom_plot_jqplot.js
index 6aecf9af3f..229dbb915e 100644
--- a/js/tbl_zoom_plot_jqplot.js
+++ b/js/tbl_zoom_plot_jqplot.js
@@ -104,6 +104,22 @@ function scrollToChart() {
$('html,body').animate({scrollTop: x}, 500);
}
+/**
+ * Unbind all event handlers before tearing down a page
+ */
+AJAX.registerTeardown('tbl_zoom_plot_jqplot.js', function() {
+ $('#tableid_0').unbind('change');
+ $('#tableid_1').unbind('change');
+ $('#tableid_2').unbind('change');
+ $('#tableid_3').unbind('change');
+ $('#inputFormSubmitId').unbind('click');
+ $('#togglesearchformlink').unbind('click');
+ $("#dataDisplay").find(':input').die('keydown');
+ $('button.button-reset').unbind('click');
+ $('div#resizer').unbind('resizestop');
+ $('div#querychart').unbind('jqplotDataClick');
+});
+
AJAX.registerOnload('tbl_zoom_plot_jqplot.js', function() {
var cursorMode = ($("input[name='mode']:checked").val() == 'edit') ? 'crosshair' : 'pointer';
var currentChart = null;