From 218ecce6c1e3d05ee067f115a64eb02207ffece7 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Mon, 23 Feb 2015 09:12:06 -0500 Subject: [PATCH] accessing search route with no term auto-expands the form now, part 1 of 2, #2757 --- src/controllers/search.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/controllers/search.js b/src/controllers/search.js index 2020612094..7ed16d8bb8 100644 --- a/src/controllers/search.js +++ b/src/controllers/search.js @@ -31,7 +31,8 @@ searchController.search = function(req, res, next) { users: [], tags: [], categories: categories, - breadcrumbs: breadcrumbs + breadcrumbs: breadcrumbs, + expandSearch: true }; plugins.fireHook('filter:search.build', {data: {}, results: results}, function(err, data) { if (err) { @@ -75,6 +76,7 @@ searchController.search = function(req, res, next) { results.showAsTopics = req.query.showAs === 'topics'; results.breadcrumbs = breadcrumbs; results.categories = categories; + results.expandSearch = false; plugins.fireHook('filter:search.build', {data: data, results: results}, function(err, data) { if (err) {