From b6efee1f1ee5c4aaa9ffac007aa61c287b5e0a86 Mon Sep 17 00:00:00 2001 From: Toby Zerner Date: Fri, 6 Feb 2015 10:34:59 +1030 Subject: [PATCH] Clean up application controller --- .../core/ember/app/controllers/application.js | 14 +------------- framework/core/ember/app/views/application.js | 11 +++++++++++ 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/framework/core/ember/app/controllers/application.js b/framework/core/ember/app/controllers/application.js index ed8209808..4d8958a17 100644 --- a/framework/core/ember/app/controllers/application.js +++ b/framework/core/ember/app/controllers/application.js @@ -10,19 +10,7 @@ export default Ember.Controller.extend({ // controllers/views. pageTitle: '', - // When either the forum title or the page title changes, we want to - // refresh the document's title. - updateTitle: function() { - var parts = [this.get('forumTitle')]; - var pageTitle = this.get('pageTitle'); - if (pageTitle) { - parts.unshift(pageTitle); - } - document.title = parts.join(' - '); - }.observes('pageTitle', 'forumTitle'), - - // Whether or not a pane is currently pinned to the side of the interface. - panePinned: false, + backButtonTarget: null, searchQuery: '', searchActive: false, diff --git a/framework/core/ember/app/views/application.js b/framework/core/ember/app/views/application.js index c72efeaf1..43bd7a033 100644 --- a/framework/core/ember/app/views/application.js +++ b/framework/core/ember/app/views/application.js @@ -11,6 +11,17 @@ var $ = Ember.$; export default Ember.View.extend({ + // When either the forum title or the page title changes, we want to + // refresh the document's title. + updateTitle: function() { + var parts = [this.get('controller.forumTitle')]; + var pageTitle = this.get('controller.pageTitle'); + if (pageTitle) { + parts.unshift(pageTitle); + } + document.title = parts.join(' - '); + }.observes('controller.pageTitle', 'controller.forumTitle'), + title: function() { return this.get('controller.forumTitle'); }.property('controller.forumTitle'),