From a6f5f95600c1ad0b121de79f0d8791ae1612c2f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Pracha=C5=99?= Date: Fri, 4 Feb 2011 02:10:50 +0100 Subject: [PATCH] Fix ajax dropping multiple column index. --- js/tbl_structure.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/js/tbl_structure.js b/js/tbl_structure.js index 2720b5104..e7fc1d20b 100644 --- a/js/tbl_structure.js +++ b/js/tbl_structure.js @@ -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);