Sha256: 53143aeed27f1aa7d5aa13d2dfe6031d49bbd015ea66d4637f25e1d003861ebc

Contents?: true

Size: 1.09 KB

Versions: 5

Compression:

Stored size: 1.09 KB

Contents

// ==========================================================================
// Project:   SproutCore - JavaScript Application Framework
// Copyright: ©2006-2011 Strobe Inc. and contributors.
//            Portions ©2008-2009 Apple Inc. All rights reserved.
// License:   Licensed under MIT license (see license.js)
// ==========================================================================

// collections don't need their own rendering; however, in future, constants
// like the row height will likely be specified on the render delegate.
SC.BaseTheme.collectionRenderDelegate = SC.RenderDelegate.create({
  name: 'collection',
  
  render: function(dataSource, context) {
    context.setClass('focus', dataSource.get('isFirstResponder'));
    context.setClass('disabled', !dataSource.get('isEnabled'));
    context.setClass('active', dataSource.get('isActive'));
  },
  
  update: function(dataSource, jquery) {
    jquery.setClass('focus', dataSource.get('isFirstResponder'));
    jquery.setClass('disabled', !dataSource.get('isEnabled'));
    jquery.setClass('active', dataSource.get('isActive'));
  }
});

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
spade-0.0.1 sproutcore/frameworks/desktop/render_delegates/collection.js
sproutcore-1.5.0.pre.5 lib/frameworks/sproutcore/frameworks/desktop/render_delegates/collection.js
sproutcore-1.5.0.pre.4.1 lib/frameworks/sproutcore/frameworks/desktop/render_delegates/collection.js
sproutcore-1.5.0.pre.4 lib/frameworks/sproutcore/frameworks/desktop/render_delegates/collection.js
sproutcore-1.5.0.pre.3 lib/frameworks/sproutcore/frameworks/desktop/render_delegates/collection.js