App.ApplicationView = Ember.View.extend
  didInsertElement: ->
    Qsupplier.watch_events()
    selector_mappings =
      '.top-menu-root': '/'
      '.top-menu-lists': 'lists'
      '.top-menu-sections': 'sections'
      '.top-menu-tables': 'tables'
      '.top-menu-lists': 'lists'
      '.supplier-settings-link': 'settings'

    for selector, route of selector_mappings
      do (selector, route)=>
        $(selector).click (e)=>
          e.preventDefault()
          @get('controller').transitionToRoute route
