Skip to content

Instantly share code, notes, and snippets.

@emschwar
Created January 29, 2010 20:59
Show Gist options
  • Save emschwar/290114 to your computer and use it in GitHub Desktop.
Save emschwar/290114 to your computer and use it in GitHub Desktop.
Research.FormattedListItemView = SC.ListItemView.extend({
renderLabel: function(context, label) {
var del = this.displayDelegate,
formatter = this.getDelegateProperty("contentFormatter", del);
label = (formatter && label) ? formatter(label) : label;
context.push('<label>', label || '', '</label>') ;
},
toolTip: function() {
var content = this.get('content'),
del = this.displayDelegate,
key = this.getDelegateProperty('contentToolTipKey', del);
return content[key];
}.property('content')
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment