The branch, master has been updated via 5a72c4ea7dd375d38cd01c4cf02b31f57b29f15c (commit) from e16182441861e255b26d0216ae3e531b1c309098 (commit)
- Log ----------------------------------------------------------------- commit 5a72c4ea7dd375d38cd01c4cf02b31f57b29f15c Author: Marc Delisle marc@infomarc.info Date: Sun Nov 14 07:48:48 2010 -0500
unneeded wrapping of jQuery objects; prefix their name with dollar sign
-----------------------------------------------------------------------
Summary of changes: js/db_structure.js | 17 +++++++++-------- 1 files changed, 9 insertions(+), 8 deletions(-)
diff --git a/js/db_structure.js b/js/db_structure.js index 1c8c64c..f74cc26 100644 --- a/js/db_structure.js +++ b/js/db_structure.js @@ -97,35 +97,36 @@ $(document).ready(function() { $(".drop_table_anchor").live('click', function(event) { event.preventDefault();
+ var $this_anchor = $(this); + //extract current table name and build the question string /** - * @var curr_row Object containing reference to the current row + * @var $curr_row Object containing reference to the current row */ - var curr_row = $(this).parents('tr'); + var $curr_row = $this_anchor.parents('tr'); /** * @var curr_table_name String containing the name of the table to be truncated */ - var curr_table_name = $(curr_row).children('th').children('a').text(); + var curr_table_name = $curr_row.children('th').children('a').text(); /** * @var question String containing the question to be asked for confirmation */ var question = 'DROP TABLE ' + curr_table_name;
- $(this).PMA_confirm(question, $(this).attr('href'), function(url) { + $this_anchor.PMA_confirm(question, $this_anchor.attr('href'), function(url) {
PMA_ajaxShowMessage(PMA_messages['strProcessingRequest']);
$.get(url, {'is_js_confirmed' : 1, 'ajax_request' : true}, function(data) { - if(data.success == true) { + if (data.success == true) { PMA_ajaxShowMessage(data.message); //need to find a better solution here. The icon should be replaced - $(curr_row).hide("medium").remove(); + $curr_row.hide("medium").remove();
if (window.parent && window.parent.frame_navigation) { window.parent.frame_navigation.location.reload(); } - } - else { + } else { PMA_ajaxShowMessage(PMA_messages['strErrorProcessingRequest'] + " : " + data.error); } }); // end $.get()
hooks/post-receive