From dabd5dbe9dcacac5c96a8a75510a65fe3fb0fe4f Mon Sep 17 00:00:00 2001 From: Szymon Nowak Date: Sun, 15 Jun 2014 11:44:58 +0200 Subject: [PATCH] Simplify currentURL property --- app/index.html | 1 - app/scripts/app/controllers/application_controller.js | 4 ++++ app/scripts/app/templates/about_room.hbs | 4 ++-- app/scripts/app/views/about_room_view.js | 5 ----- 4 files changed, 6 insertions(+), 8 deletions(-) delete mode 100644 app/scripts/app/views/about_room_view.js diff --git a/app/index.html b/app/index.html index feaf4e8..b05703f 100644 --- a/app/index.html +++ b/app/index.html @@ -74,7 +74,6 @@ - diff --git a/app/scripts/app/controllers/application_controller.js b/app/scripts/app/controllers/application_controller.js index 6b19354..0b57ba3 100644 --- a/app/scripts/app/controllers/application_controller.js +++ b/app/scripts/app/controllers/application_controller.js @@ -15,6 +15,10 @@ ShareDrop.App.ApplicationController = Ember.Controller.extend({ this.handlePersonaAuth(); }, + currentURL: function () { + return window.location.href; + }.property('currentPath'), + actions: { signIn: function () { navigator.id.request(); diff --git a/app/scripts/app/templates/about_room.hbs b/app/scripts/app/templates/about_room.hbs index 248c33d..fb9571a 100644 --- a/app/scripts/app/templates/about_room.hbs +++ b/app/scripts/app/templates/about_room.hbs @@ -1,4 +1,4 @@ -{{#modal-dialog action="closeModal" currentURL=view.currentURL}} +{{#modal-dialog action="closeModal"}}

How rooms work?

@@ -6,7 +6,7 @@

- {{input value=view.currentURL disabled="disabled"}} + {{input value=currentURL disabled="disabled"}}

diff --git a/app/scripts/app/views/about_room_view.js b/app/scripts/app/views/about_room_view.js deleted file mode 100644 index d83734f..0000000 --- a/app/scripts/app/views/about_room_view.js +++ /dev/null @@ -1,5 +0,0 @@ -ShareDrop.App.AboutRoomView = Ember.View.extend({ - currentURL: function () { - return window.location.href; - }.property() -});