class Helios.Routers.Root extends Backbone.Router el: "div[role='main']" initialize: (options) -> @views = {} super routes: '': 'index' 'data': 'data' 'push-notification': 'push_notification' 'in-app-purchase': 'in_app_purchase' 'passbook': 'passbook' index: -> console.log("index") # @_activateNavbarLink("devices") Helios.entities.fetch(type: 'OPTIONS') # @views.devices ?= new RPN.Views.Devices(collection: RPN.devices) # @views.devices.render() # _activateNavbarLink: (className) -> # $li = $("header nav li") # $li.removeClass("active") # $li.filter("." + className).addClass("active") data: -> console.log("data") Helios.entities.fetch(type: 'OPTIONS') @views.entities.render() push_notification: -> console.log("push") @devices ?= new Helios.Collections.Devices @views.devices ?= new Helios.Views.Devices(collection: @devices) @views.devices.render() in_app_purchase: -> console.log("IAP") @receipts ?= new Helios.Collections.Receipts @views.receipts ?= new Helios.Views.Receipts(collection: @receipts) @views.receipts.render() passbook: -> console.log("passbook") @passes ?= new Helios.Collections.Passes @views.passes ?= new Helios.Views.Passes(collection: @passes) @views.passes.render()