From d967510e0cef4d0ca20d68af944f324a62991aa2 Mon Sep 17 00:00:00 2001 From: Rouslan Placella Date: Fri, 27 Apr 2012 20:27:21 +0100 Subject: [PATCH] Fixed incorrect page update after moving some columns in tbl_structure.php --- js/tbl_structure.js | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/js/tbl_structure.js b/js/tbl_structure.js index 04539cfd67..741795d5ab 100644 --- a/js/tbl_structure.js +++ b/js/tbl_structure.js @@ -637,20 +637,14 @@ $(function() { /** * Reload fields table */ - function reloadFieldForm() { $.post($("#fieldsForm").attr('action'), $("#fieldsForm").serialize()+"&ajax_request=true", function(form_data) { - $("#fieldsForm").remove(); - $("#addColumns").remove(); var $temp_div = $("
").append(form_data); - if ($("#sqlqueryresults").length != 0) { - $temp_div.find("#fieldsForm").insertAfter("#sqlqueryresults"); - } else { - $temp_div.find("#fieldsForm").insertAfter("#floating_menubar"); - } - $temp_div.find("#addColumns").insertBefore("iframe.IE_hack"); + $("#fieldsForm").replaceWith($temp_div.find("#fieldsForm")); + $("#addColumns").replaceWith($temp_div.find("#addColumns")); + $('#move_columns_dialog ul').replaceWith($temp_div.find("#move_columns_dialog ul")); $("#moveColumns").removeClass("move-active"); - /*Call the function to display the more options in table*/ + /* Call the function to display the more options in table */ $table_clone = false; $("div.replace_in_more").hide(); // fix "more" dropdown moreOptsMenuResize();