Conditional Ajax on table create

This commit is contained in:
Marc Delisle
2011-01-25 13:06:17 -05:00
parent 2064f09f42
commit e311848262
3 changed files with 5 additions and 5 deletions

View File

@@ -1665,7 +1665,7 @@ $(document).ready(function() {
*
* @uses PMA_ajaxShowMessage()
*/
$("#create_table_form_minimal").live('submit', function(event) {
$("#create_table_form_minimal.ajax").live('submit', function(event) {
event.preventDefault();
$form = $(this);
@@ -1708,7 +1708,7 @@ $(document).ready(function() {
*
*/
// .live() must be called after a selector, see http://api.jquery.com/live
$("#create_table_form input[name=do_save_data]").live('click', function(event) {
$("#create_table_form.ajax input[name=do_save_data]").live('click', function(event) {
event.preventDefault();
/**
@@ -1788,7 +1788,7 @@ $(document).ready(function() {
*
*/
// .live() must be called after a selector, see http://api.jquery.com/live
$("#create_table_form input[name=submit_num_fields]").live('click', function(event) {
$("#create_table_form.ajax input[name=submit_num_fields]").live('click', function(event) {
event.preventDefault();
/**

View File

@@ -36,7 +36,7 @@ require_once './libraries/check_user_privileges.lib.php';
$is_create_table_priv = true;
?>
<form id="create_table_form_minimal" method="post" action="tbl_create.php">
<form id="create_table_form_minimal" method="post" action="tbl_create.php"<?php echo ($GLOBALS['cfg']['AjaxEnable'] ? ' class="ajax"' : ''); ?>>
<fieldset>
<legend>
<?php

View File

@@ -606,7 +606,7 @@ document.onkeydown = onKeyDownArrowsHandler;
// ]]>
</script>
<form id="<?php echo ($action == 'tbl_create.php' ? 'create_table' : 'append_fields'); ?>_form" method="post" action="<?php echo $action; ?>">
<form id="<?php echo ($action == 'tbl_create.php' ? 'create_table' : 'append_fields'); ?>_form" method="post" action="<?php echo $action; ?>" <?php echo ($GLOBALS['cfg']['AjaxEnable'] ? ' class="ajax"' : ''); ?>>
<?php
echo PMA_generate_common_hidden_inputs($_form_params);
unset($_form_params);