Added back Global Search related code that caused Snap to not build.

Thanks to xet7 !

Related https://github.com/wekan/wekan/pull/3492
This commit is contained in:
Lauri Ojansivu 2021-01-28 16:31:49 +02:00
parent a17e628872
commit 334dfa5cb6
2 changed files with 6 additions and 1 deletions

View file

@ -34,7 +34,7 @@ template(name="globalSearch")
else
h1
= resultsHeading.get
a.fa.fa-link(title="{{_ 'link-to-search' }}" href="")
a.fa.fa-link(title="{{_ 'link-to-search' }}" href="{{ getSearchHref }}")
each card in results.get
+resultCard(card)
table.global-search-footer

View file

@ -480,6 +480,11 @@ BlazeComponent.extendComponent({
});
},
getSearchHref() {
const baseUrl = window.location.href.replace(/([?#].*$|\s*$)/, '');
return `${baseUrl}?q=${encodeURIComponent(this.query.get())}`;
},
searchInstructions() {
tags = {
operator_board: TAPi18n.__('operator-board'),