Skip to content

Instantly share code, notes, and snippets.

@justinpeterman
Created August 18, 2011 21:03
Show Gist options
  • Save justinpeterman/1155197 to your computer and use it in GitHub Desktop.
Save justinpeterman/1155197 to your computer and use it in GitHub Desktop.
ExistingCampaignSelectionView
Authoring.ExistingCampaignSelectionView = SC.PalettePane.create({
layout: {
width: 465,
height: 535,
centerX: 0,
centerY: 0
},
isModal: YES,
theme: "popover",
modalPane: SC.ModalPane.extend({
classNames: "dark-bg"
}),
contentView: SC.WorkspaceView.design({
childViews: "contentView".w(),
topToolbar: SC.ToolbarView.design({
childViews: 'label cancelButton openButton'.w(),
label: SC.LabelView.extend({
layout: {
top: 11,
height: 24,
left: 20,
right: 0
},
//textAlign: SC.ALIGN_CENTER,
controlSize: SC.LARGE_CONTROL_SIZE,
value: "Existing Campaigns"
}),
cancelButton: SC.ButtonView.extend({
layout: {
top: 11,
right: 105,
width: 85,
height: 24
},
title: "Cancel",
isSelected: NO,
target: 'Authoring.statechart',
action: "existingCampaignSelectionCancel",
}),
openButton: SC.ButtonView.extend({
layout: {
top: 11,
right: 10,
width: 85,
height: 24
},
title: "Open",
isSelected: YES,
//action: "",
})
}),
contentView: SC.View.design({
layout: {
top: 0,
bottom: 0,
left: 0,
right: 0
},
classNames: 'light_bg'.w(),
childViews: 'preview existingList '.w(),
preview: SC.View.design({
layout: {
height: 170
},
childViews: 'preview_content'.w(),
preview_content: SC.TemplateView.design({
contentBinding: SC.Binding.oneWay("Authoring.existingCampaignSelController.content"),
templateName: "existing_campaign_selection"
})
}),
existingList: SC.ScrollView.design({
layout: {
top: 170,
bottom: 0
},
contentView: SC.ListView.design({
layout: {
top: 0,
bottom: 0
},
rowHeight: 50,
showAlternatingRows: YES,
contentValueKey: "name",
contentBinding: 'Authoring.campaignController.arrangedObjects',
selectionBinding: 'Authoring.campaignController.selection'
})
})
})
})
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment