The branch, master has been updated
via 63a224b05af1fc40cdf28a66f309ece251a0983b (commit)
via ac1bdef78428ec60500574f320d815d17ba6a327 (commit)
from 8cbee94e5d284ddfeda527379b9893e737bc5d4f (commit)
- Log -----------------------------------------------------------------
commit 63a224b05af1fc40cdf28a66f309ece251a0983b
Author: Marc Delisle <marc(a)infomarc.info>
Date: Sun Jan 23 07:34:50 2011 -0500
Bug #3163260 Database copy: Error hides too quickly
commit ac1bdef78428ec60500574f320d815d17ba6a327
Author: Marc Delisle <marc(a)infomarc.info>
Date: Sun Jan 23 07:18:09 2011 -0500
Remove unneeded wrapping of jQuery object
Avoid unneeded generating of hidden field
-----------------------------------------------------------------------
Summary of changes:
js/db_operations.js | 16 +++++++++++-----
1 files changed, 11 insertions(+), 5 deletions(-)
diff --git a/js/db_operations.js b/js/db_operations.js
index 502ca0d..0f9240a 100644
--- a/js/db_operations.js
+++ b/js/db_operations.js
@@ -85,11 +85,17 @@ $(document).ready(function() {
event.preventDefault();
PMA_ajaxShowMessage(PMA_messages['strCopyingDatabase']);
- $(this).append('<input type="hidden"
name="ajax_request" value="true" />');
-
- $.get($(this).attr('action'), $(this).serialize(), function(data) {
+ $form = $(this);
+ 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) {
+ // use messages that stay on screen
+ $('.success').fadeOut();
+ $('.error').fadeOut();
if(data.success == true) {
- PMA_ajaxShowMessage(data.message);
+ $('#topmenucontainer').after(data.message);
if( $("#checkbox_switch").is(":checked")) {
window.parent.db = data.newname;
window.parent.refreshMain();
@@ -97,7 +103,7 @@ $(document).ready(function() {
}
}
else {
- PMA_ajaxShowMessage(data.error);
+ $('#topmenucontainer').after(data.error);
}
}) // end $.get
}) // end copy database
hooks/post-receive
--
phpMyAdmin