From 1d27610ffcc0d5218257512d45648a78103c3b55 Mon Sep 17 00:00:00 2001 From: cpradio Date: Tue, 11 Oct 2016 19:59:37 -0400 Subject: [PATCH] FEATURE: search menu options opens full page search --- .../javascripts/discourse/controllers/full-page-search.js.es6 | 3 ++- .../javascripts/discourse/routes/full-page-search.js.es6 | 2 +- .../javascripts/discourse/widgets/search-menu-controls.js.es6 | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/app/assets/javascripts/discourse/controllers/full-page-search.js.es6 b/app/assets/javascripts/discourse/controllers/full-page-search.js.es6 index 7719ce08502..442ecba7d76 100644 --- a/app/assets/javascripts/discourse/controllers/full-page-search.js.es6 +++ b/app/assets/javascripts/discourse/controllers/full-page-search.js.es6 @@ -18,9 +18,10 @@ export default Ember.Controller.extend({ bulkSelectEnabled: null, loading: Em.computed.not("model"), - queryParams: ["q", "context_id", "context", "skip_context"], + queryParams: ["q", "isExpanded", "context_id", "context", "skip_context"], q: null, selected: [], + isExpanded: false, context_id: null, context: null, searching: false, diff --git a/app/assets/javascripts/discourse/routes/full-page-search.js.es6 b/app/assets/javascripts/discourse/routes/full-page-search.js.es6 index 10cd876555e..86b191266ed 100644 --- a/app/assets/javascripts/discourse/routes/full-page-search.js.es6 +++ b/app/assets/javascripts/discourse/routes/full-page-search.js.es6 @@ -5,7 +5,7 @@ import PreloadStore from 'preload-store'; import { getTransient, setTransient } from 'discourse/lib/page-tracker'; export default Discourse.Route.extend({ - queryParams: { q: {}, context_id: {}, context: {}, skip_context: {} }, + queryParams: { q: {}, isExpanded: false, context_id: {}, context: {}, skip_context: {} }, model(params) { const cached = getTransient('lastSearch'); diff --git a/app/assets/javascripts/discourse/widgets/search-menu-controls.js.es6 b/app/assets/javascripts/discourse/widgets/search-menu-controls.js.es6 index 141fd4ee32f..f4ebe9bc34c 100644 --- a/app/assets/javascripts/discourse/widgets/search-menu-controls.js.es6 +++ b/app/assets/javascripts/discourse/widgets/search-menu-controls.js.es6 @@ -44,7 +44,7 @@ createWidget('search-context', { ])); } - result.push(this.attach('link', { href: '/search', + result.push(this.attach('link', { href: '/search?isExpanded=true', label: 'show_help', className: 'show-help' })); result.push(h('div.clearfix'));