[Phpmyadmin-git] [SCM] phpMyAdmin branch, master, updated. RELEASE_3_3_8-10830-gf716903
Marc Delisle
lem9 at users.sourceforge.net
Tue Nov 9 13:44:40 CET 2010
The branch, master has been updated
via f7169036bc2bfc29c592a4debc8466e475ccfacf (commit)
via 0d40953143a739db762b49c75177f49c6cd60bbf (commit)
from 7a139d1cccb7bad55f748a82da5af106935c39d8 (commit)
- Log -----------------------------------------------------------------
commit f7169036bc2bfc29c592a4debc8466e475ccfacf
Author: Marc Delisle <marc at infomarc.info>
Date: Tue Nov 9 07:44:17 2010 -0500
in this case we need to use "this"
commit 0d40953143a739db762b49c75177f49c6cd60bbf
Author: Marc Delisle <marc at infomarc.info>
Date: Tue Nov 9 07:25:21 2010 -0500
do not generate the hidden ajax_request more than once; use a variable to refer to the form object
-----------------------------------------------------------------------
Summary of changes:
js/functions.js | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/js/functions.js b/js/functions.js
index 9015564..4ccafed 100644
--- a/js/functions.js
+++ b/js/functions.js
@@ -1626,6 +1626,7 @@ $(document).ready(function() {
*/
$("#create_table_form_minimal").live('submit', function(event) {
event.preventDefault();
+ $form = $(this);
/* @todo Validate this form! */
@@ -1634,12 +1635,15 @@ $(document).ready(function() {
* dialog
*/
var button_options = {};
+ // in the following function we need to use $(this)
button_options[PMA_messages['strCancel']] = function() {$(this).dialog('close').remove();}
PMA_ajaxShowMessage();
- $(this).append('<input type="hidden" name="ajax_request" value="true" />');
+ 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) {
$('<div id="create_table_dialog"></div>')
.append(data)
.dialog({
@@ -1650,7 +1654,7 @@ $(document).ready(function() {
}) // end $.get()
// empty table name and number of columns from the minimal form
- $(this).find('input[name=table],input[name=num_fields]').val('');
+ $form.find('input[name=table],input[name=num_fields]').val('');
});
/**
hooks/post-receive
--
phpMyAdmin
More information about the Git
mailing list