unneeded wrapping of jQuery objects; prefix their name with dollar sign
This commit is contained in:
@@ -97,21 +97,23 @@ $(document).ready(function() {
|
|||||||
$(".drop_table_anchor").live('click', function(event) {
|
$(".drop_table_anchor").live('click', function(event) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
|
|
||||||
|
var $this_anchor = $(this);
|
||||||
|
|
||||||
//extract current table name and build the question string
|
//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 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 String containing the question to be asked for confirmation
|
||||||
*/
|
*/
|
||||||
var question = 'DROP TABLE ' + curr_table_name;
|
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']);
|
PMA_ajaxShowMessage(PMA_messages['strProcessingRequest']);
|
||||||
|
|
||||||
@@ -119,13 +121,12 @@ $(document).ready(function() {
|
|||||||
if (data.success == true) {
|
if (data.success == true) {
|
||||||
PMA_ajaxShowMessage(data.message);
|
PMA_ajaxShowMessage(data.message);
|
||||||
//need to find a better solution here. The icon should be replaced
|
//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) {
|
if (window.parent && window.parent.frame_navigation) {
|
||||||
window.parent.frame_navigation.location.reload();
|
window.parent.frame_navigation.location.reload();
|
||||||
}
|
}
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
PMA_ajaxShowMessage(PMA_messages['strErrorProcessingRequest'] + " : " + data.error);
|
PMA_ajaxShowMessage(PMA_messages['strErrorProcessingRequest'] + " : " + data.error);
|
||||||
}
|
}
|
||||||
}); // end $.get()
|
}); // end $.get()
|
||||||
|
Reference in New Issue
Block a user