diff --git a/app/assets/javascripts/discourse/lib/search-for-term.js.es6 b/app/assets/javascripts/discourse/lib/search-for-term.js.es6 index 7cd3fffb90a..592195f72eb 100644 --- a/app/assets/javascripts/discourse/lib/search-for-term.js.es6 +++ b/app/assets/javascripts/discourse/lib/search-for-term.js.es6 @@ -59,12 +59,6 @@ export default function searchForTerm(term, opts) { } }); - // a bit awkward, but we need to get the help link in - // somehow - if(results.resultTypes && results.resultTypes[0]) { - results.resultTypes[0].showHelp = true; - } - var noResults = !!(results.topics.length === 0 && results.posts.length === 0 && results.users.length === 0 && diff --git a/app/assets/javascripts/discourse/templates/search.hbs b/app/assets/javascripts/discourse/templates/search.hbs index dfd8048e60b..b9d97fd4b9a 100644 --- a/app/assets/javascripts/discourse/templates/search.hbs +++ b/app/assets/javascripts/discourse/templates/search.hbs @@ -1,14 +1,16 @@ {{view 'search-text-field' value=term searchContextEnabled=searchContextEnabled searchContext=searchContext id="search-term"}} -{{#if searchContext}}
- + {{#if searchContext}} + + {{/if}} + {{i18n show_help}}
-{{/if}} {{#if loading}}
{{else}} +
{{#unless noResults}} {{#each resultType in content.resultTypes}}
{{/each}} {{else}} @@ -32,4 +31,5 @@ {{i18n search.no_results}} {{/unless}} + {{/if}} diff --git a/app/assets/stylesheets/common/base/header.scss b/app/assets/stylesheets/common/base/header.scss index dfcebab1b34..f7e64d9f75f 100644 --- a/app/assets/stylesheets/common/base/header.scss +++ b/app/assets/stylesheets/common/base/header.scss @@ -339,3 +339,21 @@ .search-highlight { font-weight: bold; } + +.search-context .show-help { + position: absolute; + right: 10px; + top: 0; +} + +.search-context { + min-height: 30px; + position: relative; +} + +#search-dropdown .results { + max-height: 300px; + overflow: auto; +} + + diff --git a/app/assets/stylesheets/desktop/header.scss b/app/assets/stylesheets/desktop/header.scss index 8dfa245eef2..bc4f7b647d9 100644 --- a/app/assets/stylesheets/desktop/header.scss +++ b/app/assets/stylesheets/desktop/header.scss @@ -72,13 +72,9 @@ and (max-width : 570px) { right: 30px; } -// leave room for scroll bar -.d-dropdown input[type='text'] { - width: 505px; -} - -.d-dropdown .no-results .show-help { - position: absolute; - right: 15px; + +#search-dropdown .results { + max-height: 500px; + overflow: auto; }