enable checking of child checkboxes

master
Andrew Dolgov 13 years ago
parent 227cdb7222
commit bd4dfcae6e

@ -57,11 +57,12 @@ dojo.declare( "lib.CheckBoxStoreModel", dijit.tree.TreeStoreModel,
// example: // example:
// | model.updateCheckboxState(item, true); // | model.updateCheckboxState(item, true);
// //
this._setCheckboxState( storeItem, newState ); this._setCheckboxState( storeItem, newState );
if( this.checkboxStrict ) { //if( this.checkboxStrict ) { I don't need all this 1-1 stuff, only parent -> child (fox)
this._updateChildCheckbox( storeItem, newState ); this._updateChildCheckbox( storeItem, newState );
this._updateParentCheckbox( storeItem, newState ); //this._updateParentCheckbox( storeItem, newState );
} //}
}, },
setAllChecked: function(checked) { setAllChecked: function(checked) {
var items = this.store._arrayOfAllItems; var items = this.store._arrayOfAllItems;
@ -189,6 +190,7 @@ dojo.declare( "lib.CheckBoxStoreModel", dijit.tree.TreeStoreModel,
// newState: // newState:
// The new state of the checkbox: true or false // The new state of the checkbox: true or false
// //
if( this.mayHaveChildren( parentItem )) { if( this.mayHaveChildren( parentItem )) {
this.getChildren( parentItem, dojo.hitch( this, this.getChildren( parentItem, dojo.hitch( this,
function( children ) { function( children ) {

Loading…
Cancel
Save