diff options
Diffstat (limited to 'core/search')
-rw-r--r-- | core/search/js/search.js | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/core/search/js/search.js b/core/search/js/search.js index 4d0cf69eeba..22769ee2e48 100644 --- a/core/search/js/search.js +++ b/core/search/js/search.js @@ -379,19 +379,16 @@ $(document).ready(function() { var $searchResults = $('#searchresults'); - if ($searchResults.length) { + if ($searchResults.length > 0) { $searchResults.addClass('hidden'); $('#app-content') .find('.viewcontainer').css('min-height', 'initial'); + $searchResults.load(OC.webroot + '/core/search/templates/part.results.html', function () { + OC.Search = new OCA.Search($('#searchbox'), $('#searchresults')); + }); } else { - $searchResults = $('<div id="searchresults" class="hidden"/>'); - $('#app-content') - .append($searchResults) - .find('.viewcontainer').css('min-height', 'initial'); - } - $searchResults.load(OC.webroot + '/core/search/templates/part.results.html', function () { OC.Search = new OCA.Search($('#searchbox'), $('#searchresults')); - }); + } }); /** |