[Pkg-owncloud-commits] [owncloud] 84/95: Append search results to custom container

David Prévot taffit at moszumanska.debian.org
Wed Mar 11 15:49:52 UTC 2015


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

taffit pushed a commit to annotated tag v8.0.1
in repository owncloud.

commit 83dd98426c92787500453c296788ff2a73ac0f4a
Author: Raimund Schlüßler <raimund.schluessler at googlemail.com>
Date:   Sun Feb 8 22:42:30 2015 +0100

    Append search results to custom container
    
    * fixes #13968
    * fix variable already defined
---
 core/search/js/search.js | 15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)

diff --git a/core/search/js/search.js b/core/search/js/search.js
index 21e77ec..c7feeac 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'));
 	});

-- 
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