Append search results to custom container

fixes #13968
This commit is contained in:
Raimund Schlüßler 2015-02-08 22:42:30 +01:00
parent 0e604aa875
commit fcc144ca74
1 changed files with 11 additions and 4 deletions

View File

@ -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'));
});