diff options
author | Rouslan Placella <rouslan@placella.com> | 2012-06-21 01:36:54 +0400 |
---|---|---|
committer | Rouslan Placella <rouslan@placella.com> | 2012-10-31 00:07:01 +0400 |
commit | 3ca7d34240d5e6c173cc492662a2d4a2713b8306 (patch) | |
tree | da3ed8aa4bd4f3be91b6a0fb0f977c09cee94a5b /js/db_structure.js | |
parent | 5838a4433921f285c70706146343bb21f0430b4a (diff) |
Destroy registered jQuery events on page tear down
Diffstat (limited to 'js/db_structure.js')
-rw-r--r-- | js/db_structure.js | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/js/db_structure.js b/js/db_structure.js index 17601525f3..3a6aefe81b 100644 --- a/js/db_structure.js +++ b/js/db_structure.js @@ -19,6 +19,21 @@ */ /** + * Unbind all event handlers before tearing down a page + */ +AJAX.registerTeardown('db_structure.js', function() { + $("td.insert_table a.ajax").die('click'); + $("#insertForm .insertRowTable.ajax input[type=submit]").die('click'); + $("#buttonYes.ajax").die('click'); + $("span.fkc_switch").unbind('click'); + $('#fkc_checkbox').unbind('change'); + $("a.truncate_table_anchor.ajax").die('click'); + $("a.drop_table_anchor.ajax").die('click'); + $('a.drop_tracking_anchor.ajax').die('click'); + $('#real_end_input').die('click'); +}); + +/** * Adjust number of rows and total size in the summary * when truncating, creating, dropping or inserting into a table */ |