Skip to content

Instantly share code, notes, and snippets.

@topherfangio
Created June 17, 2011 16:01
Show Gist options
  • Select an option

  • Save topherfangio/1031702 to your computer and use it in GitHub Desktop.

Select an option

Save topherfangio/1031702 to your computer and use it in GitHub Desktop.
Example of a popup using the popover theme
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