Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/phpmyadmin/phpmyadmin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc Delisle <marc@infomarc.info>2011-01-23 15:18:09 +0300
committerMarc Delisle <marc@infomarc.info>2011-01-23 15:18:09 +0300
commitac1bdef78428ec60500574f320d815d17ba6a327 (patch)
tree8b3579c02e9069979c83ab1c15da02c858309611 /js/db_operations.js
parent8cbee94e5d284ddfeda527379b9893e737bc5d4f (diff)
Remove unneeded wrapping of jQuery object
Avoid unneeded generating of hidden field
Diffstat (limited to 'js/db_operations.js')
-rw-r--r--js/db_operations.js7
1 files changed, 5 insertions, 2 deletions
diff --git a/js/db_operations.js b/js/db_operations.js
index 502ca0d00a..93d13c4790 100644
--- a/js/db_operations.js
+++ b/js/db_operations.js
@@ -85,9 +85,12 @@ $(document).ready(function() {
event.preventDefault();
PMA_ajaxShowMessage(PMA_messages['strCopyingDatabase']);
- $(this).append('<input type="hidden" name="ajax_request" value="true" />');
+ $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($(this).attr('action'), $(this).serialize(), function(data) {
+ $.get($form.attr('action'), $form.serialize(), function(data) {
if(data.success == true) {
PMA_ajaxShowMessage(data.message);
if( $("#checkbox_switch").is(":checked")) {