This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Note: by mixing in SC.ContentDisplay, we get `content` added as a displayProperty | |
MyApp.CustomItemView = SC.View.extend(SC.ContentDisplay, { | |
// --------------------------------------------------------------------------- | |
// Properties | |
// | |
classNames: ['custom-item-view'], | |
content: null, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
myForm: SC.View.extend({ | |
childViews: ['nameLabel', 'givenNameField', 'familyNameField', 'imageField', 'phoneLabel', 'phoneField', // ... etc. ], | |
// To save us the trouble of offsetting each view independently, we use a child layout plugin that stacks them vertically. | |
childViewLayout: SC.View.VERTICAL_STACK, | |
childViewLayoutOptions: { paddingBefore: 35, paddingAfter: 35, spacing: 14 }, | |
nameLabel: SC.LabelView.extend({ | |
classNames: ['form-label'], | |
layout: { left: 20, height: 20 }, |
OlderNewer