Skip to content

Instantly share code, notes, and snippets.

@elffey
Created June 27, 2011 17:15
Show Gist options
  • Save elffey/1049301 to your computer and use it in GitHub Desktop.
Save elffey/1049301 to your computer and use it in GitHub Desktop.
NB.NavigationMenuView = SC.TemplateCollectionView.extend({
layerId: 'navigation',
classNames: ['navigation', 'modules-list'],
contentBinding: 'NB.modulesController.content',
itemView: SC.TemplateView.extend({
templateName: 'navigation',
submenu: SC.TemplateCollectionView.extend({
classNames: ['test'],
contentBinding: 'parentView.content.menuItems',
itemView: SC.TemplateView.extend({
buttonPressed: function() {
NB.statechart.sendEvent('navigationButtonPressed', this.get('content'));
}
}),
didCreateLayer: function() {
console.log(this.get('content'));
console.log(this.getPath('parentView.content.menuItems'));
}
})
})
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment