[Pkg-owncloud-commits] [owncloud] 352/457: Search results have to explicitly be added to the content area of the app

David Prévot taffit at moszumanska.debian.org
Sun Jun 28 20:06:41 UTC 2015


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch stable8
in repository owncloud.

commit 0fde0e6569bbb69b032c684a8018a9b3699f43c6
Author: Thomas Müller <thomas.mueller at tmit.eu>
Date:   Tue Jun 9 12:39:40 2015 +0200

    Search results have to explicitly be added to the content area of the app
---
 apps/files/templates/index.php |  1 +
 core/search/js/search.js       | 13 +++++--------
 2 files changed, 6 insertions(+), 8 deletions(-)

diff --git a/apps/files/templates/index.php b/apps/files/templates/index.php
index a068f30..e825c30 100644
--- a/apps/files/templates/index.php
+++ b/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 -->
diff --git a/core/search/js/search.js b/core/search/js/search.js
index 4d0cf69..22769ee 100644
--- a/core/search/js/search.js
+++ b/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'));
-	});
+	}
 });
 
 /**

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git



More information about the Pkg-owncloud-commits mailing list