Browse Source

Search results have to explicitly be added to the content area of the app

remotes/origin/poc-doctrine-migrations
Thomas Müller 11 years ago
parent
commit
0fde0e6569
  1. 1
      apps/files/templates/index.php
  2. 13
      core/search/js/search.js

1
apps/files/templates/index.php

@ -6,6 +6,7 @@
<?php print_unescaped($content['content']) ?>
</div>
<?php } ?>
<div id="searchresults" class="hidden"></div>
</div><!-- closing app-content -->
<!-- config hints for javascript -->

13
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'));
});
}
});
/**

Loading…
Cancel
Save