[Rt-commit] rt branch, 4.2/jquery-checkboxes, created. rt-4.2.0-28-gb03b4ad
Alex Vandiver
alexmv at bestpractical.com
Wed Oct 23 15:42:21 EDT 2013
The branch, 4.2/jquery-checkboxes has been created
at b03b4adca4436de0f51ecc0540db56dc8d46d231 (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 b03b4adca4436de0f51ecc0540db56dc8d46d231
Author: Alex Vandiver <alexmv at bestpractical.com>
Date: Wed Oct 23 15:42:01 2013 -0400
Setting disabled to "" is not enough to re-enable it; use removeAttr
diff --git a/share/static/js/event-registration.js b/share/static/js/event-registration.js
index 8c2cca9..cd8d76c 100644
--- a/share/static/js/event-registration.js
+++ b/share/static/js/event-registration.js
@@ -9,9 +9,13 @@ jQuery(function() {
var self = jQuery(this);
var checked = self.prop("checked");
- self.closest("form")
- .find("table.collection input[type=checkbox]")
- .attr("disabled", checked ? "disabled" : "");
+ var boxes = self.closest("form")
+ .find("table.collection input[type=checkbox]");
+ if (self.prop("checked")) {
+ boxes.attr("disabled", true);
+ } else {
+ boxes.removeAttr("disabled");
+ }
});
});
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list