diff --git a/apps/qubit/modules/informationobject/templates/_advancedSearch.php b/apps/qubit/modules/informationobject/templates/_advancedSearch.php
index 62de362c5c..81a6522403 100644
--- a/apps/qubit/modules/informationobject/templates/_advancedSearch.php
+++ b/apps/qubit/modules/informationobject/templates/_advancedSearch.php
@@ -6,15 +6,15 @@
>
+ >
renderFormTag(
url_for(['module' => 'informationobject', 'action' => 'browse']),
diff --git a/apps/qubit/modules/search/templates/_box.php b/apps/qubit/modules/search/templates/_box.php
index 3dfe54fa44..84d1e8c3b5 100644
--- a/apps/qubit/modules/search/templates/_box.php
+++ b/apps/qubit/modules/search/templates/_box.php
@@ -21,11 +21,7 @@
@@ -33,7 +29,7 @@
diff --git a/apps/qubit/templates/_header.php b/apps/qubit/templates/_header.php
index 7bfbc59afa..3f0d9de976 100644
--- a/apps/qubit/templates/_header.php
+++ b/apps/qubit/templates/_header.php
@@ -22,6 +22,14 @@
+
+
+ $sf_user->getCulture().$sf_user->getUserID()]); ?>
+
+
+
+
+
-
-
- $sf_user->getCulture().$sf_user->getUserID()]); ?>
-
-
-
-
-
diff --git a/plugins/arDominionB5Plugin/js/searchBox.js b/plugins/arDominionB5Plugin/js/searchBox.js
index efd47edd5d..f33565ad2a 100644
--- a/plugins/arDominionB5Plugin/js/searchBox.js
+++ b/plugins/arDominionB5Plugin/js/searchBox.js
@@ -6,8 +6,16 @@
if (!$input.length) {
return;
}
- var $results = $("#search-box-results");
+ var $searchboxDropdown = $("#search-box-dropdown");
var dropdown = bootstrap.Dropdown.getOrCreateInstance($input);
+ var $searchboxTemplate = $("#searchbox-options-template");
+
+ // Add search options to show in the dropdown area
+ let $searchOptions = $searchboxTemplate[0].content.cloneNode(true);
+ $searchOptions.querySelector('div').id = 'search-options';
+ $searchboxDropdown.html('
');
+ $searchboxDropdown.append($searchOptions);
+ let $results = $("#search-box-results");
// Set up Bootstrap autocomplete:
// - Force version 4 to avoid failing check in version 5.
@@ -34,30 +42,38 @@
searchPost: (response, $element) => {
if (response.length && $element.val().length >= 3) {
$results.html(response);
- dropdown.show();
- } else {
- dropdown.hide();
- $results.html("");
}
return [];
},
},
});
- // Hide dropdown when the input is lower than 3 chars.
+ // Clear dropdown when the input is lower than 3 chars.
// Bootstrap autocomplete `typed` event is not triggered
// on all changes to the input.
$input.on("input", (event) => {
- if (event.target.value.length < 3) {
- dropdown.hide();
- $results.html("");
+ if (event.target.value.length < 3 && $results.children().length > 1) {
+ $results.html('');
+ }
+ });
+
+ // Show dropdown on focus for users navigating using keyboards
+ $input.on("focus", (event) => {
+ if (dropdown._isShown() === false) {
+ dropdown.show();
+ }
+ });
+
+ $input.on("hide.bs.dropdown", (event) => {
+ if (document.activeElement === $input[0]) {
+ event.preventDefault();
}
});
// Prevent showing an empty dropdown
$input.on("show.bs.dropdown", (event) => {
- if ($results.children().length == 0) {
- event.preventDefault();
+ if ($results.children().length === 0) {
+ $results.html('');
}
});
});
diff --git a/plugins/arDominionB5Plugin/modules/informationobject/templates/_advancedSearch.php b/plugins/arDominionB5Plugin/modules/informationobject/templates/_advancedSearch.php
index 038d2fa038..82163f7975 100644
--- a/plugins/arDominionB5Plugin/modules/informationobject/templates/_advancedSearch.php
+++ b/plugins/arDominionB5Plugin/modules/informationobject/templates/_advancedSearch.php
@@ -1,11 +1,11 @@
-
+
renderFormTag(url_for(['module' => 'informationobject', 'action' => 'browse']), ['name' => 'advanced-search-form', 'method' => 'get']); ?>
diff --git a/plugins/arDominionB5Plugin/modules/search/templates/_box.php b/plugins/arDominionB5Plugin/modules/search/templates/_box.php
index ece2515f4b..8d8d3fffd1 100644
--- a/plugins/arDominionB5Plugin/modules/search/templates/_box.php
+++ b/plugins/arDominionB5Plugin/modules/search/templates/_box.php
@@ -1,3 +1,58 @@
+
+
+