Fix ajax dropping multiple column index.
This commit is contained in:

committed by
Marc Delisle

parent
9b4543f2e8
commit
a6f5f95600
@@ -118,6 +118,13 @@ $(document).ready(function() {
|
||||
* @var curr_row Object containing reference to the current field's row
|
||||
*/
|
||||
var curr_row = $(this).parents('tr');
|
||||
/** @var Number of columns in the key */
|
||||
var rows = $(this).parents('td').attr('rowspan') || 1;
|
||||
/** @var Rows that should be hidden */
|
||||
var rows_to_hide = curr_row;
|
||||
for (var i = 1, last_row = curr_row.next(); i < rows; i++, last_row = last_row.next()) {
|
||||
rows_to_hide = rows_to_hide.add(last_row);
|
||||
}
|
||||
|
||||
var question = $(curr_row).children('td').children('.drop_primary_key_index_msg').val();
|
||||
|
||||
@@ -128,7 +135,7 @@ $(document).ready(function() {
|
||||
$.get(url, {'is_js_confirmed': 1, 'ajax_request': true}, function(data) {
|
||||
if(data.success == true) {
|
||||
PMA_ajaxShowMessage(data.message);
|
||||
$(curr_row).hide("medium").remove();
|
||||
rows_to_hide.hide("medium").remove();
|
||||
}
|
||||
else {
|
||||
PMA_ajaxShowMessage(PMA_messages['strErrorProcessingRequest'] + " : " + data.error);
|
||||
|
Reference in New Issue
Block a user