Created
June 17, 2011 16:01
-
-
Save topherfangio/1031702 to your computer and use it in GitHub Desktop.
Example of a popup using the popover theme
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
| MyApp.myPopoverView = SC.PickerPane.create({ | |
| layout: { width: 300, height: 150 }, | |
| themeName: 'popover', | |
| contentView: SC.WorkspaceView.extend({ | |
| topToolbar: null, | |
| bottomToolbar: null, | |
| contentView: SC.View.extend({ | |
| classNames: 'popover_content_background', | |
| childViews: 'myView closeButtonView'.w(), | |
| myView: SC.LabelView.extend({ | |
| layout: { left: 10, right: 10, top: 10, bottom: 10 }, | |
| value: "Something Here" | |
| }), | |
| // This button is intended to be invisible, but has the title set | |
| // just in case it is somehow visible | |
| closeButtonView: SC.ButtonView.extend({ | |
| layout: { right: 0, bottom: 0, width: 0, height: 0 }, | |
| themeName: 'cancel', | |
| isCancel: YES, | |
| title: 'Close', | |
| target: MyApp.statechart, | |
| action: 'closeAction' | |
| }) | |
| }) | |
| }) | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment