Noticed a bug in the dialog close buttons. The html was not destroyed

after closing, so added a .remove() call everywhere.
This commit is contained in:
ninadsp
2010-06-25 00:30:23 +05:30
parent a8073a1875
commit 217968fb92
3 changed files with 9 additions and 9 deletions

View File

@@ -34,9 +34,9 @@ $(document).ready(function() {
width: 900, width: 900,
buttons : { buttons : {
"Create Table" : function() { "Create Table" : function() {
//handle form here $('#create_table_form').trigger("submit");
}, },
"Cancel" : function() {$(this).dialog('close');} "Cancel" : function() {$(this).dialog('close').remove() ;}
} }
}); });
}) })
@@ -63,7 +63,7 @@ $(document).ready(function() {
window.parent.refreshMain(); window.parent.refreshMain();
}, },
"No" : function() { "No" : function() {
$(this).dialog("close"); $(this).dialog("close").remove();
} }
} }
}) //end dialog options }) //end dialog options

View File

@@ -1798,14 +1798,14 @@ jQuery.fn.PMA_confirm = function(question, url, callbackFn) {
.prepend(question) .prepend(question)
.dialog({ .dialog({
buttons: {"OK": function(){ buttons: {"OK": function(){
$(this).dialog("close"); $(this).dialog("close").remove();
if($.isFunction(callbackFn)) { if($.isFunction(callbackFn)) {
callbackFn.call(this, url); callbackFn.call(this, url);
} }
}, },
"Cancel": function(){ "Cancel": function(){
$(this).dialog("close"); $(this).dialog("close").remove();
} }
} }
}); });
@@ -1935,4 +1935,4 @@ $(document).ready(function() {
}) })
}) })
}, 'top.frame_content'); //end $(document).ready() }, 'top.frame_content'); //end $(document).ready() for db_structure.php

View File

@@ -142,7 +142,7 @@ $(document).ready(function() {
//We also need to post the value of the submit button in order to get this to work correctly //We also need to post the value of the submit button in order to get this to work correctly
$.post($(the_form).attr('action'), $(the_form).serialize() + "&adduser_submit=" + $(this).find("input[name=adduser_submit]").attr('value'), function(data) { $.post($(the_form).attr('action'), $(the_form).serialize() + "&adduser_submit=" + $(this).find("input[name=adduser_submit]").attr('value'), function(data) {
if(data.success == true) { if(data.success == true) {
$("#add_user_dialog").dialog("close"); $("#add_user_dialog").dialog("close").remove();
PMA_ajaxShowMessage(data.message); PMA_ajaxShowMessage(data.message);
} }
else { else {
@@ -150,7 +150,7 @@ $(document).ready(function() {
} }
}) })
}, },
"Cancel" : function() {$(this).dialog("close")} "Cancel" : function() {$(this).dialog("close").remove();}
} //buttons end } //buttons end
}); //dialog options end }); //dialog options end
}); });
@@ -224,7 +224,7 @@ $(document).ready(function() {
.dialog({ .dialog({
width : 500, width : 500,
buttons: {"Close" : function() { buttons: {"Close" : function() {
$(this).dialog("close"); $(this).dialog("close").remove();
}} }}
}); });
}) //end $.get }) //end $.get