[Phpmyadmin-git] [SCM] phpMyAdmin branch, master, updated. RELEASE_3_3_8-10713-g91a64c1
Marc Delisle
lem9 at users.sourceforge.net
Sun Oct 31 23:01:40 CET 2010
The branch, master has been updated
via 91a64c1ee2b4720c2ae481e1de49bb9b1111ca91 (commit)
from 98066b6bcb0d25f87b718d7ee70ddfbe759b43ff (commit)
- Log -----------------------------------------------------------------
commit 91a64c1ee2b4720c2ae481e1de49bb9b1111ca91
Author: Marc Delisle <marc at infomarc.info>
Date: Sun Oct 31 18:01:31 2010 -0400
bug 3084745 (error when editing and changing nothing)
-----------------------------------------------------------------------
Summary of changes:
js/tbl_change.js | 44 +++++++++++++++++++++++++-------------------
1 files changed, 25 insertions(+), 19 deletions(-)
diff --git a/js/tbl_change.js b/js/tbl_change.js
index 51aa788..b38eeac 100644
--- a/js/tbl_change.js
+++ b/js/tbl_change.js
@@ -291,29 +291,35 @@ $(document).ready(function() {
}
$.post($form.attr('action'), $form.serialize(), function(data) {
- if(data.success == true) {
- PMA_ajaxShowMessage(data.message);
-
- $("#topmenucontainer")
- .next('div')
- .remove()
- .end()
- .after(data.sql_query);
-
- //Remove the empty notice div generated due to a NULL query passed to PMA_showMessage()
- var notice_class = $("#topmenucontainer").next("div").find('.notice');
- if($(notice_class).text() == '') {
- $(notice_class).remove();
- }
+ if (typeof data.success != 'undefined') {
+ if(data.success == true) {
+ PMA_ajaxShowMessage(data.message);
+
+ $("#topmenucontainer")
+ .next('div')
+ .remove()
+ .end()
+ .after(data.sql_query);
+
+ //Remove the empty notice div generated due to a NULL query passed to PMA_showMessage()
+ var notice_class = $("#topmenucontainer").next("div").find('.notice');
+ if($(notice_class).text() == '') {
+ $(notice_class).remove();
+ }
- var submit_type = $form.find("select[name='submit_type']").val();
- if ('insert' == submit_type || 'insertignore' == submit_type) {
- //Clear the data in the forms
- $form.find('input:reset').trigger('click');
+ var submit_type = $form.find("select[name='submit_type']").val();
+ if ('insert' == submit_type || 'insertignore' == submit_type) {
+ //Clear the data in the forms
+ $form.find('input:reset').trigger('click');
+ }
+ } else {
+ PMA_ajaxShowMessage(PMA_messages['strErrorProcessingRequest'] + " : "+data.error, "7000");
}
- }
- else {
- PMA_ajaxShowMessage(PMA_messages['strErrorProcessingRequest'] + " : "+data.error, "7000");
+ } else {
+ //happens for example when no change was done while editing
+ $('#insertForm').remove();
+ $('#topmenucontainer').after('<div id="sqlqueryresults"></div>');
+ $('#sqlqueryresults').html(data);
}
})
}) // end submission of data to be inserted into table
hooks/post-receive
--
phpMyAdmin
More information about the Git
mailing list