From 92377701807e737332fc40bf922ad3a89ffb911e Mon Sep 17 00:00:00 2001 From: Piotr Sarnacki Date: Tue, 9 Oct 2012 12:58:21 +0200 Subject: [PATCH] Forgot to add Travis.Location file --- assets/scripts/lib/travis/location.coffee | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 assets/scripts/lib/travis/location.coffee diff --git a/assets/scripts/lib/travis/location.coffee b/assets/scripts/lib/travis/location.coffee new file mode 100644 index 00000000..3dc3d132 --- /dev/null +++ b/assets/scripts/lib/travis/location.coffee @@ -0,0 +1,12 @@ +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