travis-web/assets/scripts/lib/travis/location.coffee
2012-10-09 12:59:27 +02:00

13 lines
367 B
CoffeeScript

Travis.Location = Ember.HistoryLocation.extend
onUpdateURL: (callback) ->
guid = Ember.guidFor(this)
Ember.$(window).bind 'popstate.ember-location-'+guid, (e) ->
callback(location.pathname + location.hash)
getURL: ->
location = @get('location')
location.pathname + location.hash
Ember.Location.implementations['travis'] = Travis.Location