[Phpmyadmin-git] [SCM] phpMyAdmin branch, master, updated. RELEASE_3_4_0BETA2-1615-g7148a7a

Madhura Jayaratne madhuracj at users.sourceforge.net
Wed Feb 2 20:28:21 CET 2011


The branch, master has been updated
       via  7148a7a38046ba91595ff1d9e4f49569fd84c2a9 (commit)
       via  3e4e3fb4d62e111a43b9830a1150e27ff62a3f78 (commit)
      from  7b73bd180cceb9f304ed742f925b3ace4277047f (commit)


- Log -----------------------------------------------------------------
commit 7148a7a38046ba91595ff1d9e4f49569fd84c2a9
Merge: 3e4e3fb4d62e111a43b9830a1150e27ff62a3f78 7b73bd180cceb9f304ed742f925b3ace4277047f
Author: Madhura Jayaratne <madhura.cj at gmail.com>
Date:   Thu Feb 3 00:57:10 2011 +0530

    Merge branch 'master' of ssh://phpmyadmin.git.sourceforge.net/gitroot/phpmyadmin/phpmyadmin

commit 3e4e3fb4d62e111a43b9830a1150e27ff62a3f78
Author: Madhura Jayaratne <madhura.cj at gmail.com>
Date:   Thu Feb 3 00:51:58 2011 +0530

    Bug # 3170585 [AJAX] Adding more fields fails.

-----------------------------------------------------------------------

Summary of changes:
 js/functions.js |    9 ++++++++-
 tbl_create.php  |   14 ++++++++++++--
 2 files changed, 20 insertions(+), 3 deletions(-)

diff --git a/js/functions.js b/js/functions.js
index 164e98d..6b291fe 100644
--- a/js/functions.js
+++ b/js/functions.js
@@ -1845,7 +1845,14 @@ $(document).ready(function() {
 
         //User wants to add more fields to the table
         $.post($form.attr('action'), $form.serialize() + "&submit_num_fields=" + $(this).val(), function(data) {
-            $("#create_table_dialog").html(data);
+            // if 'create_table_dialog' exists
+        	if ($("#create_table_dialog").length > 0) {
+            	$("#create_table_dialog").html(data);
+            }
+        	// if 'create_table_div' exists
+        	if ($("#create_table_div").length > 0) {
+        		$("#create_table_div").html(data);
+        	}            
         }) //end $.post()
 
     }) // end create table form (add fields)
diff --git a/tbl_create.php b/tbl_create.php
index 4ba641e..6d569b5 100644
--- a/tbl_create.php
+++ b/tbl_create.php
@@ -288,7 +288,7 @@ if (isset($_REQUEST['do_save_data'])) {
 
             $new_table_string .= '<th>';
             $new_table_string .= '<a href="sql.php' . PMA_generate_common_url($tbl_url_params) . '">'. $table . '</a>';
-            
+
             if (PMA_Tracker::isActive()) {
                 $truename = str_replace(' ', ' ', htmlspecialchars($table));
                 if (PMA_Tracker::isTracked($db, $truename)) {
@@ -313,7 +313,7 @@ if (isset($_REQUEST['do_save_data'])) {
             $new_table_string .= '<td><a class="drop_table_anchor" href="sql.php' . PMA_generate_common_url($tbl_url_params) . '&sql_query=';
             $new_table_string .= urlencode('DROP TABLE ' . PMA_backquote($table));
             $new_table_string .= '">';
-            $new_table_string .= $titles['Drop']; 
+            $new_table_string .= $titles['Drop'];
             $new_table_string .= '</a></td>' . "\n";
 
             $new_table_string .= '<td class="value">' . $tbl_stats['Rows'] . '</td>' . "\n";
@@ -362,7 +362,17 @@ if (isset($_REQUEST['do_save_data'])) {
 /**
  * Displays the form used to define the structure of the table
  */
+
+// This div is used to show the content(eg: create table form with more columns) fetched with AJAX subsequently.
+if($GLOBALS['is_ajax_request'] != true) {
+    echo('<div id="create_table_div">');
+}
+
 require './libraries/tbl_properties.inc.php';
 // Displays the footer
 require './libraries/footer.inc.php';
+
+if($GLOBALS['is_ajax_request'] != true) {
+    echo('</div>');
+}
 ?>


hooks/post-receive
-- 
phpMyAdmin




More information about the Git mailing list