Skip to content

Commit 06e8a09

Browse files
committed
fix: go to selection page like it was before
1 parent 0a45f00 commit 06e8a09

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

src/Resources/themes/default/doctum.js.twig

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -145,11 +145,8 @@ var Doctum = {
145145
Doctum.doctumSearchAutoComplete.addEventListener('init', function (_) {
146146
Doctum.autoCompleteLoaded = true;
147147
Doctum.doctumSearchAutoComplete.addEventListener('selection', function (event) {
148-
// Set selection in text box
149-
if (typeof event.detail.selection.value === 'object') {
150-
Doctum.doctumSearchAutoComplete.value = event.detail.selection.value.n;
151-
}
152-
document.getElementById('search-form').submit();
148+
// Go to selection page
149+
window.location = Doctum.rootPath + event.detail.selection.value.p;
153150
});
154151
Doctum.doctumSearchAutoComplete.addEventListener('navigate', function (event) {
155152
// Set selection in text box
@@ -267,7 +264,7 @@ var Doctum = {
267264
Data: net_sample, ample, glamples, notDateSa
268265
Result <mark>n</mark>e<mark>t</mark>_<mark>sa</mark>mple, <mark>n</mark>o<mark>t</mark>Da<mark>t</mark>e<mark>Sa</mark>
269266
#}
270-
{% verbatim %}
267+
{%- verbatim %}
271268
if (record.match(new RegExp('(' + query.replace(/\s/g, ').*(') + ')', 'gi')) === null) {
272269
return '';// Does not match
273270
}

0 commit comments

Comments
 (0)