[Phpmyadmin-git] [SCM] phpMyAdmin branch, master, updated. RELEASE_3_4_0BETA1-1414-g5bae920

Marc Delisle lem9 at users.sourceforge.net
Mon Jan 3 22:35:15 CET 2011


The branch, master has been updated
       via  5bae920417fbc993a262e4e93af00f02ae225efe (commit)
      from  3a2e9d425faeb63f7929b977663229161ad0ee78 (commit)


- Log -----------------------------------------------------------------
commit 5bae920417fbc993a262e4e93af00f02ae225efe
Author: Marc Delisle <marc at infomarc.info>
Date:   Mon Jan 3 16:34:20 2011 -0500

    Handle null checkboxes inside rows generated by "Continue insertion"

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

Summary of changes:
 js/tbl_change.js |   20 +++++++++++++++-----
 1 files changed, 15 insertions(+), 5 deletions(-)

diff --git a/js/tbl_change.js b/js/tbl_change.js
index 736317d..ebd88ff 100644
--- a/js/tbl_change.js
+++ b/js/tbl_change.js
@@ -9,7 +9,7 @@
  */
 
 /**
- * Modify from controls when the "NULL" checkbox is selected
+ * Modify form controls when the "NULL" checkbox is checked
  *
  * @param   theType     string   the MySQL field type
  * @param   urlField    string   the urlencoded field name - OBSOLETE
@@ -243,7 +243,9 @@ $(document).ready(function() {
     $('.foreign_values_anchor').show();
 
     /**
-     * Handles all current checkboxes for Null 
+     * Handles all current checkboxes for Null; this only takes care of the
+     * checkboxes on currently displayed rows as the rows generated by 
+     * "Continue insertion" are handled in the "Continue insertion" code 
      * 
      */
     $('.checkbox_null').bind('click', function(e) {
@@ -407,12 +409,20 @@ $(document).ready(function() {
 
                     if ($this_element.is('.checkbox_null')) {
                         $this_element
+                        // this event was bound earlier by jQuery but
+                        // to the original row, not the cloned one, so unbind()
+                        .unbind('click')
+                        // Keep these values to be used when the element
+                        // will be clicked 
+                        .data('hashed_field', hashed_field)
+                        .data('new_row_index', new_row_index)
                         .bind('click', function(e) {
+                                var $changed_element = $(this);
                                 nullify(
-                                    $this_element.siblings('.nullify_code').val(),
+                                    $changed_element.siblings('.nullify_code').val(),
                                     $this_element.closest('tr').find('input:hidden').first().val(), 
-                                    hashed_field, 
-                                    '[multi_edit][' + new_row_index + ']'
+                                    $changed_element.data('hashed_field'), 
+                                    '[multi_edit][' + $changed_element.data('new_row_index') + ']'
                                     );
                         });
                     }


hooks/post-receive
-- 
phpMyAdmin




More information about the Git mailing list