From c1e839961eb99df24742a605a5dfc1b10ed14d00 Mon Sep 17 00:00:00 2001 From: Roeland Jago Douma Date: Fri, 18 Jan 2019 22:06:54 +0100 Subject: [PATCH] Include static search template in JS There is no need to fetch this from the server if it is static anyway. Signed-off-by: Roeland Jago Douma --- core/search/js/searchprovider.js | 24 ++++++++++++++++-------- core/search/templates/part.results.html | 13 ------------- 2 files changed, 16 insertions(+), 21 deletions(-) delete mode 100644 core/search/templates/part.results.html diff --git a/core/search/js/searchprovider.js b/core/search/js/searchprovider.js index 86a22f570f..7b4970b37f 100644 --- a/core/search/js/searchprovider.js +++ b/core/search/js/searchprovider.js @@ -416,14 +416,22 @@ $(document).ready(function() { var $searchBox = $('#searchbox'); if ($searchResults.length > 0 && $searchBox.length > 0) { $searchResults.addClass('hidden'); - $searchResults.load( - OC.getRootPath() + '/core/search/templates/part.results.html', - function() { - OC.Search = new OCA.Search.Core( - $searchBox, - $searchResults - ); - } + $searchResults.html('\n' + + '\t\n' + + '\t\t\n' + + '\t\t\t\n' + + '\t\t\t\n' + + '\t\t\n' + + '\t\n' + + '
\n' + + '\t\t\t\t\n' + + '\t\t\t\t\t
\n' + + '\t\t\t\t
\n' + + '\t\t\t
\n' + + '
'); + OC.Search = new OCA.Search.Core( + $searchBox, + $searchResults ); } else { // check again later diff --git a/core/search/templates/part.results.html b/core/search/templates/part.results.html deleted file mode 100644 index 6fad9f2cdd..0000000000 --- a/core/search/templates/part.results.html +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - -
- -
-
-
-
\ No newline at end of file