Skip to content

Instantly share code, notes, and snippets.

@MikailCliftov
Created May 12, 2011 21:10
Show Gist options
  • Save MikailCliftov/969453 to your computer and use it in GitHub Desktop.
Save MikailCliftov/969453 to your computer and use it in GitHub Desktop.
crud
MyApp.SettingsListItemView = SC.View.extend(SC.ContentDisplay,{
layout: {top:0, left:0, width:200, height: 32},
contentDisplayProperties: 'settings somethingElse'.w(),
render: function(context, firstTime){
var content = this.get('content'), view;
var settings = content.get('settings');
var somethingElse = content.get('somethingElse');
view = this.createChildView(SC.LabelView.design({
//layout however you want
value: settings
}));
this.appendChild(view);
view = this.createChildView(SC.LabelView.design({
//layout some more
value: somethingElse
}));
this.appendChild(view);
sc_super();
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment