[Rt-commit] rt branch, 4.2/jquery-checkboxes, created. rt-4.2.0-28-g56b9974

Alex Vandiver alexmv at bestpractical.com
Wed Oct 23 15:57:19 EDT 2013


The branch, 4.2/jquery-checkboxes has been created
        at  56b99745d630642bdda8f8be4cd35a2baa8414a6 (commit)

- Log -----------------------------------------------------------------
commit 1db07064aa58a1559e99812b1c8ba9105e8e0fa9
Author: Alex Vandiver <alexmv at bestpractical.com>
Date:   Wed Oct 23 15:35:38 2013 -0400

    jQuery 1.6 uses .prop("checked") not .attr("checked")

diff --git a/share/static/js/event-registration.js b/share/static/js/event-registration.js
index f648c3c..8c2cca9 100644
--- a/share/static/js/event-registration.js
+++ b/share/static/js/event-registration.js
@@ -7,7 +7,7 @@ jQuery(function() {
     jQuery(global_checkboxes.join(", "))
         .change(function(){
             var self    = jQuery(this);
-            var checked = self.attr("checked");
+            var checked = self.prop("checked");
 
             self.closest("form")
                 .find("table.collection input[type=checkbox]")
diff --git a/share/static/js/util.js b/share/static/js/util.js
index 5a34647..15669fc 100644
--- a/share/static/js/util.js
+++ b/share/static/js/util.js
@@ -140,20 +140,20 @@ function showShredderPluginTab( plugin )
 
 function checkAllObjects()
 {
-    var check = jQuery('#shredder-select-all-objects-checkbox').attr('checked');
+    var check = jQuery('#shredder-select-all-objects-checkbox').prop('checked');
     var elements = jQuery('#shredder-search-form :checkbox[name=WipeoutObject]');
 
     if( check ) {
-        elements.attr('checked', true);
+        elements.prop('checked', true);
     } else {
-        elements.attr('checked', false);
+        elements.prop('checked', false);
     }
 }
 
 function checkboxToInput(target,checkbox,val){    
     var tar = jQuery('#' + escapeCssSelector(target));
     var box = jQuery('#' + escapeCssSelector(checkbox));
-    if(box.attr('checked')){
+    if(box.prop('checked')){
         if (tar.val()==''){
             tar.val(val);
         }

commit 56b99745d630642bdda8f8be4cd35a2baa8414a6
Author: Alex Vandiver <alexmv at bestpractical.com>
Date:   Wed Oct 23 15:42:01 2013 -0400

    Use .prop("disabled") to toggle the disabled property
    
    Setting .attr("disabled", "") is not enough to un-disable.

diff --git a/share/static/js/event-registration.js b/share/static/js/event-registration.js
index 8c2cca9..de51fcb 100644
--- a/share/static/js/event-registration.js
+++ b/share/static/js/event-registration.js
@@ -11,7 +11,7 @@ jQuery(function() {
 
             self.closest("form")
                 .find("table.collection input[type=checkbox]")
-                .attr("disabled", checked ? "disabled" : "");
+                .prop("disabled", checked);
         });
 });
 

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


More information about the Rt-commit mailing list