.live() and .die() methods are deprecated. Use .on() and .off() methods instead
Signed-off-by: Madhura Jayaratne <madhura.cj@gmail.com>
This commit is contained in:
parent
bd02f91a2a
commit
410d1c32df
@ -575,8 +575,8 @@ var AJAX = {
|
||||
* Re-attach a generic event handler to clicks
|
||||
* on pages and submissions of forms
|
||||
*/
|
||||
$('a').die('click').live('click', AJAX.requestHandler);
|
||||
$('form').die('submit').live('submit', AJAX.requestHandler);
|
||||
$(document).off('click', 'a').on('click', 'a', AJAX.requestHandler);
|
||||
$(document).off('submit', 'form').on('submit', 'form', AJAX.requestHandler);
|
||||
AJAX.cache.update();
|
||||
callback();
|
||||
}
|
||||
@ -994,8 +994,8 @@ $(function () {
|
||||
* Attach a generic event handler to clicks
|
||||
* on pages and submissions of forms
|
||||
*/
|
||||
$('a').live('click', AJAX.requestHandler);
|
||||
$('form').live('submit', AJAX.requestHandler);
|
||||
$(document).on('click', 'a', AJAX.requestHandler);
|
||||
$(document).on('submit', 'form', AJAX.requestHandler);
|
||||
|
||||
/**
|
||||
* Gracefully handle fatal server errors
|
||||
|
||||
@ -12,7 +12,7 @@ AJAX.registerTeardown('config.js', function () {
|
||||
$('div.tabs_contents').undelegate();
|
||||
$('#import_local_storage, #export_local_storage').unbind('click');
|
||||
$('form.prefs-form').unbind('change').unbind('submit');
|
||||
$('div.click-hide-message').die('click');
|
||||
$(document).off('click', 'div.click-hide-message');
|
||||
$('#prefs_autoload').find('a').unbind('click');
|
||||
});
|
||||
|
||||
@ -703,7 +703,7 @@ AJAX.registerOnload('config.js', function () {
|
||||
}
|
||||
});
|
||||
|
||||
$('div.click-hide-message').live('click', function () {
|
||||
$(document).on('click', 'div.click-hide-message', function () {
|
||||
$(this)
|
||||
.hide()
|
||||
.parent('.group')
|
||||
|
||||
@ -20,7 +20,7 @@ AJAX.registerTeardown('db_central_columns.js', function () {
|
||||
$(".edit_save_form").unbind('click');
|
||||
$('.edit_cancel_form').unbind('click');
|
||||
$(".del_row").unbind('click');
|
||||
$(".filter_rows").die("keyup");
|
||||
$(document).off("keyup", ".filter_rows");
|
||||
$('.edit_cancel_form').unbind('click');
|
||||
$('.column_heading').unbind('hover');
|
||||
$('#table-select').unbind('change');
|
||||
@ -55,7 +55,7 @@ AJAX.registerOnload('db_central_columns.js', function () {
|
||||
);
|
||||
});
|
||||
window.scrollTo(0, 0);
|
||||
$(".filter_rows").live("keyup", function () {
|
||||
$(document).on("keyup", ".filter_rows", function () {
|
||||
var cols = ["Name", "Type", "Length/Values", "Collation", "Null", "Extra", "Default"];
|
||||
$.uiTableFilter($("#table_columns"), $(this).val(), cols, null, "td span");
|
||||
});
|
||||
|
||||
@ -23,10 +23,10 @@
|
||||
* Unbind all event handlers before tearing down a page
|
||||
*/
|
||||
AJAX.registerTeardown('db_operations.js', function () {
|
||||
$("#rename_db_form.ajax").die('submit');
|
||||
$("#copy_db_form.ajax").die('submit');
|
||||
$("#change_db_charset_form.ajax").die('submit');
|
||||
$("#drop_db_anchor.ajax").die('click');
|
||||
$(document).off('submit', "#rename_db_form.ajax");
|
||||
$(document).off('submit', "#copy_db_form.ajax");
|
||||
$(document).off('submit', "#change_db_charset_form.ajax");
|
||||
$(document).off('click', "#drop_db_anchor.ajax");
|
||||
});
|
||||
|
||||
AJAX.registerOnload('db_operations.js', function () {
|
||||
@ -34,7 +34,7 @@ AJAX.registerOnload('db_operations.js', function () {
|
||||
/**
|
||||
* Ajax event handlers for 'Rename Database'
|
||||
*/
|
||||
$("#rename_db_form.ajax").live('submit', function (event) {
|
||||
$(document).on('submit', "#rename_db_form.ajax", function (event) {
|
||||
event.preventDefault();
|
||||
|
||||
var old_db_name = PMA_commonParams.get('db');
|
||||
@ -80,7 +80,7 @@ AJAX.registerOnload('db_operations.js', function () {
|
||||
/**
|
||||
* Ajax Event Handler for 'Copy Database'
|
||||
*/
|
||||
$("#copy_db_form.ajax").live('submit', function (event) {
|
||||
$(document).on('submit', "#copy_db_form.ajax", function (event) {
|
||||
event.preventDefault();
|
||||
PMA_ajaxShowMessage(PMA_messages.strCopyingDatabase, false);
|
||||
var $form = $(this);
|
||||
@ -108,7 +108,7 @@ AJAX.registerOnload('db_operations.js', function () {
|
||||
/**
|
||||
* Ajax Event handler for 'Change Charset' of the database
|
||||
*/
|
||||
$("#change_db_charset_form.ajax").live('submit', function (event) {
|
||||
$(document).on('submit', "#change_db_charset_form.ajax", function (event) {
|
||||
event.preventDefault();
|
||||
var $form = $(this);
|
||||
PMA_prepareForAjaxRequest($form);
|
||||
@ -125,7 +125,7 @@ AJAX.registerOnload('db_operations.js', function () {
|
||||
/**
|
||||
* Ajax event handlers for Drop Database
|
||||
*/
|
||||
$("#drop_db_anchor.ajax").live('click', function (event) {
|
||||
$(document).on('click', "#drop_db_anchor.ajax", function (event) {
|
||||
event.preventDefault();
|
||||
/**
|
||||
* @var question String containing the question to be asked for confirmation
|
||||
|
||||
16
js/db_qbe.js
16
js/db_qbe.js
@ -20,10 +20,10 @@
|
||||
* Unbind all event handlers before tearing down a page
|
||||
*/
|
||||
AJAX.registerTeardown('db_qbe.js', function () {
|
||||
$("#searchId").die('change');
|
||||
$("#saveSearch").die('click');
|
||||
$("#updateSearch").die('click');
|
||||
$("#deleteSearch").die('click');
|
||||
$(document).off('change', "#searchId");
|
||||
$(document).off('click', "#saveSearch");
|
||||
$(document).off('click', "#updateSearch");
|
||||
$(document).off('click', "#deleteSearch");
|
||||
});
|
||||
|
||||
AJAX.registerOnload('db_qbe.js', function () {
|
||||
@ -31,7 +31,7 @@ AJAX.registerOnload('db_qbe.js', function () {
|
||||
/**
|
||||
* Ajax event handlers for 'Select saved search'
|
||||
*/
|
||||
$("#searchId").live('change', function (event) {
|
||||
$(document).on('change', "#searchId", function (event) {
|
||||
$('#action').val('load');
|
||||
$('#formQBE').submit();
|
||||
});
|
||||
@ -39,21 +39,21 @@ AJAX.registerOnload('db_qbe.js', function () {
|
||||
/**
|
||||
* Ajax event handlers for 'Create bookmark'
|
||||
*/
|
||||
$("#saveSearch").live('click', function (event) {
|
||||
$(document).on('click', "#saveSearch", function (event) {
|
||||
$('#action').val('create');
|
||||
});
|
||||
|
||||
/**
|
||||
* Ajax event handlers for 'Update bookmark'
|
||||
*/
|
||||
$("#updateSearch").live('click', function (event) {
|
||||
$(document).on('click', "#updateSearch", function (event) {
|
||||
$('#action').val('update');
|
||||
});
|
||||
|
||||
/**
|
||||
* Ajax event handlers for 'Delete bookmark'
|
||||
*/
|
||||
$("#deleteSearch").live('click', function (event) {
|
||||
$(document).on('click', "#deleteSearch", function (event) {
|
||||
var question = PMA_sprintf(PMA_messages.strConfirmDeleteQBESearch, $("#searchId option:selected").text());
|
||||
if (!confirm(question)) {
|
||||
return false;
|
||||
|
||||
@ -23,7 +23,7 @@ AJAX.registerTeardown('db_search.js', function () {
|
||||
$('#togglesearchresultlink').unbind('click');
|
||||
$("#togglequerybox").unbind('click');
|
||||
$('#togglesearchformlink').unbind('click');
|
||||
$("#db_search_form.ajax").die('submit');
|
||||
$(document).off('submit', "#db_search_form.ajax");
|
||||
});
|
||||
|
||||
/**
|
||||
@ -194,7 +194,7 @@ AJAX.registerOnload('db_search.js', function () {
|
||||
/**
|
||||
* Ajax Event handler for retrieving the result of an SQL Query
|
||||
*/
|
||||
$("#db_search_form.ajax").live('submit', function (event) {
|
||||
$(document).on('submit', "#db_search_form.ajax", function (event) {
|
||||
event.preventDefault();
|
||||
|
||||
var $msgbox = PMA_ajaxShowMessage(PMA_messages.strSearching, false);
|
||||
|
||||
@ -24,10 +24,10 @@
|
||||
AJAX.registerTeardown('db_structure.js', function () {
|
||||
$("span.fkc_switch").unbind('click');
|
||||
$('#fkc_checkbox').unbind('change');
|
||||
$("a.truncate_table_anchor.ajax").die('click');
|
||||
$("a.drop_table_anchor.ajax").die('click');
|
||||
$('#real_end_input').die('click');
|
||||
$("a.favorite_table_anchor.ajax").die('click');
|
||||
$(document).off('click', "a.truncate_table_anchor.ajax");
|
||||
$(document).off('click', "a.drop_table_anchor.ajax");
|
||||
$(document).off('click', '#real_end_input');
|
||||
$(document).off('click', "a.favorite_table_anchor.ajax");
|
||||
$('a.real_row_count').off('click');
|
||||
$('a.row_count_sum').off('click');
|
||||
$('select[name=submit_mult]').unbind('change');
|
||||
@ -270,7 +270,7 @@ AJAX.registerOnload('db_structure.js', function () {
|
||||
/**
|
||||
* Ajax Event handler for 'Truncate Table'
|
||||
*/
|
||||
$("a.truncate_table_anchor.ajax").live('click', function (event) {
|
||||
$(document).on('click', "a.truncate_table_anchor.ajax", function (event) {
|
||||
event.preventDefault();
|
||||
|
||||
/**
|
||||
@ -319,7 +319,7 @@ AJAX.registerOnload('db_structure.js', function () {
|
||||
/**
|
||||
* Ajax Event handler for 'Drop Table' or 'Drop View'
|
||||
*/
|
||||
$("a.drop_table_anchor.ajax").live('click', function (event) {
|
||||
$(document).on('click', "a.drop_table_anchor.ajax", function (event) {
|
||||
event.preventDefault();
|
||||
|
||||
var $this_anchor = $(this);
|
||||
@ -373,7 +373,7 @@ AJAX.registerOnload('db_structure.js', function () {
|
||||
* Ajax Event handler for calculating the real end for a InnoDB table
|
||||
*
|
||||
*/
|
||||
$('#real_end_input').live('click', function (event) {
|
||||
$(document).on('click', '#real_end_input', function (event) {
|
||||
event.preventDefault();
|
||||
|
||||
/**
|
||||
|
||||
112
js/functions.js
112
js/functions.js
@ -742,7 +742,7 @@ AJAX.registerOnload('functions.js', function () {
|
||||
* Unbind all event handlers before tearing down a page
|
||||
*/
|
||||
AJAX.registerTeardown('functions.js', function () {
|
||||
$('input:checkbox.checkall').die('click');
|
||||
$(document).off('click', 'input:checkbox.checkall');
|
||||
});
|
||||
AJAX.registerOnload('functions.js', function () {
|
||||
/**
|
||||
@ -751,7 +751,7 @@ AJAX.registerOnload('functions.js', function () {
|
||||
* this behavior.
|
||||
*/
|
||||
|
||||
$('input:checkbox.checkall').live('click', function (e) {
|
||||
$(document).on('click', 'input:checkbox.checkall', function (e) {
|
||||
var $tr = $(this).closest('tr');
|
||||
|
||||
// make the table unselectable (to prevent default highlighting when shift+click)
|
||||
@ -842,7 +842,7 @@ AJAX.registerOnload('functions.js', function () {
|
||||
* so that it works also for pages reached via AJAX)
|
||||
*/
|
||||
/*AJAX.registerOnload('functions.js', function () {
|
||||
$('tr.odd, tr.even').live('hover',function (event) {
|
||||
$(document).on('hover', 'tr.odd, tr.even',function (event) {
|
||||
var $tr = $(this);
|
||||
$tr.toggleClass('hover',event.type=='mouseover');
|
||||
$tr.children().toggleClass('hover',event.type=='mouseover');
|
||||
@ -1146,13 +1146,13 @@ function resetDrag() {
|
||||
*/
|
||||
$(function () {
|
||||
/* Move in scratchboard on manual change */
|
||||
$('.position-change').live('change', function () {
|
||||
$(document).on('change', '.position-change', function () {
|
||||
var $this = $(this);
|
||||
var $elm = $('#table_' + $this.data('number'));
|
||||
$elm.css($this.data('axis'), $this.val() + 'px');
|
||||
});
|
||||
/* Refresh on paper size/orientation change */
|
||||
$('.paper-change').live('change', function () {
|
||||
$(document).on('change', '.paper-change', function () {
|
||||
var $elm = $('#pdflayout');
|
||||
if ($elm.css('visibility') == 'visible') {
|
||||
refreshLayout();
|
||||
@ -1160,7 +1160,7 @@ $(function () {
|
||||
}
|
||||
});
|
||||
/* Show/hide the WYSIWYG scratchboard */
|
||||
$('#toggle-dragdrop').live('click', function () {
|
||||
$(document).on('click', '#toggle-dragdrop', function () {
|
||||
var $elm = $('#pdflayout');
|
||||
if ($elm.css('visibility') == 'hidden') {
|
||||
refreshLayout();
|
||||
@ -1175,7 +1175,7 @@ $(function () {
|
||||
}
|
||||
});
|
||||
/* Reset scratchboard */
|
||||
$('#reset-dragdrop').live('click', function () {
|
||||
$(document).on('click', '#reset-dragdrop', function () {
|
||||
resetDrag();
|
||||
});
|
||||
});
|
||||
@ -1538,9 +1538,9 @@ function pdfPaperSize(format, axis)
|
||||
* Unbind all event handlers before tearing down a page
|
||||
*/
|
||||
AJAX.registerTeardown('functions.js', function () {
|
||||
$("a.inline_edit_sql").die('click');
|
||||
$("input#sql_query_edit_save").die('click');
|
||||
$("input#sql_query_edit_discard").die('click');
|
||||
$(document).off('click', "a.inline_edit_sql");
|
||||
$(document).off('click', "input#sql_query_edit_save");
|
||||
$(document).off('click', "input#sql_query_edit_discard");
|
||||
$('input.sqlbutton').unbind('click');
|
||||
$("#export_type").unbind('change');
|
||||
$('#sqlquery').unbind('keydown');
|
||||
@ -1565,7 +1565,7 @@ AJAX.registerOnload('functions.js', function () {
|
||||
// If we are coming back to the page by clicking forward button
|
||||
// of the browser, bind the code mirror to inline query editor.
|
||||
bindCodeMirrorToInlineEditor();
|
||||
$("a.inline_edit_sql").live('click', function () {
|
||||
$(document).on('click', "a.inline_edit_sql", function () {
|
||||
if ($('#sql_query_edit').length) {
|
||||
// An inline query editor is already open,
|
||||
// we don't want another copy of it
|
||||
@ -1592,7 +1592,7 @@ AJAX.registerOnload('functions.js', function () {
|
||||
return false;
|
||||
});
|
||||
|
||||
$("input#sql_query_edit_save").live('click', function () {
|
||||
$(document).on('click', "input#sql_query_edit_save", function () {
|
||||
$(".success").hide();
|
||||
//hide already existing success message
|
||||
var sql_query;
|
||||
@ -1615,7 +1615,7 @@ AJAX.registerOnload('functions.js', function () {
|
||||
$fake_form.appendTo($('body')).submit();
|
||||
});
|
||||
|
||||
$("input#sql_query_edit_discard").live('click', function () {
|
||||
$(document).on('click', "input#sql_query_edit_discard", function () {
|
||||
$('div#inline_editor_outer').siblings('code.sql').show();
|
||||
$('div#inline_editor_outer').remove();
|
||||
});
|
||||
@ -2061,7 +2061,7 @@ $(function () {
|
||||
* Allows the user to dismiss a notification
|
||||
* created with PMA_ajaxShowMessage()
|
||||
*/
|
||||
$('span.ajax_notification.dismissable').live('click', function () {
|
||||
$(document).on('click', 'span.ajax_notification.dismissable', function () {
|
||||
PMA_ajaxRemoveMessage($(this));
|
||||
});
|
||||
/**
|
||||
@ -2432,10 +2432,10 @@ jQuery.fn.PMA_sort_table = function (text_selector) {
|
||||
* Unbind all event handlers before tearing down a page
|
||||
*/
|
||||
AJAX.registerTeardown('functions.js', function () {
|
||||
$("#create_table_form_minimal.ajax").die('submit');
|
||||
$("form.create_table_form.ajax").die('submit');
|
||||
$("form.create_table_form.ajax input[name=submit_num_fields]").die('click');
|
||||
$("form.create_table_form.ajax input").die('keyup');
|
||||
$(document).off('submit', "#create_table_form_minimal.ajax");
|
||||
$(document).off('submit', "form.create_table_form.ajax");
|
||||
$(document).off('click', "form.create_table_form.ajax input[name=submit_num_fields]");
|
||||
$(document).off('keyup', "form.create_table_form.ajax input");
|
||||
});
|
||||
|
||||
/**
|
||||
@ -2449,7 +2449,7 @@ AJAX.registerOnload('functions.js', function () {
|
||||
/**
|
||||
* Attach event handler for submission of create table form (save)
|
||||
*/
|
||||
$("form.create_table_form.ajax").live('submit', function (event) {
|
||||
$(document).on('submit', "form.create_table_form.ajax", function (event) {
|
||||
event.preventDefault();
|
||||
|
||||
/**
|
||||
@ -2539,7 +2539,7 @@ AJAX.registerOnload('functions.js', function () {
|
||||
/**
|
||||
* Attach event handler for create table form (add fields)
|
||||
*/
|
||||
$("form.create_table_form.ajax input[name=submit_num_fields]").live('click', function (event) {
|
||||
$(document).on('click', "form.create_table_form.ajax input[name=submit_num_fields]", function (event) {
|
||||
event.preventDefault();
|
||||
/**
|
||||
* @var the_form object referring to the create table form
|
||||
@ -2566,7 +2566,7 @@ AJAX.registerOnload('functions.js', function () {
|
||||
}); //end $.post()
|
||||
}); // end create table form (add fields)
|
||||
|
||||
$("form.create_table_form.ajax input[name=added_fields]").live('keydown', function (event) {
|
||||
$(document).on('keydown', "form.create_table_form.ajax input[name=added_fields]", function (event) {
|
||||
if (event.keyCode == 13) {
|
||||
event.preventDefault();
|
||||
event.stopImmediatePropagation();
|
||||
@ -2639,7 +2639,7 @@ function PMA_checkPassword($the_form)
|
||||
* Unbind all event handlers before tearing down a page
|
||||
*/
|
||||
AJAX.registerTeardown('functions.js', function () {
|
||||
$('#change_password_anchor.ajax').die('click');
|
||||
$(document).off('click', '#change_password_anchor.ajax');
|
||||
});
|
||||
/**
|
||||
* Attach Ajax event handlers for 'Change Password' on index.php
|
||||
@ -2649,7 +2649,7 @@ AJAX.registerOnload('functions.js', function () {
|
||||
/**
|
||||
* Attach Ajax event handler on the change password anchor
|
||||
*/
|
||||
$('#change_password_anchor.ajax').live('click', function (event) {
|
||||
$(document).on('click', '#change_password_anchor.ajax', function (event) {
|
||||
event.preventDefault();
|
||||
|
||||
var $msgbox = PMA_ajaxShowMessage();
|
||||
@ -2738,9 +2738,9 @@ AJAX.registerOnload('functions.js', function () {
|
||||
* Unbind all event handlers before tearing down a page
|
||||
*/
|
||||
AJAX.registerTeardown('functions.js', function () {
|
||||
$("select.column_type").die('change');
|
||||
$("select.default_type").die('change');
|
||||
$('input.allow_null').die('change');
|
||||
$(document).off('change', "select.column_type");
|
||||
$(document).off('change', "select.default_type");
|
||||
$(document).off('change', 'input.allow_null');
|
||||
});
|
||||
/**
|
||||
* Toggle the hiding/showing of the "Open in ENUM/SET editor" message when
|
||||
@ -2752,13 +2752,13 @@ AJAX.registerOnload('functions.js', function () {
|
||||
PMA_verifyColumnsProperties();
|
||||
//
|
||||
// needs live() to work also in the Create Table dialog
|
||||
$("select.column_type").live('change', function () {
|
||||
$(document).on('change', "select.column_type", function () {
|
||||
PMA_showNoticeForEnum($(this));
|
||||
});
|
||||
$("select.default_type").live('change', function () {
|
||||
$(document).on('change', "select.default_type", function () {
|
||||
PMA_hideShowDefaultValue($(this));
|
||||
});
|
||||
$('input.allow_null').live('change', function () {
|
||||
$(document).on('change', 'input.allow_null', function () {
|
||||
PMA_validateDefaultValue($(this));
|
||||
});
|
||||
});
|
||||
@ -2823,10 +2823,10 @@ function autoPopulate(input_id, offset)
|
||||
* Unbind all event handlers before tearing down a page
|
||||
*/
|
||||
AJAX.registerTeardown('functions.js', function () {
|
||||
$("a.open_enum_editor").die('click');
|
||||
$("input.add_value").die('click');
|
||||
$("#enum_editor td.drop").die('click');
|
||||
$('a.central_columns_dialog').die('click');
|
||||
$(document).off('click', "a.open_enum_editor");
|
||||
$(document).off('click', "input.add_value");
|
||||
$(document).off('click', "#enum_editor td.drop");
|
||||
$(document).off('click', 'a.central_columns_dialog');
|
||||
});
|
||||
/**
|
||||
* @var $enum_editor_dialog An object that points to the jQuery
|
||||
@ -2837,7 +2837,7 @@ var $enum_editor_dialog = null;
|
||||
* Opens the ENUM/SET editor and controls its functions
|
||||
*/
|
||||
AJAX.registerOnload('functions.js', function () {
|
||||
$("a.open_enum_editor").live('click', function () {
|
||||
$(document).on('click', "a.open_enum_editor", function () {
|
||||
// Get the name of the column that is being edited
|
||||
var colname = $(this).closest('tr').find('input:first').val();
|
||||
var title;
|
||||
@ -2985,7 +2985,7 @@ AJAX.registerOnload('functions.js', function () {
|
||||
return false;
|
||||
});
|
||||
|
||||
$('a.central_columns_dialog').live('click',function(e) {
|
||||
$(document).on('click', 'a.central_columns_dialog',function(e) {
|
||||
var href = "db_central_columns.php";
|
||||
var db = PMA_commonParams.get('db');
|
||||
var table = PMA_commonParams.get('table');
|
||||
@ -3103,11 +3103,11 @@ AJAX.registerOnload('functions.js', function () {
|
||||
return false;
|
||||
});
|
||||
|
||||
// $('a.show_central_list').live('click',function(e) {
|
||||
// $(document).on('click', 'a.show_central_list',function(e) {
|
||||
|
||||
// });
|
||||
// When "add a new value" is clicked, append an empty text field
|
||||
$("input.add_value").live('click', function (e) {
|
||||
$(document).on('click', "input.add_value", function (e) {
|
||||
e.preventDefault();
|
||||
var num_new_rows = $enum_editor_dialog.find("div.slider").slider('value');
|
||||
while (num_new_rows--) {
|
||||
@ -3125,7 +3125,7 @@ AJAX.registerOnload('functions.js', function () {
|
||||
});
|
||||
|
||||
// Removes the specified row from the enum editor
|
||||
$("#enum_editor td.drop").live('click', function () {
|
||||
$(document).on('click', "#enum_editor td.drop", function () {
|
||||
$(this).closest('tr').hide('fast', function () {
|
||||
$(this).remove();
|
||||
});
|
||||
@ -3167,13 +3167,13 @@ function checkIndexName(form_id)
|
||||
} // end of the 'checkIndexName()' function
|
||||
|
||||
AJAX.registerTeardown('functions.js', function () {
|
||||
$('#index_frm input[type=submit]').die('click');
|
||||
$(document).off('click', '#index_frm input[type=submit]');
|
||||
});
|
||||
AJAX.registerOnload('functions.js', function () {
|
||||
/**
|
||||
* Handler for adding more columns to an index in the editor
|
||||
*/
|
||||
$('#index_frm input[type=submit]').live('click', function (event) {
|
||||
$(document).on('click', '#index_frm input[type=submit]', function (event) {
|
||||
event.preventDefault();
|
||||
var rows_to_add = $(this)
|
||||
.closest('fieldset')
|
||||
@ -3547,10 +3547,10 @@ AJAX.registerOnload('functions.js', function () {
|
||||
* Unbind all event handlers before tearing down a page
|
||||
*/
|
||||
AJAX.registerTeardown('functions.js', function () {
|
||||
$('.vpointer').die('hover');
|
||||
$('.vmarker').die('click');
|
||||
$('select.pageselector').die('change');
|
||||
$('a.formLinkSubmit').die('click');
|
||||
$(document).off('hover', '.vpointer');
|
||||
$(document).off('click', '.vmarker');
|
||||
$(document).off('change', 'select.pageselector');
|
||||
$(document).off('click', 'a.formLinkSubmit');
|
||||
$('#update_recent_tables').unbind('ready');
|
||||
$('#sync_favorite_tables').unbind('ready');
|
||||
});
|
||||
@ -3558,7 +3558,7 @@ AJAX.registerTeardown('functions.js', function () {
|
||||
* Vertical pointer
|
||||
*/
|
||||
AJAX.registerOnload('functions.js', function () {
|
||||
$('.vpointer').live('hover',
|
||||
$(document).on('hover', '.vpointer',
|
||||
//handlerInOut
|
||||
function (e) {
|
||||
var $this_td = $(this);
|
||||
@ -3572,7 +3572,7 @@ AJAX.registerOnload('functions.js', function () {
|
||||
/**
|
||||
* Vertical marker
|
||||
*/
|
||||
$('.vmarker').live('click', function (e) {
|
||||
$(document).on('click', '.vmarker', function (e) {
|
||||
// do not trigger when clicked on anchor
|
||||
if ($(e.target).is('a, img, a *')) {
|
||||
return;
|
||||
@ -3605,7 +3605,7 @@ AJAX.registerOnload('functions.js', function () {
|
||||
/**
|
||||
* Autosubmit page selector
|
||||
*/
|
||||
$('select.pageselector').live('change', function (event) {
|
||||
$(document).on('change', 'select.pageselector', function (event) {
|
||||
event.stopPropagation();
|
||||
// Check where to load the new content
|
||||
if ($(this).closest("#pma_navigation").length === 0) {
|
||||
@ -3636,7 +3636,7 @@ AJAX.registerOnload('functions.js', function () {
|
||||
/**
|
||||
* Enables the text generated by PMA_Util::linkOrButton() to be clickable
|
||||
*/
|
||||
$('a.formLinkSubmit').live('click', function (e) {
|
||||
$(document).on('click', 'a.formLinkSubmit', function (e) {
|
||||
|
||||
if ($(this).attr('href').indexOf('=') != -1) {
|
||||
var data = $(this).attr('href').substr($(this).attr('href').indexOf('#') + 1).split('=', 2);
|
||||
@ -3930,8 +3930,8 @@ function PMA_getCellValue(td) {
|
||||
* Unbind all event handlers before tearing down a page
|
||||
*/
|
||||
AJAX.registerTeardown('functions.js', function () {
|
||||
$('a.themeselect').die('click');
|
||||
$('.autosubmit').die('change');
|
||||
$(document).off('click', 'a.themeselect');
|
||||
$(document).off('change', '.autosubmit');
|
||||
$('a.take_theme').unbind('click');
|
||||
});
|
||||
|
||||
@ -3939,7 +3939,7 @@ AJAX.registerOnload('functions.js', function () {
|
||||
/**
|
||||
* Theme selector.
|
||||
*/
|
||||
$('a.themeselect').live('click', function (e) {
|
||||
$(document).on('click', 'a.themeselect', function (e) {
|
||||
window.open(
|
||||
e.target,
|
||||
'themes',
|
||||
@ -3951,7 +3951,7 @@ AJAX.registerOnload('functions.js', function () {
|
||||
/**
|
||||
* Automatic form submission on change.
|
||||
*/
|
||||
$('.autosubmit').live('change', function (e) {
|
||||
$(document).on('change', '.autosubmit', function (e) {
|
||||
$(this).closest('form').submit();
|
||||
});
|
||||
|
||||
@ -3986,7 +3986,7 @@ function printPage()
|
||||
*/
|
||||
AJAX.registerTeardown('functions.js', function () {
|
||||
$('input#print').unbind('click');
|
||||
$('a.create_view.ajax').die('click');
|
||||
$(document).off('click', 'a.create_view.ajax');
|
||||
$('#createViewDialog').find('input, select').die('keydown');
|
||||
});
|
||||
|
||||
@ -3995,7 +3995,7 @@ AJAX.registerOnload('functions.js', function () {
|
||||
/**
|
||||
* Ajaxification for the "Create View" action
|
||||
*/
|
||||
$('a.create_view.ajax').live('click', function (e) {
|
||||
$(document).on('click', 'a.create_view.ajax', function (e) {
|
||||
e.preventDefault();
|
||||
PMA_createViewDialog($(this));
|
||||
});
|
||||
@ -4154,9 +4154,9 @@ var checkboxes_changed = function () {
|
||||
$checkall.prop({checked: false, indeterminate: false});
|
||||
}
|
||||
};
|
||||
$(checkboxes_sel).live("change", checkboxes_changed);
|
||||
$(document).on("change", checkboxes_sel, checkboxes_changed);
|
||||
|
||||
$("input.checkall_box").live("change", function () {
|
||||
$(document).on("change", "input.checkall_box", function () {
|
||||
var is_checked = $(this).is(":checked");
|
||||
$(this.form).find(checkboxes_sel).prop("checked", is_checked)
|
||||
.parents("tr").toggleClass("marked", is_checked);
|
||||
|
||||
@ -210,15 +210,15 @@ function insertDataAndClose() {
|
||||
* Unbind all event handlers before tearing down a page
|
||||
*/
|
||||
AJAX.registerTeardown('gis_data_editor.js', function () {
|
||||
$("#gis_editor input[name='gis_data[save]']").die('click');
|
||||
$('#gis_editor').die('submit');
|
||||
$(document).off('click', "#gis_editor input[name='gis_data[save]']");
|
||||
$(document).off('submit', '#gis_editor');
|
||||
$('#gis_editor').find("input[type='text']").die('change');
|
||||
$("#gis_editor select.gis_type").die('change');
|
||||
$('#gis_editor a.close_gis_editor, #gis_editor a.cancel_gis_editor').die('click');
|
||||
$('#gis_editor a.addJs.addPoint').die('click');
|
||||
$('#gis_editor a.addLine.addJs').die('click');
|
||||
$('#gis_editor a.addJs.addPolygon').die('click');
|
||||
$('#gis_editor a.addJs.addGeom').die('click');
|
||||
$(document).off('change', "#gis_editor select.gis_type");
|
||||
$(document).off('click', '#gis_editor a.close_gis_editor, #gis_editor a.cancel_gis_editor');
|
||||
$(document).off('click', '#gis_editor a.addJs.addPoint');
|
||||
$(document).off('click', '#gis_editor a.addLine.addJs');
|
||||
$(document).off('click', '#gis_editor a.addJs.addPolygon');
|
||||
$(document).off('click', '#gis_editor a.addJs.addGeom');
|
||||
});
|
||||
|
||||
AJAX.registerOnload('gis_data_editor.js', function () {
|
||||
@ -229,7 +229,7 @@ AJAX.registerOnload('gis_data_editor.js', function () {
|
||||
/**
|
||||
* Prepares and insert the GIS data to the input field on clicking 'copy'.
|
||||
*/
|
||||
$("#gis_editor input[name='gis_data[save]']").live('click', function (event) {
|
||||
$(document).on('click', "#gis_editor input[name='gis_data[save]']", function (event) {
|
||||
event.preventDefault();
|
||||
insertDataAndClose();
|
||||
});
|
||||
@ -237,7 +237,7 @@ AJAX.registerOnload('gis_data_editor.js', function () {
|
||||
/**
|
||||
* Prepares and insert the GIS data to the input field on pressing 'enter'.
|
||||
*/
|
||||
$('#gis_editor').live('submit', function (event) {
|
||||
$(document).on('submit', '#gis_editor', function (event) {
|
||||
event.preventDefault();
|
||||
insertDataAndClose();
|
||||
});
|
||||
@ -264,7 +264,7 @@ AJAX.registerOnload('gis_data_editor.js', function () {
|
||||
/**
|
||||
* Update the form on change of the GIS type.
|
||||
*/
|
||||
$("#gis_editor select.gis_type").live('change', function (event) {
|
||||
$(document).on('change', "#gis_editor select.gis_type", function (event) {
|
||||
var $gis_editor = $("#gis_editor");
|
||||
var $form = $('form#gis_data_editor_form');
|
||||
|
||||
@ -282,14 +282,14 @@ AJAX.registerOnload('gis_data_editor.js', function () {
|
||||
/**
|
||||
* Handles closing of the GIS data editor.
|
||||
*/
|
||||
$('#gis_editor a.close_gis_editor, #gis_editor a.cancel_gis_editor').live('click', function () {
|
||||
$(document).on('click', '#gis_editor a.close_gis_editor, #gis_editor a.cancel_gis_editor', function () {
|
||||
closeGISEditor();
|
||||
});
|
||||
|
||||
/**
|
||||
* Handles adding data points
|
||||
*/
|
||||
$('#gis_editor a.addJs.addPoint').live('click', function () {
|
||||
$(document).on('click', '#gis_editor a.addJs.addPoint', function () {
|
||||
var $a = $(this);
|
||||
var name = $a.attr('name');
|
||||
// Eg. name = gis_data[0][MULTIPOINT][add_point] => prefix = gis_data[0][MULTIPOINT]
|
||||
@ -306,7 +306,7 @@ AJAX.registerOnload('gis_data_editor.js', function () {
|
||||
/**
|
||||
* Handles adding linestrings and inner rings
|
||||
*/
|
||||
$('#gis_editor a.addLine.addJs').live('click', function () {
|
||||
$(document).on('click', '#gis_editor a.addLine.addJs', function () {
|
||||
var $a = $(this);
|
||||
var name = $a.attr('name');
|
||||
|
||||
@ -342,7 +342,7 @@ AJAX.registerOnload('gis_data_editor.js', function () {
|
||||
/**
|
||||
* Handles adding polygons
|
||||
*/
|
||||
$('#gis_editor a.addJs.addPolygon').live('click', function () {
|
||||
$(document).on('click', '#gis_editor a.addJs.addPolygon', function () {
|
||||
var $a = $(this);
|
||||
var name = $a.attr('name');
|
||||
// Eg. name = gis_data[0][MULTIPOLYGON][add_polygon] => prefix = gis_data[0][MULTIPOLYGON]
|
||||
@ -371,7 +371,7 @@ AJAX.registerOnload('gis_data_editor.js', function () {
|
||||
/**
|
||||
* Handles adding geoms
|
||||
*/
|
||||
$('#gis_editor a.addJs.addGeom').live('click', function () {
|
||||
$(document).on('click', '#gis_editor a.addJs.addGeom', function () {
|
||||
var $a = $(this);
|
||||
var prefix = 'gis_data[GEOMETRYCOLLECTION]';
|
||||
// Find the number of geoms
|
||||
|
||||
@ -58,7 +58,7 @@ AJAX.registerTeardown('import.js', function () {
|
||||
|
||||
AJAX.registerOnload('import.js', function () {
|
||||
// import_file_form validation.
|
||||
$('#import_file_form').live('submit', function (event) {
|
||||
$(document).on('submit', '#import_file_form', function (event) {
|
||||
var radioLocalImport = $("#radio_local_import_file");
|
||||
var radioImport = $("#radio_import_file");
|
||||
var fileMsg = '<div class="error"><img src="themes/dot.gif" title="" alt="" class="icon ic_s_error" /> ' + PMA_messages.strImportDialogMessage + '</div>';
|
||||
|
||||
@ -458,10 +458,10 @@ function PMA_indexTypeSelectionDialog(source_array, index_type, col_index)
|
||||
* Unbind all event handlers before tearing down a page
|
||||
*/
|
||||
AJAX.registerTeardown('indexes.js', function () {
|
||||
$('#select_index_type').die('change');
|
||||
$('a.drop_primary_key_index_anchor.ajax').die('click');
|
||||
$("#table_index tbody tr td.edit_index.ajax, #indexes .add_index.ajax").die('click');
|
||||
$('#index_frm input[type=submit]').die('click');
|
||||
$(document).off('change', '#select_index_type');
|
||||
$(document).off('click', 'a.drop_primary_key_index_anchor.ajax');
|
||||
$(document).off('click', "#table_index tbody tr td.edit_index.ajax, #indexes .add_index.ajax");
|
||||
$(document).off('click', '#index_frm input[type=submit]');
|
||||
$('body').off('change', 'select[name*="field_key"]');
|
||||
});
|
||||
|
||||
@ -483,7 +483,7 @@ AJAX.registerOnload('indexes.js', function () {
|
||||
|
||||
checkIndexType();
|
||||
checkIndexName("index_frm");
|
||||
$('#select_index_type').live('change', function (event) {
|
||||
$(document).on('change', '#select_index_type', function (event) {
|
||||
event.preventDefault();
|
||||
checkIndexType();
|
||||
checkIndexName("index_frm");
|
||||
@ -492,7 +492,7 @@ AJAX.registerOnload('indexes.js', function () {
|
||||
/**
|
||||
* Ajax Event handler for 'Drop Index'
|
||||
*/
|
||||
$('a.drop_primary_key_index_anchor.ajax').live('click', function (event) {
|
||||
$(document).on('click', 'a.drop_primary_key_index_anchor.ajax', function (event) {
|
||||
event.preventDefault();
|
||||
var $anchor = $(this);
|
||||
/**
|
||||
@ -556,7 +556,7 @@ AJAX.registerOnload('indexes.js', function () {
|
||||
/**
|
||||
*Ajax event handler for index edit
|
||||
**/
|
||||
$("#table_index tbody tr td.edit_index.ajax, #indexes .add_index.ajax").live('click', function (event) {
|
||||
$(document).on('click', "#table_index tbody tr td.edit_index.ajax, #indexes .add_index.ajax", function (event) {
|
||||
event.preventDefault();
|
||||
var url, title;
|
||||
if ($(this).find("a").length === 0) {
|
||||
|
||||
@ -131,15 +131,15 @@ function onKeyDownArrowsHandler(e)
|
||||
}
|
||||
|
||||
AJAX.registerTeardown('keyhandler.js', function () {
|
||||
$('#table_columns').die('keydown keyup');
|
||||
$('table.insertRowTable').die('keydown keyup');
|
||||
$(document).off('keydown keyup', '#table_columns');
|
||||
$(document).off('keydown keyup', 'table.insertRowTable');
|
||||
});
|
||||
|
||||
AJAX.registerOnload('keyhandler.js', function () {
|
||||
$('#table_columns').live('keydown keyup', function (event) {
|
||||
$(document).on('keydown keyup', '#table_columns', function (event) {
|
||||
onKeyDownArrowsHandler(event.originalEvent);
|
||||
});
|
||||
$('table.insertRowTable').live('keydown keyup', function (event) {
|
||||
$(document).on('keydown keyup', 'table.insertRowTable', function (event) {
|
||||
onKeyDownArrowsHandler(event.originalEvent);
|
||||
});
|
||||
});
|
||||
|
||||
@ -73,5 +73,5 @@ AJAX.registerOnload('keyhandler.js', function () {
|
||||
});
|
||||
|
||||
AJAX.registerTeardown('keyhandler.js', function () {
|
||||
$("th.draggable.column_heading.pointer.marker a").die('click');
|
||||
$(document).off('click', "th.draggable.column_heading.pointer.marker a");
|
||||
});
|
||||
|
||||
@ -26,7 +26,7 @@ $(function () {
|
||||
* opens/closes (hides/shows) tree elements
|
||||
* loads data via ajax
|
||||
*/
|
||||
$('#pma_navigation_tree a.expander').live('click', function (event) {
|
||||
$(document).on('click', '#pma_navigation_tree a.expander', function (event) {
|
||||
event.preventDefault();
|
||||
event.stopImmediatePropagation();
|
||||
var $icon = $(this).find('img');
|
||||
@ -41,7 +41,7 @@ $(function () {
|
||||
* Register event handler for click on the reload
|
||||
* navigation icon at the top of the panel
|
||||
*/
|
||||
$('#pma_navigation_reload').live('click', function (event) {
|
||||
$(document).on('click', '#pma_navigation_reload', function (event) {
|
||||
event.preventDefault();
|
||||
// reload icon object
|
||||
var $icon = $(this).find('img');
|
||||
@ -144,7 +144,7 @@ $(function () {
|
||||
/**
|
||||
* Ajax handler for pagination
|
||||
*/
|
||||
$('#pma_navigation_tree div.pageselector a.ajax').live('click', function (event) {
|
||||
$(document).on('click', '#pma_navigation_tree div.pageselector a.ajax', function (event) {
|
||||
event.preventDefault();
|
||||
PMA_navigationTreePagination($(this));
|
||||
});
|
||||
@ -168,43 +168,43 @@ $(function () {
|
||||
);
|
||||
|
||||
/** Create a Routine, Trigger or Event */
|
||||
$('li.new_procedure a.ajax, li.new_function a.ajax').live('click', function (event) {
|
||||
$(document).on('click', 'li.new_procedure a.ajax, li.new_function a.ajax', function (event) {
|
||||
event.preventDefault();
|
||||
var dialog = new RTE.object('routine');
|
||||
dialog.editorDialog(1, $(this));
|
||||
});
|
||||
$('li.new_trigger a.ajax').live('click', function (event) {
|
||||
$(document).on('click', 'li.new_trigger a.ajax', function (event) {
|
||||
event.preventDefault();
|
||||
var dialog = new RTE.object('trigger');
|
||||
dialog.editorDialog(1, $(this));
|
||||
});
|
||||
$('li.new_event a.ajax').live('click', function (event) {
|
||||
$(document).on('click', 'li.new_event a.ajax', function (event) {
|
||||
event.preventDefault();
|
||||
var dialog = new RTE.object('event');
|
||||
dialog.editorDialog(1, $(this));
|
||||
});
|
||||
|
||||
/** Execute Routines */
|
||||
$('li.procedure > a.ajax, li.function > a.ajax').live('click', function (event) {
|
||||
$(document).on('click', 'li.procedure > a.ajax, li.function > a.ajax', function (event) {
|
||||
event.preventDefault();
|
||||
var dialog = new RTE.object('routine');
|
||||
dialog.executeDialog($(this));
|
||||
});
|
||||
/** Edit Triggers and Events */
|
||||
$('li.trigger > a.ajax').live('click', function (event) {
|
||||
$(document).on('click', 'li.trigger > a.ajax', function (event) {
|
||||
event.preventDefault();
|
||||
var dialog = new RTE.object('trigger');
|
||||
dialog.editorDialog(0, $(this));
|
||||
});
|
||||
$('li.event > a.ajax').live('click', function (event) {
|
||||
$(document).on('click', 'li.event > a.ajax', function (event) {
|
||||
event.preventDefault();
|
||||
var dialog = new RTE.object('event');
|
||||
dialog.editorDialog(0, $(this));
|
||||
});
|
||||
|
||||
/** Edit Routines */
|
||||
$('li.procedure div a.ajax img,' +
|
||||
' li.function div a.ajax img').live('click', function (event) {
|
||||
$(document).on('click', 'li.procedure div a.ajax img,' +
|
||||
' li.function div a.ajax img', function (event) {
|
||||
event.preventDefault();
|
||||
var dialog = new RTE.object('routine');
|
||||
dialog.editorDialog(0, $(this).parent());
|
||||
@ -219,7 +219,7 @@ $(function () {
|
||||
});
|
||||
|
||||
/** New index */
|
||||
$('#pma_navigation_tree li.new_index a.ajax').live('click', function (event) {
|
||||
$(document).on('click', '#pma_navigation_tree li.new_index a.ajax', function (event) {
|
||||
event.preventDefault();
|
||||
var url = $(this).attr('href').substr(
|
||||
$(this).attr('href').indexOf('?') + 1
|
||||
@ -229,7 +229,7 @@ $(function () {
|
||||
});
|
||||
|
||||
/** Edit index */
|
||||
$('li.index a.ajax').live('click', function (event) {
|
||||
$(document).on('click', 'li.index a.ajax', function (event) {
|
||||
event.preventDefault();
|
||||
var url = $(this).attr('href').substr(
|
||||
$(this).attr('href').indexOf('?') + 1
|
||||
@ -239,13 +239,13 @@ $(function () {
|
||||
});
|
||||
|
||||
/** New view */
|
||||
$('li.new_view a.ajax').live('click', function (event) {
|
||||
$(document).on('click', 'li.new_view a.ajax', function (event) {
|
||||
event.preventDefault();
|
||||
PMA_createViewDialog($(this));
|
||||
});
|
||||
|
||||
/** Hide navigation tree item */
|
||||
$('a.hideNavItem.ajax').live('click', function (event) {
|
||||
$(document).on('click', 'a.hideNavItem.ajax', function (event) {
|
||||
event.preventDefault();
|
||||
$.ajax({
|
||||
url: $(this).attr('href') + '&ajax_request=true',
|
||||
@ -260,7 +260,7 @@ $(function () {
|
||||
});
|
||||
|
||||
/** Display a dialog to choose hidden navigation items to show */
|
||||
$('a.showUnhide.ajax').live('click', function (event) {
|
||||
$(document).on('click', 'a.showUnhide.ajax', function (event) {
|
||||
event.preventDefault();
|
||||
var $msg = PMA_ajaxShowMessage();
|
||||
$.get($(this).attr('href') + '&ajax_request=1', function (data) {
|
||||
@ -290,7 +290,7 @@ $(function () {
|
||||
});
|
||||
|
||||
/** Show a hidden navigation tree item */
|
||||
$('a.unhideNavItem.ajax').live('click', function (event) {
|
||||
$(document).on('click', 'a.unhideNavItem.ajax', function (event) {
|
||||
event.preventDefault();
|
||||
var $tr = $(this).parents('tr');
|
||||
var $msg = PMA_ajaxShowMessage();
|
||||
@ -313,7 +313,7 @@ $(function () {
|
||||
}
|
||||
|
||||
// Add/Remove favorite table using Ajax.
|
||||
$(".favorite_table_anchor").live("click", function (event) {
|
||||
$(document).on("click", ".favorite_table_anchor", function (event) {
|
||||
event.preventDefault();
|
||||
$self = $(this);
|
||||
var anchor_id = $self.attr("id");
|
||||
|
||||
18
js/rte.js
18
js/rte.js
@ -772,7 +772,7 @@ $(function () {
|
||||
/**
|
||||
* Attach Ajax event handlers for the Add/Edit functionality.
|
||||
*/
|
||||
$('a.ajax.add_anchor, a.ajax.edit_anchor').live('click', function (event) {
|
||||
$(document).on('click', 'a.ajax.add_anchor, a.ajax.edit_anchor', function (event) {
|
||||
event.preventDefault();
|
||||
var type = $(this).attr('href').substr(0, $(this).attr('href').indexOf('?'));
|
||||
if (type.indexOf('routine') != -1) {
|
||||
@ -791,7 +791,7 @@ $(function () {
|
||||
/**
|
||||
* Attach Ajax event handlers for the Execute routine functionality
|
||||
*/
|
||||
$('a.ajax.exec_anchor').live('click', function (event) {
|
||||
$(document).on('click', 'a.ajax.exec_anchor', function (event) {
|
||||
event.preventDefault();
|
||||
var dialog = new RTE.object('routine');
|
||||
dialog.executeDialog($(this));
|
||||
@ -800,7 +800,7 @@ $(function () {
|
||||
/**
|
||||
* Attach Ajax event handlers for Export of Routines, Triggers and Events
|
||||
*/
|
||||
$('a.ajax.export_anchor').live('click', function (event) {
|
||||
$(document).on('click', 'a.ajax.export_anchor', function (event) {
|
||||
event.preventDefault();
|
||||
var dialog = new RTE.object();
|
||||
dialog.exportDialog($(this));
|
||||
@ -810,7 +810,7 @@ $(function () {
|
||||
* Attach Ajax event handlers for Drop functionality
|
||||
* of Routines, Triggers and Events.
|
||||
*/
|
||||
$('a.ajax.drop_anchor').live('click', function (event) {
|
||||
$(document).on('click', 'a.ajax.drop_anchor', function (event) {
|
||||
event.preventDefault();
|
||||
var dialog = new RTE.object();
|
||||
dialog.dropDialog($(this));
|
||||
@ -821,7 +821,7 @@ $(function () {
|
||||
* functionality in the events editor, so that the correct
|
||||
* rows are shown in the editor when changing the event type
|
||||
*/
|
||||
$('select[name=item_type]').live('change', function () {
|
||||
$(document).on('change', 'select[name=item_type]', function () {
|
||||
$(this)
|
||||
.closest('table')
|
||||
.find('tr.recurring_event_row, tr.onetime_event_row, tr.routine_return_row, td.routine_direction_cell')
|
||||
@ -834,7 +834,7 @@ $(function () {
|
||||
* option/length fields, if any, are shown when changing
|
||||
* a parameter type
|
||||
*/
|
||||
$('select[name^=item_param_type]').live('change', function () {
|
||||
$(document).on('change', 'select[name^=item_param_type]', function () {
|
||||
/**
|
||||
* @var row jQuery object containing the reference to
|
||||
* a row in the routine parameters table
|
||||
@ -854,7 +854,7 @@ $(function () {
|
||||
* variable of function" functionality, so that the correct fields,
|
||||
* if any, are shown when changing the function return type type
|
||||
*/
|
||||
$('select[name=item_returntype]').live('change', function () {
|
||||
$(document).on('change', 'select[name=item_returntype]', function () {
|
||||
var rte = new RTE.object('routine');
|
||||
var $table = $(this).closest('table.rte_table');
|
||||
rte.setOptionsForParameter(
|
||||
@ -868,7 +868,7 @@ $(function () {
|
||||
/**
|
||||
* Attach Ajax event handlers for the "Add parameter to routine" functionality
|
||||
*/
|
||||
$('input[name=routine_addparameter]').live('click', function (event) {
|
||||
$(document).on('click', 'input[name=routine_addparameter]', function (event) {
|
||||
event.preventDefault();
|
||||
/**
|
||||
* @var routine_params_table jQuery object containing the reference
|
||||
@ -906,7 +906,7 @@ $(function () {
|
||||
* Attach Ajax event handlers for the
|
||||
* "Remove parameter from routine" functionality
|
||||
*/
|
||||
$('a.routine_param_remove_anchor').live('click', function (event) {
|
||||
$(document).on('click', 'a.routine_param_remove_anchor', function (event) {
|
||||
event.preventDefault();
|
||||
$(this).parent().parent().remove();
|
||||
// After removing a parameter, the indices of the name attributes in
|
||||
|
||||
@ -12,8 +12,8 @@
|
||||
* Unbind all event handlers before tearing down a page
|
||||
*/
|
||||
AJAX.registerTeardown('server_databases.js', function () {
|
||||
$("#dbStatsForm").die('submit');
|
||||
$('#create_database_form.ajax').die('submit');
|
||||
$(document).off('submit', "#dbStatsForm");
|
||||
$(document).off('submit', '#create_database_form.ajax');
|
||||
});
|
||||
|
||||
/**
|
||||
@ -27,7 +27,7 @@ AJAX.registerOnload('server_databases.js', function () {
|
||||
/**
|
||||
* Attach Event Handler for 'Drop Databases'
|
||||
*/
|
||||
$("#dbStatsForm").live('submit', function (event) {
|
||||
$(document).on('submit', "#dbStatsForm", function (event) {
|
||||
event.preventDefault();
|
||||
|
||||
var $form = $(this);
|
||||
@ -91,7 +91,7 @@ AJAX.registerOnload('server_databases.js', function () {
|
||||
/**
|
||||
* Attach Ajax event handlers for 'Create Database'.
|
||||
*/
|
||||
$('#create_database_form.ajax').live('submit', function (event) {
|
||||
$(document).on('submit', '#create_database_form.ajax', function (event) {
|
||||
event.preventDefault();
|
||||
|
||||
var $form = $(this);
|
||||
|
||||
@ -51,21 +51,21 @@ function checkAddUser(the_form)
|
||||
* Unbind all event handlers before tearing down a page
|
||||
*/
|
||||
AJAX.registerTeardown('server_privileges.js', function () {
|
||||
$("#fieldset_add_user_login input[name='username']").die("focusout");
|
||||
$("#fieldset_delete_user_footer #buttonGo.ajax").die('click');
|
||||
$("a.edit_user_group_anchor.ajax").die('click');
|
||||
$("button.mult_submit[value=export]").die('click');
|
||||
$("a.export_user_anchor.ajax").die('click');
|
||||
$(document).off("focusout", "#fieldset_add_user_login input[name='username']");
|
||||
$(document).off('click', "#fieldset_delete_user_footer #buttonGo.ajax");
|
||||
$(document).off('click', "a.edit_user_group_anchor.ajax");
|
||||
$(document).off('click', "button.mult_submit[value=export]");
|
||||
$(document).off('click', "a.export_user_anchor.ajax");
|
||||
$("#initials_table").find("a.ajax").die('click');
|
||||
$('#checkbox_drop_users_db').unbind('click');
|
||||
$(".checkall_box").die("click");
|
||||
$(document).off("click", ".checkall_box");
|
||||
});
|
||||
|
||||
AJAX.registerOnload('server_privileges.js', function () {
|
||||
/**
|
||||
* Display a warning if there is already a user by the name entered as the username.
|
||||
*/
|
||||
$("#fieldset_add_user_login input[name='username']").live("focusout", function () {
|
||||
$(document).on("focusout", "#fieldset_add_user_login input[name='username']", function () {
|
||||
var username = $(this).val();
|
||||
var $warning = $("#user_exists_warning");
|
||||
if ($("#select_pred_username").val() == 'userdefined' && username !== '') {
|
||||
@ -96,7 +96,7 @@ AJAX.registerOnload('server_privileges.js', function () {
|
||||
* @memberOf jQuery
|
||||
* @name revoke_user_click
|
||||
*/
|
||||
$("#fieldset_delete_user_footer #buttonGo.ajax").live('click', function (event) {
|
||||
$(document).on('click', "#fieldset_delete_user_footer #buttonGo.ajax", function (event) {
|
||||
event.preventDefault();
|
||||
|
||||
var $thisButton = $(this);
|
||||
@ -153,7 +153,7 @@ AJAX.registerOnload('server_privileges.js', function () {
|
||||
|
||||
}); // end Revoke User
|
||||
|
||||
$("a.edit_user_group_anchor.ajax").live('click', function (event) {
|
||||
$(document).on('click', "a.edit_user_group_anchor.ajax", function (event) {
|
||||
event.preventDefault();
|
||||
$(this).parents('tr').addClass('current_row');
|
||||
var token = $(this).parents('form').find('input[name="token"]').val();
|
||||
@ -229,7 +229,7 @@ AJAX.registerOnload('server_privileges.js', function () {
|
||||
* @memberOf jQuery
|
||||
* @name export_user_click
|
||||
*/
|
||||
$("button.mult_submit[value=export]").live('click', function (event) {
|
||||
$(document).on('click', "button.mult_submit[value=export]", function (event) {
|
||||
event.preventDefault();
|
||||
// can't export if no users checked
|
||||
if ($(this.form).find("input:checked").length === 0) {
|
||||
@ -289,7 +289,7 @@ AJAX.registerOnload('server_privileges.js', function () {
|
||||
);
|
||||
}
|
||||
|
||||
$("a.export_user_anchor.ajax").live('click', function (event) {
|
||||
$(document).on('click', "a.export_user_anchor.ajax", function (event) {
|
||||
event.preventDefault();
|
||||
var $msgbox = PMA_ajaxShowMessage();
|
||||
/**
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
* Unbind all event handlers before tearing down a page
|
||||
*/
|
||||
AJAX.registerTeardown('server_user_groups.js', function () {
|
||||
$("a.deleteUserGroup.ajax").die('click');
|
||||
$(document).off('click', "a.deleteUserGroup.ajax");
|
||||
});
|
||||
|
||||
/**
|
||||
@ -13,7 +13,7 @@ AJAX.registerOnload('server_user_groups.js', function () {
|
||||
// update the checkall checkbox on Edit user group page
|
||||
$(checkboxes_sel).trigger("change");
|
||||
|
||||
$("a.deleteUserGroup.ajax").live('click', function (event) {
|
||||
$(document).on('click', "a.deleteUserGroup.ajax", function (event) {
|
||||
event.preventDefault();
|
||||
var $link = $(this);
|
||||
var groupName = $link.parents('tr').find('td:first').text();
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
AJAX.registerTeardown('server_variables.js', function () {
|
||||
$('#serverVariables .var-row').unbind('hover');
|
||||
$('#filterText').unbind('keyup');
|
||||
$('a.editLink').die('click');
|
||||
$(document).off('click', 'a.editLink');
|
||||
$('#serverVariables').find('.var-name').find('a img').remove();
|
||||
});
|
||||
|
||||
|
||||
42
js/sql.js
42
js/sql.js
@ -84,21 +84,21 @@ function getFieldName($table_results, $this_field)
|
||||
* Unbind all event handlers before tearing down a page
|
||||
*/
|
||||
AJAX.registerTeardown('sql.js', function () {
|
||||
$('a.delete_row.ajax').die('click');
|
||||
$('.bookmarkQueryForm').die('submit');
|
||||
$(document).off('click', 'a.delete_row.ajax');
|
||||
$(document).off('submit', '.bookmarkQueryForm');
|
||||
$('input#bkm_label').unbind('keyup');
|
||||
$(".sqlqueryresults").die('makegrid');
|
||||
$(".sqlqueryresults").die('stickycolumns');
|
||||
$(document).off('makegrid', ".sqlqueryresults");
|
||||
$(document).off('stickycolumns', ".sqlqueryresults");
|
||||
$("#togglequerybox").unbind('click');
|
||||
$("#button_submit_query").die('click');
|
||||
$(document).off('click', "#button_submit_query");
|
||||
$("input[name=bookmark_variable]").unbind("keypress");
|
||||
$("#sqlqueryform.ajax").die('submit');
|
||||
$("input[name=navig].ajax").die('click');
|
||||
$("form[name='displayOptionsForm'].ajax").die('submit');
|
||||
$('th.column_heading.pointer').die('hover');
|
||||
$('th.column_heading.marker').die('click');
|
||||
$(document).off('submit', "#sqlqueryform.ajax");
|
||||
$(document).off('click', "input[name=navig].ajax");
|
||||
$(document).off('submit', "form[name='displayOptionsForm'].ajax");
|
||||
$(document).off('hover', 'th.column_heading.pointer');
|
||||
$(document).off('click', 'th.column_heading.marker');
|
||||
$(window).unbind('scroll');
|
||||
$(".filter_rows").die("keyup");
|
||||
$(document).off("keyup", ".filter_rows");
|
||||
$('body').off('click', '.navigation .showAllRows');
|
||||
$('body').off('click','a.browse_foreign');
|
||||
$('body').off('click', '#simulate_dml');
|
||||
@ -124,7 +124,7 @@ AJAX.registerTeardown('sql.js', function () {
|
||||
*/
|
||||
AJAX.registerOnload('sql.js', function () {
|
||||
// Delete row from SQL results
|
||||
$('a.delete_row.ajax').live('click', function (e) {
|
||||
$(document).on('click', 'a.delete_row.ajax', function (e) {
|
||||
e.preventDefault();
|
||||
var question = PMA_sprintf(PMA_messages.strDoYouReally, escapeHtml($(this).closest('td').find('div').text()));
|
||||
var $link = $(this);
|
||||
@ -142,7 +142,7 @@ AJAX.registerOnload('sql.js', function () {
|
||||
});
|
||||
|
||||
// Ajaxification for 'Bookmark this SQL query'
|
||||
$('.bookmarkQueryForm').live('submit', function (e) {
|
||||
$(document).on('submit', '.bookmarkQueryForm', function (e) {
|
||||
e.preventDefault();
|
||||
PMA_ajaxShowMessage();
|
||||
$.post($(this).attr('action'), 'ajax_request=1&' + $(this).serialize(), function (data) {
|
||||
@ -166,7 +166,7 @@ AJAX.registerOnload('sql.js', function () {
|
||||
* triggered manually everytime the table of results is reloaded
|
||||
* @memberOf jQuery
|
||||
*/
|
||||
$(".sqlqueryresults").live('makegrid', function () {
|
||||
$(document).on('makegrid', ".sqlqueryresults", function () {
|
||||
$('.table_results').each(function () {
|
||||
PMA_makegrid(this);
|
||||
});
|
||||
@ -177,7 +177,7 @@ AJAX.registerOnload('sql.js', function () {
|
||||
* triggered manually everytime the table of results is reloaded
|
||||
* @memberOf jQuery
|
||||
*/
|
||||
$(".sqlqueryresults").live('stickycolumns', function () {
|
||||
$(document).on('stickycolumns', ".sqlqueryresults", function () {
|
||||
$(".sticky_columns").remove();
|
||||
$(".table_results").each(function () {
|
||||
var $table_results = $(this);
|
||||
@ -230,7 +230,7 @@ AJAX.registerOnload('sql.js', function () {
|
||||
*
|
||||
* @memberOf jQuery
|
||||
*/
|
||||
$("#button_submit_query").live('click', function (event) {
|
||||
$(document).on('click', "#button_submit_query", function (event) {
|
||||
$(".success,.error").hide();
|
||||
//hide already existing error or success message
|
||||
var $form = $(this).closest("form");
|
||||
@ -274,7 +274,7 @@ AJAX.registerOnload('sql.js', function () {
|
||||
* @memberOf jQuery
|
||||
* @name sqlqueryform_submit
|
||||
*/
|
||||
$("#sqlqueryform.ajax").live('submit', function (event) {
|
||||
$(document).on('submit', "#sqlqueryform.ajax", function (event) {
|
||||
event.preventDefault();
|
||||
|
||||
var $form = $(this);
|
||||
@ -377,7 +377,7 @@ AJAX.registerOnload('sql.js', function () {
|
||||
* @memberOf jQuery
|
||||
* @name displayOptionsForm_submit
|
||||
*/
|
||||
$("form[name='displayOptionsForm'].ajax").live('submit', function (event) {
|
||||
$(document).on('submit', "form[name='displayOptionsForm'].ajax", function (event) {
|
||||
event.preventDefault();
|
||||
|
||||
$form = $(this);
|
||||
@ -396,7 +396,7 @@ AJAX.registerOnload('sql.js', function () {
|
||||
}); //end displayOptionsForm handler
|
||||
|
||||
// Filter row handling. --STARTS--
|
||||
$(".filter_rows").live("keyup", function () {
|
||||
$(document).on("keyup", ".filter_rows", function () {
|
||||
var unique_id = $(this).data("for");
|
||||
var $target_table = $(".table_results[data-uniqueId='" + unique_id + "']");
|
||||
var $header_cells = $target_table.find("th[data-column]");
|
||||
@ -641,14 +641,14 @@ AJAX.registerOnload('sql.js', function () {
|
||||
/**
|
||||
* vertical column highlighting in horizontal mode when hovering over the column header
|
||||
*/
|
||||
$('th.column_heading.pointer').live('hover', function (e) {
|
||||
$(document).on('hover', 'th.column_heading.pointer', function (e) {
|
||||
PMA_changeClassForColumn($(this), 'hover', e.type == 'mouseenter');
|
||||
});
|
||||
|
||||
/**
|
||||
* vertical column marking in horizontal mode when clicking the column header
|
||||
*/
|
||||
$('th.column_heading.marker').live('click', function () {
|
||||
$(document).on('click', 'th.column_heading.marker', function () {
|
||||
PMA_changeClassForColumn($(this), 'marked');
|
||||
});
|
||||
|
||||
|
||||
@ -324,12 +324,12 @@ function applyFunctionToAllRows(currId, functionName, copySalt, salt, targetRows
|
||||
* Unbind all event handlers before tearing down a page
|
||||
*/
|
||||
AJAX.registerTeardown('tbl_change.js', function () {
|
||||
$('span.open_gis_editor').die('click');
|
||||
$("input[name='gis_data[save]']").die('click');
|
||||
$('input.checkbox_null').die('click');
|
||||
$(document).off('click', 'span.open_gis_editor');
|
||||
$(document).off('click', "input[name='gis_data[save]']");
|
||||
$(document).off('click', 'input.checkbox_null');
|
||||
$('select[name="submit_type"]').unbind('change');
|
||||
$("#insert_rows").die('change');
|
||||
$("select[name*='funcs']").die('click');
|
||||
$(document).off('change', "#insert_rows");
|
||||
$(document).off('click', "select[name*='funcs']");
|
||||
});
|
||||
|
||||
/**
|
||||
@ -342,7 +342,7 @@ AJAX.registerTeardown('tbl_change.js', function () {
|
||||
AJAX.registerOnload('tbl_change.js', function () {
|
||||
$.datepicker.initialized = false;
|
||||
|
||||
$('span.open_gis_editor').live('click', function (event) {
|
||||
$(document).on('click', 'span.open_gis_editor', function (event) {
|
||||
event.preventDefault();
|
||||
|
||||
var $span = $(this);
|
||||
@ -368,7 +368,7 @@ AJAX.registerOnload('tbl_change.js', function () {
|
||||
/**
|
||||
* Uncheck the null checkbox as geometry data is placed on the input field
|
||||
*/
|
||||
$("input[name='gis_data[save]']").live('click', function (event) {
|
||||
$(document).on('click', "input[name='gis_data[save]']", function (event) {
|
||||
var input_name = $('form#gis_data_editor_form').find("input[name='input_name']").val();
|
||||
var $null_checkbox = $("input[name='" + input_name + "']").parents('tr').find('.checkbox_null');
|
||||
$null_checkbox.prop('checked', false);
|
||||
@ -380,7 +380,7 @@ AJAX.registerOnload('tbl_change.js', function () {
|
||||
* "Continue insertion" are handled in the "Continue insertion" code
|
||||
*
|
||||
*/
|
||||
$('input.checkbox_null').live('click', function (e) {
|
||||
$(document).on('click', 'input.checkbox_null', function (e) {
|
||||
nullify(
|
||||
// use hidden fields populated by tbl_change.php
|
||||
$(this).siblings('.nullify_code').val(),
|
||||
@ -424,7 +424,7 @@ AJAX.registerOnload('tbl_change.js', function () {
|
||||
/**
|
||||
* Continue Insertion form
|
||||
*/
|
||||
$("#insert_rows").live('change', function (event) {
|
||||
$(document).on('change', "#insert_rows", function (event) {
|
||||
event.preventDefault();
|
||||
/**
|
||||
* @var columnCount Number of number of columns table has.
|
||||
@ -641,7 +641,7 @@ AJAX.registerOnload('tbl_change.js', function () {
|
||||
PMA_messages.strFunctionHint
|
||||
);
|
||||
|
||||
$("select[name*='funcs']").live('click', function (event) {
|
||||
$(document).on('click', "select[name*='funcs']", function (event) {
|
||||
if (! event.shiftKey) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -394,7 +394,7 @@ AJAX.registerOnload('tbl_chart.js', function () {
|
||||
* Ajax Event handler for 'Go' button click
|
||||
*
|
||||
*/
|
||||
$("#tblchartform").live('submit', function (event) {
|
||||
$(document).on('submit', "#tblchartform", function (event) {
|
||||
if (!checkFormElementInRange(this, 'session_max_rows', PMA_messages.strNotValidRowNumber, 1) ||
|
||||
!checkFormElementInRange(this, 'pos', PMA_messages.strNotValidRowNumber, 0 - 1)
|
||||
) {
|
||||
|
||||
@ -181,19 +181,19 @@ function getRelativeCoords(e) {
|
||||
* Unbind all event handlers before tearing down a page
|
||||
*/
|
||||
AJAX.registerTeardown('tbl_gis_visualization.js', function () {
|
||||
$('#choice').die('click');
|
||||
$('#placeholder').die('mousewheel');
|
||||
$('svg').die('dragstart');
|
||||
$('svg').die('mouseup');
|
||||
$('svg').die('drag');
|
||||
$('#placeholder').die('dblclick');
|
||||
$('#zoom_in').die('click');
|
||||
$('#zoom_world').die('click');
|
||||
$('#zoom_out').die('click');
|
||||
$('#left_arrow').die('click');
|
||||
$('#right_arrow').die('click');
|
||||
$('#up_arrow').die('click');
|
||||
$('#down_arrow').die('click');
|
||||
$(document).off('click', '#choice');
|
||||
$(document).off('mousewheel', '#placeholder');
|
||||
$(document).off('dragstart', 'svg');
|
||||
$(document).off('mouseup', 'svg');
|
||||
$(document).off('drag', 'svg');
|
||||
$(document).off('dblclick', '#placeholder');
|
||||
$(document).off('click', '#zoom_in');
|
||||
$(document).off('click', '#zoom_world');
|
||||
$(document).off('click', '#zoom_out');
|
||||
$(document).off('click', '#left_arrow');
|
||||
$(document).off('click', '#right_arrow');
|
||||
$(document).off('click', '#up_arrow');
|
||||
$(document).off('click', '#down_arrow');
|
||||
$('.vector').unbind('mousemove').unbind('mouseout');
|
||||
});
|
||||
|
||||
@ -204,7 +204,7 @@ AJAX.registerOnload('tbl_gis_visualization.js', function () {
|
||||
initGISVisualization();
|
||||
}
|
||||
|
||||
$('#choice').live('click', function () {
|
||||
$(document).on('click', '#choice', function () {
|
||||
if ($(this).prop('checked') === false) {
|
||||
$('#placeholder').show();
|
||||
$('#openlayersmap').hide();
|
||||
@ -214,7 +214,7 @@ AJAX.registerOnload('tbl_gis_visualization.js', function () {
|
||||
}
|
||||
});
|
||||
|
||||
$('#placeholder').live('mousewheel', function (event, delta) {
|
||||
$(document).on('mousewheel', '#placeholder', function (event, delta) {
|
||||
var relCoords = getRelativeCoords(event);
|
||||
if (delta > 0) {
|
||||
//zoom in
|
||||
@ -237,17 +237,17 @@ AJAX.registerOnload('tbl_gis_visualization.js', function () {
|
||||
var dragX = 0;
|
||||
var dragY = 0;
|
||||
|
||||
$('svg').live('dragstart', function (event, dd) {
|
||||
$(document).on('dragstart', 'svg', function (event, dd) {
|
||||
$('#placeholder').addClass('placeholderDrag');
|
||||
dragX = Math.round(dd.offsetX);
|
||||
dragY = Math.round(dd.offsetY);
|
||||
});
|
||||
|
||||
$('svg').live('mouseup', function (event) {
|
||||
$(document).on('mouseup', 'svg', function (event) {
|
||||
$('#placeholder').removeClass('placeholderDrag');
|
||||
});
|
||||
|
||||
$('svg').live('drag', function (event, dd) {
|
||||
$(document).on('drag', 'svg', function (event, dd) {
|
||||
newX = Math.round(dd.offsetX);
|
||||
x += newX - dragX;
|
||||
dragX = newX;
|
||||
@ -257,7 +257,7 @@ AJAX.registerOnload('tbl_gis_visualization.js', function () {
|
||||
zoomAndPan();
|
||||
});
|
||||
|
||||
$('#placeholder').live('dblclick', function (event) {
|
||||
$(document).on('dblclick', '#placeholder', function (event) {
|
||||
scale *= zoomFactor;
|
||||
// zooming in keeping the position under mouse pointer unmoved.
|
||||
var relCoords = getRelativeCoords(event);
|
||||
@ -266,7 +266,7 @@ AJAX.registerOnload('tbl_gis_visualization.js', function () {
|
||||
zoomAndPan();
|
||||
});
|
||||
|
||||
$('#zoom_in').live('click', function (e) {
|
||||
$(document).on('click', '#zoom_in', function (e) {
|
||||
e.preventDefault();
|
||||
//zoom in
|
||||
scale *= zoomFactor;
|
||||
@ -279,7 +279,7 @@ AJAX.registerOnload('tbl_gis_visualization.js', function () {
|
||||
zoomAndPan();
|
||||
});
|
||||
|
||||
$('#zoom_world').live('click', function (e) {
|
||||
$(document).on('click', '#zoom_world', function (e) {
|
||||
e.preventDefault();
|
||||
scale = 1;
|
||||
x = defaultX;
|
||||
@ -287,7 +287,7 @@ AJAX.registerOnload('tbl_gis_visualization.js', function () {
|
||||
zoomAndPan();
|
||||
});
|
||||
|
||||
$('#zoom_out').live('click', function (e) {
|
||||
$(document).on('click', '#zoom_out', function (e) {
|
||||
e.preventDefault();
|
||||
//zoom out
|
||||
scale /= zoomFactor;
|
||||
@ -300,25 +300,25 @@ AJAX.registerOnload('tbl_gis_visualization.js', function () {
|
||||
zoomAndPan();
|
||||
});
|
||||
|
||||
$('#left_arrow').live('click', function (e) {
|
||||
$(document).on('click', '#left_arrow', function (e) {
|
||||
e.preventDefault();
|
||||
x += 100;
|
||||
zoomAndPan();
|
||||
});
|
||||
|
||||
$('#right_arrow').live('click', function (e) {
|
||||
$(document).on('click', '#right_arrow', function (e) {
|
||||
e.preventDefault();
|
||||
x -= 100;
|
||||
zoomAndPan();
|
||||
});
|
||||
|
||||
$('#up_arrow').live('click', function (e) {
|
||||
$(document).on('click', '#up_arrow', function (e) {
|
||||
e.preventDefault();
|
||||
y += 100;
|
||||
zoomAndPan();
|
||||
});
|
||||
|
||||
$('#down_arrow').live('click', function (e) {
|
||||
$(document).on('click', '#down_arrow', function (e) {
|
||||
e.preventDefault();
|
||||
y -= 100;
|
||||
zoomAndPan();
|
||||
|
||||
@ -51,9 +51,9 @@ function PMA_checkIfDataTypeNumericOrDate(data_type)
|
||||
*/
|
||||
AJAX.registerTeardown('tbl_select.js', function () {
|
||||
$('#togglesearchformlink').unbind('click');
|
||||
$("#tbl_search_form.ajax").die('submit');
|
||||
$(document).off('submit', "#tbl_search_form.ajax");
|
||||
$('select.geom_func').unbind('change');
|
||||
$('span.open_search_gis_editor').die('click');
|
||||
$(document).off('click', 'span.open_search_gis_editor');
|
||||
$('body').off('click', 'select[name*="criteriaColumnOperators"]');
|
||||
});
|
||||
|
||||
@ -84,7 +84,7 @@ AJAX.registerOnload('tbl_select.js', function () {
|
||||
/**
|
||||
* Ajax event handler for Table Search
|
||||
*/
|
||||
$("#tbl_search_form.ajax").live('submit', function (event) {
|
||||
$(document).on('submit', "#tbl_search_form.ajax", function (event) {
|
||||
var unaryFunctions = [
|
||||
'IS NULL',
|
||||
'IS NOT NULL',
|
||||
@ -227,7 +227,7 @@ AJAX.registerOnload('tbl_select.js', function () {
|
||||
|
||||
});
|
||||
|
||||
$('span.open_search_gis_editor').live('click', function (event) {
|
||||
$(document).on('click', 'span.open_search_gis_editor', function (event) {
|
||||
event.preventDefault();
|
||||
|
||||
var $span = $(this);
|
||||
|
||||
@ -70,11 +70,11 @@ function reloadFieldForm() {
|
||||
* Unbind all event handlers before tearing down a page
|
||||
*/
|
||||
AJAX.registerTeardown('tbl_structure.js', function () {
|
||||
$("a.drop_column_anchor.ajax").die('click');
|
||||
$("a.add_primary_key_anchor.ajax").die('click');
|
||||
$("a.add_index_anchor.ajax").die('click');
|
||||
$("a.add_unique_anchor.ajax").die('click');
|
||||
$("#move_columns_anchor").die('click');
|
||||
$(document).off('click', "a.drop_column_anchor.ajax");
|
||||
$(document).off('click', "a.add_primary_key_anchor.ajax");
|
||||
$(document).off('click', "a.add_index_anchor.ajax");
|
||||
$(document).off('click', "a.add_unique_anchor.ajax");
|
||||
$(document).off('click', "#move_columns_anchor");
|
||||
$(".append_fields_form.ajax").unbind('submit');
|
||||
$('body').off('click', '#fieldsForm.ajax button[name="submit_mult"], #fieldsForm.ajax input[name="submit_mult"]');
|
||||
});
|
||||
@ -138,7 +138,7 @@ AJAX.registerOnload('tbl_structure.js', function () {
|
||||
/**
|
||||
* Attach Event Handler for 'Drop Column'
|
||||
*/
|
||||
$("a.drop_column_anchor.ajax").live('click', function (event) {
|
||||
$(document).on('click', "a.drop_column_anchor.ajax", function (event) {
|
||||
event.preventDefault();
|
||||
/**
|
||||
* @var curr_table_name String containing the name of the current table
|
||||
@ -200,7 +200,7 @@ AJAX.registerOnload('tbl_structure.js', function () {
|
||||
/**
|
||||
* Ajax Event handler for 'Add Primary Key'
|
||||
*/
|
||||
$("a.add_primary_key_anchor.ajax").live('click', function (event) {
|
||||
$(document).on('click', "a.add_primary_key_anchor.ajax", function (event) {
|
||||
event.preventDefault();
|
||||
/**
|
||||
* @var curr_table_name String containing the name of the current table
|
||||
@ -249,7 +249,7 @@ AJAX.registerOnload('tbl_structure.js', function () {
|
||||
/**
|
||||
* Ajax Event handler for 'Add Index'
|
||||
*/
|
||||
$("a.add_index_anchor.ajax").live('click', function (event) {
|
||||
$(document).on('click', "a.add_index_anchor.ajax", function (event) {
|
||||
event.preventDefault();
|
||||
/**
|
||||
* @var curr_table_name String containing the name of the current table
|
||||
@ -293,7 +293,7 @@ AJAX.registerOnload('tbl_structure.js', function () {
|
||||
/**
|
||||
* Ajax Event handler for 'Add Unique'
|
||||
*/
|
||||
$("a.add_unique_anchor.ajax").live('click', function (event) {
|
||||
$(document).on('click', "a.add_unique_anchor.ajax", function (event) {
|
||||
event.preventDefault();
|
||||
/**
|
||||
* @var curr_table_name String containing the name of the current table
|
||||
@ -337,7 +337,7 @@ AJAX.registerOnload('tbl_structure.js', function () {
|
||||
/**
|
||||
* Inline move columns
|
||||
**/
|
||||
$("#move_columns_anchor").live('click', function (e) {
|
||||
$(document).on('click', "#move_columns_anchor", function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
if ($(this).hasClass("move-active")) {
|
||||
|
||||
@ -115,7 +115,7 @@ function ajaxValidate(parent, id, values)
|
||||
/**
|
||||
* Automatic form submission on change.
|
||||
*/
|
||||
$('.autosubmit').live('change', function (e) {
|
||||
$(document).on('change', '.autosubmit', function (e) {
|
||||
e.target.form.submit();
|
||||
});
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user