[Phpmyadmin-git] [SCM] phpMyAdmin branch, master, updated. RELEASE_3_4_0BETA2-1494-g41e0d5c
Madhura Jayaratne
madhuracj at users.sourceforge.net
Sat Jan 29 21:14:48 CET 2011
The branch, master has been updated
via 41e0d5cc53d255cc87dc696d492e743ced3097b7 (commit)
via 88bde613d2ac44b062c377db08caa342049c4d08 (commit)
via 1c50e94ddd7565981cefdeb9b5c109ab473252dc (commit)
from b6e62ff786339518f5289307eb2d4d8eb3f12684 (commit)
- Log -----------------------------------------------------------------
commit 41e0d5cc53d255cc87dc696d492e743ced3097b7
Merge: 88bde613d2ac44b062c377db08caa342049c4d08 b6e62ff786339518f5289307eb2d4d8eb3f12684
Author: Madhura Jayaratne <madhura.cj at gmail.com>
Date: Sun Jan 30 01:44:03 2011 +0530
Merge branch 'master' of ssh://phpmyadmin.git.sourceforge.net/gitroot/phpmyadmin/phpmyadmin
commit 88bde613d2ac44b062c377db08caa342049c4d08
Author: Madhura Jayaratne <madhura.cj at gmail.com>
Date: Sun Jan 30 01:41:26 2011 +0530
Button caption changed to 'OK' in the case of an error. Redundant 'Back' link removed from the error message.
commit 1c50e94ddd7565981cefdeb9b5c109ab473252dc
Author: Madhura Jayaratne <madhura.cj at gmail.com>
Date: Sun Jan 30 01:32:05 2011 +0530
Bug #3166950 [AJAX] Empty dialog after attempt to create already existing table
-----------------------------------------------------------------------
Summary of changes:
js/functions.js | 36 +++++++++++++++++++++++++++---------
1 files changed, 27 insertions(+), 9 deletions(-)
diff --git a/js/functions.js b/js/functions.js
index a13758e..2c8d2a1 100644
--- a/js/functions.js
+++ b/js/functions.js
@@ -1679,21 +1679,39 @@ $(document).ready(function() {
// in the following function we need to use $(this)
button_options[PMA_messages['strCancel']] = function() {$(this).dialog('close').remove();}
+ var button_options_error = {};
+ button_options_error[PMA_messages['strOK']] = function() {$(this).dialog('close').remove();}
+
PMA_ajaxShowMessage();
if (! $form.find('input:hidden').is('#ajax_request_hidden')) {
$form.append('<input type="hidden" id="ajax_request_hidden" name="ajax_request" value="true" />');
}
$.get($form.attr('action'), $form.serialize(), function(data) {
- $('<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
+ //in the case of an error, show the error message returned.
+ if (data.success != undefined && data.success == false) {
+ $('<div id="create_table_dialog"></div>')
+ .append(data.error)
+ .dialog({
+ title: PMA_messages['strCreateTable'],
+ height: 230,
+ width: 900,
+ open: PMA_verifyTypeOfAllColumns,
+ buttons : button_options_error
+ })// end dialog options
+ //remove the redundant [Back] link in the error message//
+ .find('fieldset').remove();
+ } 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()
// empty table name and number of columns from the minimal form
hooks/post-receive
--
phpMyAdmin
More information about the Git
mailing list