From ad5c7f5d0ae4e0eda4089cd760b64e4b53f0cf70 Mon Sep 17 00:00:00 2001 From: Madhura Jayaratne Date: Wed, 5 Oct 2011 08:55:19 +0530 Subject: [PATCH] bug #3418849 [interface] Inline edit shows dropdowns even after closing --- ChangeLog | 1 + js/sql.js | 25 +++++++++++++++---------- 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index edf76a79d..f884d4a93 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,6 +3,7 @@ phpMyAdmin - ChangeLog 3.4.7.0 (not yet released) - bug #3418610 [interface] Links in navigation when $cfg['MainPageIconic'] = false +- bug #3418849 [interface] Inline edit shows dropdowns even after closing 3.4.6.0 (not yet released) - patch #3404173 InnoDB comment display with tooltips/aliases diff --git a/js/sql.js b/js/sql.js index 34ab158ae..ad91104ed 100644 --- a/js/sql.js +++ b/js/sql.js @@ -710,14 +710,13 @@ $(document).ready(function() { 'sql_query' : sql_query, 'inline_edit' : true }, function(data) { - if(data.success == true) { + if(data.success == true && $edit_td.hasClass('inline_edit_active')) { $this_field.append(''); - $this_field.data('original_data', data_value); - } - else { + } else { PMA_ajaxShowMessage(data.error); } }) // end $.post() + $this_field.data('original_data', data_value); } else if($this_field.is('.relation')) { /** @lends jQuery */ @@ -738,9 +737,11 @@ $(document).ready(function() { } $.post('sql.php', post_params, function(data) { - $this_field.append(data.dropdown); - $this_field.data('original_data', data_value); + if ($edit_td.hasClass('inline_edit_active')) { + $this_field.append(data.dropdown); + } }) // end $.post() + $this_field.data('original_data', data_value); } else if($this_field.is('.enum')) { /** @lends jQuery */ @@ -759,9 +760,11 @@ $(document).ready(function() { 'curr_value' : curr_value } $.post('sql.php', post_params, function(data) { - $this_field.append(data.dropdown); - $this_field.data('original_data', data_value); + if ($edit_td.hasClass('inline_edit_active')) { + $this_field.append(data.dropdown); + } }) // end $.post() + $this_field.data('original_data', data_value); } else if($this_field.is('.set')) { /** @lends jQuery */ @@ -781,9 +784,11 @@ $(document).ready(function() { } $.post('sql.php', post_params, function(data) { - $this_field.append(data.select); - $this_field.data('original_data', data_value); + if ($edit_td.hasClass('inline_edit_active')) { + $this_field.append(data.select); + } }) // end $.post() + $this_field.data('original_data', data_value); } else if($this_field.is('.null')) { //handle null fields