Skip to content

Instantly share code, notes, and snippets.

@tomdale
Forked from skizzybiz/my_page.js
Created May 12, 2011 21:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tomdale/969522 to your computer and use it in GitHub Desktop.
Save tomdale/969522 to your computer and use it in GitHub Desktop.
contentView: SC.SourceListView.design({
contentBinding: 'Authoring.reportTemplatesArrayController.content',
selectionBinding: 'Authoring.reportTemplatesArrayController.selection',
exampleView: SC.View.design({
classNames: 'sc-list-item-view'.w(),
childViews: 'nameLabel'.w(),
/**
Add 'sel' class in render method.
*/
render: function(context) {
if (this.get('isSelected')) {
context.addClass('sel');
}
return sc_super();
},
nameLabel: SC.LabelView.design({
layout: { left: 10, width: 100, height: 18 },
valueBinding: '.parentView*content.name'
})
}),
rowHeight: 21,
canEditContent: NO,
canDeleteContent: NO
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment