0
@@ -538,7 +538,7 @@ SC.CollectionView = SC.View.extend(SC.CollectionViewDelegate,
0
Returns the groupView that represents the passed group value.
0
- If no group view is currently rendered for the g
orup value, this method
0
+ If no group view is currently rendered for the g
roup value, this method
0
will return null. If grouping is disabled, this method will also return
0
@@ -625,6 +625,51 @@ SC.CollectionView = SC.View.extend(SC.CollectionViewDelegate,
0
+ Update the enabled status of the child views
0
+ _updateChildrensEnabledState: function(children){
0
+ // recursively running through the children
0
+ if(!children.childNodes){
0
+ //check for the empty array not necessary, as checked by observer
0
+ // if no childNodes found, children is just an array, so set the state on every item
0
+ children.each(function(s){
0
+ if(s.removeClassName){
0
+ s.removeClassName('disabled');
0
+ children.each(function(s){
0
+ s.addClassName('disabled');
0
+ } // end if(this.isEnabled)
0
+ } // end if (!children.childNodes)
0
+ children.childNodes.each(this._updateChildrensEnabledState(s));
0
+ // and set the state on the current object too
0
+ if(this.isEnabled && children.addClassName){ // if addClassName exists, so does removeClassName
0
+ children.addClassName('disabled');
0
+ children.removeClassName('disabled');
0
+ } // end childnodes found
0
+ updateChildrensEnabledState: function(){
0
+ // updating children only makes sense when there are children to update
0
+ if(this.childNodes && (this.childNodes.length>0)){
0
+ this._updateChildrensEnabledState(this.childNodes);
0
+ }.observes('isEnabled'),
0
Update the itemViews in the receiver to match the currently visible
0
content objects. Normally this method assumes the content objects
0
themselves have not changed and only updates the views if the range of
0
@@ -1055,7 +1100,7 @@ SC.CollectionView = SC.View.extend(SC.CollectionViewDelegate,
0
owner: this, displayDelegate: this
0
ret.addClassName('sc-collection-item') ; // add class name for display
0
// set content and add to content hash
0
ret.set('content', content) ;
0
this._itemViewsByContent[key] = ret ;