Skip to content

Instantly share code, notes, and snippets.

@tritchey
Created June 10, 2011 18:24
Show Gist options
  • Save tritchey/1019417 to your computer and use it in GitHub Desktop.
Save tritchey/1019417 to your computer and use it in GitHub Desktop.
rendering buttons
ScaleUI.SystemSectionDetailView = SC.View.extend({
layout: { top: 0, left: 0, right: 0},
useStaticLayout: YES,
isVisibleBinding: '.parentView.parentView.isDetail',
childViews: 'showEditButton'.w(),
showEditButton: SC.ButtonView.extend({
useStaticLayout: YES,
action: 'editClicked',
title: '_Edit'.loc(),
}),
renderChildViews: function() {},
render: function(context, firstTime) {
sc_super();
context = context.begin(this.getPath('showEditButton.tagName'));
this.get('showEditButton').renderToContext(context, YES);
context = context.end();
this._didRenderChildViews = YES;
},
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment