diff options
author | Madhura Jayaratne <madhura.cj@gmail.com> | 2014-12-04 16:03:37 +0300 |
---|---|---|
committer | Madhura Jayaratne <madhura.cj@gmail.com> | 2014-12-04 16:03:37 +0300 |
commit | 478e781f1be0b2ca7a652a3690115af77f6e23ea (patch) | |
tree | d4493aa6073e41d2eee45fe268e324e37cf5b8ac /js/tbl_operations.js | |
parent | 0023d15cdb97792c0638ff4f20a573f0418a23a7 (diff) |
Replace more instances of .live() and .die() with .on() and .off()
Signed-off-by: Madhura Jayaratne <madhura.cj@gmail.com>
Diffstat (limited to 'js/tbl_operations.js')
-rw-r--r-- | js/tbl_operations.js | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/js/tbl_operations.js b/js/tbl_operations.js index 89fb849154..56e60162b9 100644 --- a/js/tbl_operations.js +++ b/js/tbl_operations.js @@ -2,13 +2,13 @@ * Unbind all event handlers before tearing down a page */ AJAX.registerTeardown('tbl_operations.js', function () { - $("#copyTable.ajax").die('submit'); - $("#moveTableForm").die('submit'); - $("#tableOptionsForm").die('submit'); - $("#tbl_maintenance li a.maintain_action.ajax").die('click'); - $("#drop_tbl_anchor.ajax").die('click'); - $("#drop_view_anchor.ajax").die('click'); - $("#truncate_tbl_anchor.ajax").die('click'); + $(document).off('submit', "#copyTable.ajax"); + $(document).off('submit', "#moveTableForm"); + $(document).off('submit', "#tableOptionsForm"); + $(document).off('click', "#tbl_maintenance li a.maintain_action.ajax"); + $(document).off('click', "#drop_tbl_anchor.ajax"); + $(document).off('click', "#drop_view_anchor.ajax"); + $(document).off('click', "#truncate_tbl_anchor.ajax"); }); /** @@ -19,7 +19,7 @@ AJAX.registerOnload('tbl_operations.js', function () { /** *Ajax action for submitting the "Copy table" **/ - $("#copyTable.ajax").live('submit', function (event) { + $(document).on('submit', "#copyTable.ajax", function (event) { event.preventDefault(); var $form = $(this); PMA_prepareForAjaxRequest($form); @@ -48,7 +48,7 @@ AJAX.registerOnload('tbl_operations.js', function () { /** *Ajax action for submitting the "Move table" */ - $("#moveTableForm").live('submit', function (event) { + $(document).on('submit', "#moveTableForm", function (event) { event.preventDefault(); var $form = $(this); var db = $form.find('select[name=target_db]').val(); @@ -72,7 +72,7 @@ AJAX.registerOnload('tbl_operations.js', function () { /** * Ajax action for submitting the "Table options" */ - $("#tableOptionsForm").live('submit', function (event) { + $(document).on('submit', "#tableOptionsForm", function (event) { event.preventDefault(); event.stopPropagation(); var $form = $(this); @@ -100,7 +100,7 @@ AJAX.registerOnload('tbl_operations.js', function () { /** *Ajax events for actions in the "Table maintenance" **/ - $("#tbl_maintenance li a.maintain_action.ajax").live('click', function (event) { + $(document).on('click', "#tbl_maintenance li a.maintain_action.ajax", function (event) { event.preventDefault(); if ($(".sqlqueryresults").length !== 0) { $(".sqlqueryresults").remove(); @@ -140,7 +140,7 @@ AJAX.registerOnload('tbl_operations.js', function () { }); // end $.post() });//end of table maintenance ajax click - $("#drop_tbl_anchor.ajax").live('click', function (event) { + $(document).on('click', "#drop_tbl_anchor.ajax", function (event) { event.preventDefault(); /** * @var question String containing the question to be asked for confirmation @@ -173,7 +173,7 @@ AJAX.registerOnload('tbl_operations.js', function () { }); // end $.PMA_confirm() }); //end of Drop Table Ajax action - $("#drop_view_anchor.ajax").live('click', function (event) { + $(document).on('click', "#drop_view_anchor.ajax", function (event) { event.preventDefault(); /** * @var question String containing the question to be asked for confirmation @@ -206,7 +206,7 @@ AJAX.registerOnload('tbl_operations.js', function () { }); // end $.PMA_confirm() }); //end of Drop View Ajax action - $("#truncate_tbl_anchor.ajax").live('click', function (event) { + $(document).on('click', "#truncate_tbl_anchor.ajax", function (event) { event.preventDefault(); /** * @var question String containing the question to be asked for confirmation |