aboutsummaryrefslogtreecommitdiffstats
path: root/core/search
diff options
context:
space:
mode:
authorRaimund Schlüßler <raimund.schluessler@googlemail.com>2015-02-08 22:42:30 +0100
committerRaimund Schlüßler <raimund.schluessler@googlemail.com>2015-02-08 22:42:30 +0100
commitfcc144ca7472265e0ed7114f6d541c93715a051c (patch)
treeeaf11a04b9e01d8d09fc5a934cc45c73678619a0 /core/search
parent0e604aa875a677f76b2bf326631646ac31fbadbd (diff)
downloadnextcloud-server-fcc144ca7472265e0ed7114f6d541c93715a051c.tar.gz
nextcloud-server-fcc144ca7472265e0ed7114f6d541c93715a051c.zip
Append search results to custom container
fixes #13968
Diffstat (limited to 'core/search')
-rw-r--r--core/search/js/search.js15
1 files changed, 11 insertions, 4 deletions
diff --git a/core/search/js/search.js b/core/search/js/search.js
index c6542ffc138..599a7c7d5c2 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 {
+ var $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'));
});