From 61477c45ff1f4fbe3ee5962fc36403f4336fbbe4 Mon Sep 17 00:00:00 2001 From: Katie Gengler Date: Tue, 29 Mar 2016 14:40:59 -0700 Subject: [PATCH 1/2] Move search to application route/template --- app/controllers/addons.js | 3 +-- app/controllers/application.js | 3 ++- app/controllers/categories.js | 3 +-- app/controllers/index.js | 3 +-- app/controllers/lists.js | 3 +-- app/controllers/maintainers.js | 3 +-- app/controllers/model-not-found.js | 3 +-- app/controllers/not-found.js | 3 +-- app/routes/addons.js | 3 +-- app/routes/application.js | 3 ++- app/routes/categories.js | 3 +-- app/routes/index.js | 3 +-- app/routes/lists.js | 3 +-- app/routes/maintainers.js | 3 +-- app/routes/model-not-found.js | 3 +-- app/routes/not-found.js | 3 +-- app/templates/addons.hbs | 4 +--- app/templates/application.hbs | 4 +++- app/templates/categories.hbs | 4 +--- app/templates/index.hbs | 4 +--- app/templates/lists.hbs | 4 +--- app/templates/maintainers.hbs | 4 +--- app/templates/model-not-found.hbs | 8 +++----- app/templates/not-found.hbs | 8 +++----- 24 files changed, 32 insertions(+), 56 deletions(-) diff --git a/app/controllers/addons.js b/app/controllers/addons.js index 5dc6fbc2..55ff9aa5 100644 --- a/app/controllers/addons.js +++ b/app/controllers/addons.js @@ -1,5 +1,4 @@ import Ember from 'ember'; -import ControllerWithSearch from '../mixins/controller-with-search'; -export default Ember.Controller.extend(ControllerWithSearch, { +export default Ember.Controller.extend({ }); diff --git a/app/controllers/application.js b/app/controllers/application.js index 55ff9aa5..5dc6fbc2 100644 --- a/app/controllers/application.js +++ b/app/controllers/application.js @@ -1,4 +1,5 @@ import Ember from 'ember'; +import ControllerWithSearch from '../mixins/controller-with-search'; -export default Ember.Controller.extend({ +export default Ember.Controller.extend(ControllerWithSearch, { }); diff --git a/app/controllers/categories.js b/app/controllers/categories.js index 5dc6fbc2..55ff9aa5 100644 --- a/app/controllers/categories.js +++ b/app/controllers/categories.js @@ -1,5 +1,4 @@ import Ember from 'ember'; -import ControllerWithSearch from '../mixins/controller-with-search'; -export default Ember.Controller.extend(ControllerWithSearch, { +export default Ember.Controller.extend({ }); diff --git a/app/controllers/index.js b/app/controllers/index.js index 5dc6fbc2..55ff9aa5 100644 --- a/app/controllers/index.js +++ b/app/controllers/index.js @@ -1,5 +1,4 @@ import Ember from 'ember'; -import ControllerWithSearch from '../mixins/controller-with-search'; -export default Ember.Controller.extend(ControllerWithSearch, { +export default Ember.Controller.extend({ }); diff --git a/app/controllers/lists.js b/app/controllers/lists.js index 5dc6fbc2..55ff9aa5 100644 --- a/app/controllers/lists.js +++ b/app/controllers/lists.js @@ -1,5 +1,4 @@ import Ember from 'ember'; -import ControllerWithSearch from '../mixins/controller-with-search'; -export default Ember.Controller.extend(ControllerWithSearch, { +export default Ember.Controller.extend({ }); diff --git a/app/controllers/maintainers.js b/app/controllers/maintainers.js index 5dc6fbc2..55ff9aa5 100644 --- a/app/controllers/maintainers.js +++ b/app/controllers/maintainers.js @@ -1,5 +1,4 @@ import Ember from 'ember'; -import ControllerWithSearch from '../mixins/controller-with-search'; -export default Ember.Controller.extend(ControllerWithSearch, { +export default Ember.Controller.extend({ }); diff --git a/app/controllers/model-not-found.js b/app/controllers/model-not-found.js index 5dc6fbc2..55ff9aa5 100644 --- a/app/controllers/model-not-found.js +++ b/app/controllers/model-not-found.js @@ -1,5 +1,4 @@ import Ember from 'ember'; -import ControllerWithSearch from '../mixins/controller-with-search'; -export default Ember.Controller.extend(ControllerWithSearch, { +export default Ember.Controller.extend({ }); diff --git a/app/controllers/not-found.js b/app/controllers/not-found.js index 5dc6fbc2..55ff9aa5 100644 --- a/app/controllers/not-found.js +++ b/app/controllers/not-found.js @@ -1,5 +1,4 @@ import Ember from 'ember'; -import ControllerWithSearch from '../mixins/controller-with-search'; -export default Ember.Controller.extend(ControllerWithSearch, { +export default Ember.Controller.extend({ }); diff --git a/app/routes/addons.js b/app/routes/addons.js index b135a5c8..8761ad4d 100644 --- a/app/routes/addons.js +++ b/app/routes/addons.js @@ -1,6 +1,5 @@ import Ember from 'ember'; import scrollFix from '../mixins/scroll-fix'; -import RouteWithSearch from '../mixins/route-with-search'; -export default Ember.Route.extend(scrollFix, RouteWithSearch, { +export default Ember.Route.extend(scrollFix, { }); diff --git a/app/routes/application.js b/app/routes/application.js index 153eb22e..8b3916f5 100644 --- a/app/routes/application.js +++ b/app/routes/application.js @@ -1,6 +1,7 @@ import Ember from 'ember'; +import RouteWithSearch from '../mixins/route-with-search'; -export default Ember.Route.extend({ +export default Ember.Route.extend(RouteWithSearch, { beforeModel: function() { this.get('session').fetch(); }, diff --git a/app/routes/categories.js b/app/routes/categories.js index b135a5c8..8761ad4d 100644 --- a/app/routes/categories.js +++ b/app/routes/categories.js @@ -1,6 +1,5 @@ import Ember from 'ember'; import scrollFix from '../mixins/scroll-fix'; -import RouteWithSearch from '../mixins/route-with-search'; -export default Ember.Route.extend(scrollFix, RouteWithSearch, { +export default Ember.Route.extend(scrollFix, { }); diff --git a/app/routes/index.js b/app/routes/index.js index b135a5c8..8761ad4d 100644 --- a/app/routes/index.js +++ b/app/routes/index.js @@ -1,6 +1,5 @@ import Ember from 'ember'; import scrollFix from '../mixins/scroll-fix'; -import RouteWithSearch from '../mixins/route-with-search'; -export default Ember.Route.extend(scrollFix, RouteWithSearch, { +export default Ember.Route.extend(scrollFix, { }); diff --git a/app/routes/lists.js b/app/routes/lists.js index b135a5c8..8761ad4d 100644 --- a/app/routes/lists.js +++ b/app/routes/lists.js @@ -1,6 +1,5 @@ import Ember from 'ember'; import scrollFix from '../mixins/scroll-fix'; -import RouteWithSearch from '../mixins/route-with-search'; -export default Ember.Route.extend(scrollFix, RouteWithSearch, { +export default Ember.Route.extend(scrollFix, { }); diff --git a/app/routes/maintainers.js b/app/routes/maintainers.js index b135a5c8..8761ad4d 100644 --- a/app/routes/maintainers.js +++ b/app/routes/maintainers.js @@ -1,6 +1,5 @@ import Ember from 'ember'; import scrollFix from '../mixins/scroll-fix'; -import RouteWithSearch from '../mixins/route-with-search'; -export default Ember.Route.extend(scrollFix, RouteWithSearch, { +export default Ember.Route.extend(scrollFix, { }); diff --git a/app/routes/model-not-found.js b/app/routes/model-not-found.js index b135a5c8..8761ad4d 100644 --- a/app/routes/model-not-found.js +++ b/app/routes/model-not-found.js @@ -1,6 +1,5 @@ import Ember from 'ember'; import scrollFix from '../mixins/scroll-fix'; -import RouteWithSearch from '../mixins/route-with-search'; -export default Ember.Route.extend(scrollFix, RouteWithSearch, { +export default Ember.Route.extend(scrollFix, { }); diff --git a/app/routes/not-found.js b/app/routes/not-found.js index b135a5c8..8761ad4d 100644 --- a/app/routes/not-found.js +++ b/app/routes/not-found.js @@ -1,6 +1,5 @@ import Ember from 'ember'; import scrollFix from '../mixins/scroll-fix'; -import RouteWithSearch from '../mixins/route-with-search'; -export default Ember.Route.extend(scrollFix, RouteWithSearch, { +export default Ember.Route.extend(scrollFix, { }); diff --git a/app/templates/addons.hbs b/app/templates/addons.hbs index 0580e937..e2147cab 100644 --- a/app/templates/addons.hbs +++ b/app/templates/addons.hbs @@ -1,3 +1 @@ -{{#page-layout-with-search query=query showCategories=false}} - {{outlet}} -{{/page-layout-with-search}} \ No newline at end of file +{{outlet}} \ No newline at end of file diff --git a/app/templates/application.hbs b/app/templates/application.hbs index c56573d8..434fbec4 100644 --- a/app/templates/application.hbs +++ b/app/templates/application.hbs @@ -1,5 +1,7 @@
- {{outlet}} + {{#page-layout-with-search query=query}} + {{outlet}} + {{/page-layout-with-search}}