Bug #3166950 [AJAX] Empty dialog after attempt to create already existing table

This commit is contained in:
Madhura Jayaratne
2011-01-30 01:32:05 +05:30
parent dea96e2e5a
commit 1c50e94ddd

View File

@@ -1685,15 +1685,28 @@ $(document).ready(function() {
} }
$.get($form.attr('action'), $form.serialize(), function(data) { $.get($form.attr('action'), $form.serialize(), function(data) {
$('<div id="create_table_dialog"></div>') //in the case of an error, show the error message returned.
.append(data) if (data.success != undefined && data.success == false) {
.dialog({ $('<div id="create_table_dialog"></div>')
title: PMA_messages['strCreateTable'], .append(data.error)
height: 600, .dialog({
width: 900, title: PMA_messages['strCreateTable'],
open: PMA_verifyTypeOfAllColumns, height: 260,
buttons : button_options width: 900,
}); // end dialog options open: PMA_verifyTypeOfAllColumns,
buttons : button_options
})// end dialog options
} else {
$('<div id="create_table_dialog"></div>')
.append(data)
.dialog({
title: PMA_messages['strCreateTable'],
height: 600,
width: 900,
open: PMA_verifyTypeOfAllColumns,
buttons : button_options
}); // end dialog options
}
}) // end $.get() }) // end $.get()
// empty table name and number of columns from the minimal form // empty table name and number of columns from the minimal form