<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -538,7 +538,7 @@ SC.CollectionView = SC.View.extend(SC.CollectionViewDelegate,
   /**
     Returns the groupView that represents the passed group value.
     
-    If no group view is currently rendered for the gorup value, this method
+    If no group view is currently rendered for the group value, this method
     will return null.  If grouping is disabled, this method will also return
     null.
     
@@ -625,6 +625,51 @@ SC.CollectionView = SC.View.extend(SC.CollectionViewDelegate,
   //
   
   /**
+   Update the enabled status of the child views
+  
+  */
+  
+  _updateChildrensEnabledState: function(children){
+    // recursively running through the children
+    if(!children.childNodes){
+      //check for the empty array not necessary, as checked by observer
+      // if no childNodes found, children is just an array, so set the state on every item
+      if(this.isEnabled){
+         children.each(function(s){
+           if(s.removeClassName){
+             s.removeClassName('disabled');
+           }
+         });
+      }
+      else {
+        children.each(function(s){
+          if(s.addClassName){
+            s.addClassName('disabled'); 
+          }
+        });  
+      } // end if(this.isEnabled)
+    } // end if (!children.childNodes)
+    else {
+      // childnodes found
+      children.childNodes.each(this._updateChildrensEnabledState(s));
+      // and set the state on the current object too
+      if(this.isEnabled &amp;&amp; children.addClassName){ // if addClassName exists, so does removeClassName
+        children.addClassName('disabled');
+      }
+      else {
+        children.removeClassName('disabled');  
+      }    
+    } // end childnodes found
+  },
+  
+  updateChildrensEnabledState: function(){
+   // updating children only makes sense when there are children to update
+   if(this.childNodes &amp;&amp; (this.childNodes.length&gt;0)){
+      this._updateChildrensEnabledState(this.childNodes);   
+   }
+  }.observes('isEnabled'),
+  
+  /**
     Update the itemViews in the receiver to match the currently visible 
     content objects.  Normally this method assumes the content objects 
     themselves have not changed and only updates the views if the range of 
@@ -1055,7 +1100,7 @@ SC.CollectionView = SC.View.extend(SC.CollectionViewDelegate,
         owner: this, displayDelegate: this 
       }) ;
       ret.addClassName('sc-collection-item') ; // add class name for display
-      
+
       // set content and add to content hash
       ret.set('content', content) ;
       this._itemViewsByContent[key] = ret ;</diff>
      <filename>views/collection/collection.js</filename>
    </modified>
    <modified>
      <diff>@@ -317,7 +317,6 @@ SC.ListItemView = SC.View.extend(SC.Control, SC.InlineEditorDelegate,
     button.
    */
    mouseDown: function(evt) {
-
       var del = this.displayDelegate ;
       var checkboxKey = this.getDelegateProperty(del, 'contentCheckboxKey') ;
       if (checkboxKey) {
@@ -334,7 +333,6 @@ SC.ListItemView = SC.View.extend(SC.Control, SC.InlineEditorDelegate,
    mouseUp: function(evt) {
      var ret= NO ;
      if (this._isMouseDownOnCheckbox) {
-       
        // update only if mouse inside on mouse up...
        if (this._isMouseInsideCheckbox) {
          var del = this.displayDelegate ;</diff>
      <filename>views/list_item.js</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>e6917cb39a730f25a6f3781f45753ca724a7d61f</id>
    </parent>
  </parents>
  <author>
    <name>Maurits Lamers</name>
    <email>maurits@mt19.hku.nl</email>
  </author>
  <url>http://github.com/mauritslamers/sproutcore/commit/f212cda55ee2716b9f866db3d66c61190d7cddf1</url>
  <id>f212cda55ee2716b9f866db3d66c61190d7cddf1</id>
  <committed-date>2008-11-27T05:26:53-08:00</committed-date>
  <authored-date>2008-11-27T05:26:53-08:00</authored-date>
  <message>Added working disabler and enabler to SC.CollectionView</message>
  <tree>595a33314eb051f3a67ff4411f55b75219e04ebd</tree>
  <committer>
    <name>Maurits Lamers</name>
    <email>maurits@mt19.hku.nl</email>
  </committer>
</commit>
