The branch, master has been updated
via 5bae920417fbc993a262e4e93af00f02ae225efe (commit)
from 3a2e9d425faeb63f7929b977663229161ad0ee78 (commit)
- Log -----------------------------------------------------------------
commit 5bae920417fbc993a262e4e93af00f02ae225efe
Author: Marc Delisle <marc(a)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
The branch, master has been updated
via 3a2e9d425faeb63f7929b977663229161ad0ee78 (commit)
from 027f4286edcf9151faa886db5b5fa1bc8b18271b (commit)
- Log -----------------------------------------------------------------
commit 3a2e9d425faeb63f7929b977663229161ad0ee78
Author: Marc Delisle <marc(a)infomarc.info>
Date: Mon Jan 3 11:19:18 2011 -0500
Remove old onchange attribute
-----------------------------------------------------------------------
Summary of changes:
js/tbl_change.js | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/js/tbl_change.js b/js/tbl_change.js
index ed13f38..736317d 100644
--- a/js/tbl_change.js
+++ b/js/tbl_change.js
@@ -388,6 +388,9 @@ $(document).ready(function() {
$this_element
.attr('value', '')
.unbind('change')
+ // Remove onchange attribute that was placed
+ // by tbl_change.php; it refers to the wrong row index
+ .attr('onchange', null)
// Keep these values to be used when the element
// will change
.data('hashed_field', hashed_field)
hooks/post-receive
--
phpMyAdmin
The branch, master has been updated
via e9ee1615e75919c8963caa1af8e0fd73222b081c (commit)
from 032d6d5e0cbd16a071bbfe70f68d5008f3a07727 (commit)
- Log -----------------------------------------------------------------
commit e9ee1615e75919c8963caa1af8e0fd73222b081c
Author: Marc Delisle <marc(a)infomarc.info>
Date: Mon Jan 3 10:52:17 2011 -0500
Function was called from just one place to fold it inside caller; also recode it with jQuery
-----------------------------------------------------------------------
Summary of changes:
js/tbl_change.js | 31 ++++++-------------------------
1 files changed, 6 insertions(+), 25 deletions(-)
diff --git a/js/tbl_change.js b/js/tbl_change.js
index 66f5976..09e8264 100644
--- a/js/tbl_change.js
+++ b/js/tbl_change.js
@@ -160,7 +160,12 @@ function Validator(urlField, multi_edit,theType){
var rowForm = document.forms['insertForm'];
var evt = window.event || arguments.callee.caller.arguments[0];
var target = evt.target || evt.srcElement;
- unNullify(urlField, multi_edit);
+
+ // Unchecks the corresponding "NULL" control
+ $("input[name='fields_null[multi_edit][" + multi_edit + "][" + urlField + "]']").attr({'checked': false});
+
+ // Unchecks the Ignore checkbox for the current row
+ $("input[name='insert_ignore_" + multi_edit + "']").attr({'checked': false});
if(target.name.substring(0,6)=="fields")
{
@@ -226,30 +231,6 @@ function Validator(urlField, multi_edit,theType){
/* End of datetime validation*/
/**
- * Unchecks the "NULL" control when a function has been selected or a value
- * entered
- *
- * @param string the urlencoded field name
- * @param string the multi_edit row sequence number
- *
- * @return boolean always true
- */
-function unNullify(urlField, multi_edit)
-{
- var rowForm = document.forms['insertForm'];
-
- if (typeof(rowForm.elements['fields_null[multi_edit][' + multi_edit + '][' + urlField + ']']) != 'undefined') {
- rowForm.elements['fields_null[multi_edit][' + multi_edit + '][' + urlField + ']'].checked = false
- } // end if
-
- if (typeof(rowForm.elements['insert_ignore_' + multi_edit]) != 'undefined') {
- rowForm.elements['insert_ignore_' + multi_edit].checked = false
- } // end if
-
- return true;
-} // end of the 'unNullify()' function
-
-/**
* Ajax handlers for Change Table page
*
* Actions Ajaxified here:
hooks/post-receive
--
phpMyAdmin
The branch, master has been updated
via af4b01024a47127dfaf925353e6e7318f3dcc9c7 (commit)
via ba2326d7033e12b4ac134cbb585f016203a93517 (commit)
via 08a6fd9c12f1520518b044d87e2a4da189649580 (commit)
via 18f50cc043ed16114096b86de56335c3c78c8ad2 (commit)
via 97716f5a5a8b2ac24d2965e6b8faf6b747616d85 (commit)
via a022d7aa59fbf910626bbebcd9617c95a6c5f5d8 (commit)
via abbbd192bfd054545d53600bcbc06be3bce7fbf1 (commit)
via eaac45dfda2daa345edc5165b30bedea5a3f18a0 (commit)
from 895e69ec2ab82cd3e6fd182e697d3833e310c512 (commit)
- Log -----------------------------------------------------------------
commit af4b01024a47127dfaf925353e6e7318f3dcc9c7
Merge: 895e69ec2ab82cd3e6fd182e697d3833e310c512 ba2326d7033e12b4ac134cbb585f016203a93517
Author: Michal Čihař <mcihar(a)novell.com>
Date: Mon Jan 3 13:52:25 2011 +0100
Merge branch 'QA_3_3'
-----------------------------------------------------------------------
Summary of changes:
hooks/post-receive
--
phpMyAdmin
The branch, QA_3_3 has been updated
via ba2326d7033e12b4ac134cbb585f016203a93517 (commit)
via 08a6fd9c12f1520518b044d87e2a4da189649580 (commit)
via 97716f5a5a8b2ac24d2965e6b8faf6b747616d85 (commit)
via eaac45dfda2daa345edc5165b30bedea5a3f18a0 (commit)
from 18f50cc043ed16114096b86de56335c3c78c8ad2 (commit)
- Log -----------------------------------------------------------------
-----------------------------------------------------------------------
Summary of changes:
hooks/post-receive
--
phpMyAdmin