Skip to content

Commit

Permalink
maps toggling using prepare_route function
Browse files Browse the repository at this point in the history
  • Loading branch information
zmcartor committed May 8, 2012
1 parent 03c16f8 commit 465c16d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion app/javascript/app.coffee
Expand Up @@ -24,7 +24,8 @@ class Router extends Backbone.Router
prepare_route: (name) ->
#based on the template name
$('.main_window').empty();
$('.main_window').append($(name+'_template').html())
$('.main_window').append($('#'+name+'_template').html())
console.log $('#'+name+'_template').html()

settings: ->
@prepare_route('settings')
Expand All @@ -34,9 +35,11 @@ class Router extends Backbone.Router
@goog_map = new Map(el: $('#map_area'))

places: ->
@prepare_route('places')
console.log 'showing some places'

profile: ->
@prepare_route('profile')
console.log "profile!!"

window.App = {}
Expand Down

0 comments on commit 465c16d

Please sign in to comment.