Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

MINOR Fixed default state of PermissionCheckboxSetField

  • Loading branch information...
commit 851099d82d08d2e6921c2beabae9c61485956347 1 parent f9f6596
@chillu chillu authored
Showing with 7 additions and 2 deletions.
  1. +7 −2 javascript/PermissionCheckboxSetField.js
View
9 javascript/PermissionCheckboxSetField.js
@@ -8,6 +8,11 @@
* checking all boxes is purely presentational.
*/
$('.permissioncheckboxset .valADMIN input').entwine({
+ onmatch: function() {
+ this._super();
+
+ this.toggleCheckboxes();
+ },
onclick: function(e) {
this.toggleCheckboxes();
},
@@ -26,8 +31,8 @@
// only update attributes if previous values have been saved
var oldChecked = $(this).data('SecurityAdmin.oldChecked');
var oldDisabled = $(this).data('SecurityAdmin.oldDisabled');
- if(oldChecked != null) $(this).attr('checked', oldChecked);
- if(oldDisabled != null) $(this).attr('disabled', oldDisabled);
+ if(oldChecked !== null) $(this).attr('checked', oldChecked);
+ if(oldDisabled !== null) $(this).attr('disabled', oldDisabled);
});
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.