diff options
author | Morris Jobke <hey@morrisjobke.de> | 2015-02-26 15:16:23 +0100 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2015-02-26 15:16:23 +0100 |
commit | 55b3f6b9863344b6ba5e2123db3e5416ab0973da (patch) | |
tree | b8b4b25b208ff063b456e07d9da3695b051e644a /core/search/js | |
parent | e21df9b99a0966a9b852624ac21499c96bdff29b (diff) | |
parent | c398e8e42e5be84285c5e503d42991b36f79ab36 (diff) | |
download | nextcloud-server-55b3f6b9863344b6ba5e2123db3e5416ab0973da.tar.gz nextcloud-server-55b3f6b9863344b6ba5e2123db3e5416ab0973da.zip |
Merge pull request #13969 from raimund-schluessler/master
Append search results to custom container
Diffstat (limited to 'core/search/js')
-rw-r--r-- | core/search/js/search.js | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/core/search/js/search.js b/core/search/js/search.js index 21e77ec21d9..c7feeacf42e 100644 --- a/core/search/js/search.js +++ b/core/search/js/search.js @@ -360,10 +360,17 @@ })(); $(document).ready(function() { - var $searchResults = $('<div id="searchresults" class="hidden"/>'); - $('#app-content') - .append($searchResults) - .find('.viewcontainer').css('min-height', 'initial'); + var $searchResults = $('#searchresults'); + if ($searchResults.length) { + $searchResults.addClass('hidden'); + $('#app-content') + .find('.viewcontainer').css('min-height', 'initial'); + } 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')); }); |