Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- MB.SectionNavigationView = Ember.CollectionView.extend({
- classNames: ["main"]
- tagName: "ul"
- itemViewClass: Ember.View.extend({
- template: Ember.Handlebars.compile("""
- <a {{bindAttr href="view.href"}}><span>{{view.content.name}}</span></a>
- """)
- classNameBindings: ["isCurrent", "sectionClassName"]
- sectionClassName: (()->
- "nav-section-" + @getPath("content.section")
- ).property("content.section")
- href: (()->
- @getPath("controller.target").urlForEvent(@getPath("content.action"))
- ).property()
- click: (e) ->
- @getPath("controller.target").send(@getPath("content.action"), e)
- e.preventDefault()
- })
- })
Add Comment
Please, Sign In to add comment