Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 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'));
});