From e98edae53be838ed13ac524f9131c064fbb7273d Mon Sep 17 00:00:00 2001 From: ninadsp Date: Sun, 11 Jul 2010 00:14:12 +0530 Subject: [PATCH] Remove previous queries if any before inserting the latest query. We don't want too many queries crowding up. --- js/db_operations.js | 6 +++++- js/server_privileges.js | 6 +++++- js/tbl_change.js | 6 +++++- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/js/db_operations.js b/js/db_operations.js index 0ce381373..48136b808 100644 --- a/js/db_operations.js +++ b/js/db_operations.js @@ -38,7 +38,11 @@ $(document).ready(function() { PMA_ajaxShowMessage(data.message); window.parent.db = data.newname; - $("#topmenucontainer").after(data.sql_query); + $("#topmenucontainer") + .next('div') + .remove() + .end() + .after(data.sql_query); $("" + PMA_messages['strReloadDatabase'] + "?").dialog({ buttons: button_options diff --git a/js/server_privileges.js b/js/server_privileges.js index 59801cad2..68c7fb461 100755 --- a/js/server_privileges.js +++ b/js/server_privileges.js @@ -133,7 +133,11 @@ $(document).ready(function() { if(data.success == true) { $("#add_user_dialog").dialog("close").remove(); PMA_ajaxShowMessage(data.message); - $("#topmenucontainer").after(data.sql_query); + $("#topmenucontainer") + .next('div') + .remove() + .end() + .after(data.sql_query); } else { PMA_ajaxShowMessage(PMA_messages['strErrorProcessingRequest'] + " : "+data.error, "7000"); diff --git a/js/tbl_change.js b/js/tbl_change.js index feda8a9ec..66c9530bd 100755 --- a/js/tbl_change.js +++ b/js/tbl_change.js @@ -265,7 +265,11 @@ $(document).ready(function() { $.post($(the_form).attr('action'), $(the_form).serialize(), function(data) { if(data.success == true) { PMA_ajaxShowMessage(data.message); - $("#topmenucontainer").after(data.sql_query); + $("#topmenucontainer") + .next('div') + .remove() + .end() + .after(data.sql_query); $(the_form).find('input:reset').trigger('click'); } else {