From 49c6c279ab7dd42fe972225c50622ed263f81e7b Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Thu, 18 Nov 2010 10:15:14 +0300 Subject: assorted DnD and pref layout fixes --- lib/CheckBoxTree.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'lib/CheckBoxTree.js') diff --git a/lib/CheckBoxTree.js b/lib/CheckBoxTree.js index 35e7039ba..fb532801c 100644 --- a/lib/CheckBoxTree.js +++ b/lib/CheckBoxTree.js @@ -104,9 +104,10 @@ dojo.declare( "lib.CheckBoxStoreModel", dijit.tree.TreeStoreModel, // | var currState = model.getCheckboxState(item); // var currState = undefined; - + // Special handling required for the 'fake' root entry (the root is NOT a dojo.data.item). - if ( storeItem == this.root ) { + // this stuff is only relevant for Forest store -fox +/* if ( storeItem == this.root ) { if( typeof(storeItem.checkbox) == "undefined" ) { this.root.checkbox = undefined; // create a new checbox reference as undefined. if( this.checkboxRoot ) { @@ -121,7 +122,14 @@ dojo.declare( "lib.CheckBoxStoreModel", dijit.tree.TreeStoreModel, this._setCheckboxState( storeItem, this.checkboxState ); currState = this.checkboxState; } + } */ + + currState = this.store.getValue(storeItem, this.checkboxIdent); + if( currState == undefined && this.checkboxAll) { + this._setCheckboxState( storeItem, this.checkboxState ); + currState = this.checkboxState; } + return currState // the current state of the checkbox (true/false or undefined) }, -- cgit v1.2.3