Guest User

Untitled

a guest
Oct 19th, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. MB.SectionNavigationView = Ember.CollectionView.extend({
  2. classNames: ["main"]
  3. tagName: "ul"
  4.  
  5. itemViewClass: Ember.View.extend({
  6. template: Ember.Handlebars.compile("""
  7. <a {{bindAttr href="view.href"}}><span>{{view.content.name}}</span></a>
  8. """)
  9.  
  10. classNameBindings: ["isCurrent", "sectionClassName"]
  11.  
  12. sectionClassName: (()->
  13. "nav-section-" + @getPath("content.section")
  14. ).property("content.section")
  15.  
  16. href: (()->
  17. @getPath("controller.target").urlForEvent(@getPath("content.action"))
  18. ).property()
  19.  
  20. click: (e) ->
  21. @getPath("controller.target").send(@getPath("content.action"), e)
  22. e.preventDefault()
  23.  
  24. })
  25. })
Add Comment
Please, Sign In to add comment