Skip to content

Instantly share code, notes, and snippets.

@erichocean
Created April 7, 2011 22:56
Show Gist options
  • Save erichocean/908962 to your computer and use it in GitHub Desktop.
Save erichocean/908962 to your computer and use it in GitHub Desktop.
employees: SC.ScrollView.design({
layout: { top:74, width: 280, right: 10, bottom: 10 },
contentView: SC.ListView.design(SC.CollectionFastPath, {
contentBinding: 'Timesheet.employeesController.arrangedObjects',
selectionBinding: 'Timesheet.employeesController.selection',
exampleView: SC.View.extend(SC.ContentDisplay, {
contentDisplayProperties: 'fullName'.w(),
layerIsCacheable: YES,
render: function(context, firstTime) {
var content = this.get('content');
if (firstTime) {
context.push(
content.get('fullName')
);
} else this.get('layer').innerText = content.get('fullName');
}
})
})
})
employees: SC.ScrollView.design({
layout: { top:74, width: 280, right: 10, bottom: 10 },
contentView: SC.ListView.design({ // SC.CollectionFastPath, {
contentBinding: 'Timesheet.employeesController.arrangedObjects',
selectionBinding: 'Timesheet.employeesController.selection',
// useFastPath: YES,
exampleView: SC.View.extend(SC.ContentDisplay, {
contentDisplayProperties: 'fullName'.w(),
layerIsCacheable: YES,
render: function(context, firstTime) {
var content = this.get('content');
// if (firstTime) {
context.push(
content.get('fullName')
);
// } else this.get('layer').innerText = content.get('fullName');
}
})
})
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment