small fixes
This commit is contained in:
@@ -286,6 +286,7 @@ window.onload = function () {
|
|||||||
function customizeSearch(facet) {
|
function customizeSearch(facet) {
|
||||||
// re-render the dropdown menu with the current pick
|
// re-render the dropdown menu with the current pick
|
||||||
document.getElementById('dropdownMenu1').innerHTML = facet + ' <span class="caret"></span>';
|
document.getElementById('dropdownMenu1').innerHTML = facet + ' <span class="caret"></span>';
|
||||||
|
document.getElementById("primoQueryTemp").setAttribute("placeholder", "Enter search term here");
|
||||||
|
|
||||||
// reset any previously selected facets
|
// reset any previously selected facets
|
||||||
document.querySelectorAll('.deleteWithDropdownChange').forEach(e => e.remove());
|
document.querySelectorAll('.deleteWithDropdownChange').forEach(e => e.remove());
|
||||||
@@ -316,17 +317,17 @@ function addPrimoQuery(e) {
|
|||||||
// prevent the user from submitting the form if no dropdown item has been selected. Added by ME.
|
// prevent the user from submitting the form if no dropdown item has been selected. Added by ME.
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
if (document.getElementById("dropdownMenu1").innerHTML === 'Define Your Search <span class="caret"></span>') {
|
if (document.getElementById("dropdownMenu1").innerHTML.includes('Define') === true) {
|
||||||
$("#dropdownMenu1").trigger('click.bs.dropdown.data-api');
|
$("#dropdownMenu1").trigger('click.bs.dropdown.data-api');
|
||||||
document.getElementById("primoQueryTemp").value = "";
|
document.getElementById("primoQueryTemp").value = "";
|
||||||
document.getElementById("primoQueryTemp").setAttribute("placeholder", "Please make a selection");
|
document.getElementById("primoQueryTemp").setAttribute("placeholder", "Please make a selection");
|
||||||
return true;
|
return true;
|
||||||
}
|
};
|
||||||
|
|
||||||
// original OLS widget
|
// original OLS widget
|
||||||
document.getElementById("primoQuery").value = "any,contains," + document.getElementById("primoQueryTemp").value.replace(/[,]/g, " ");
|
document.getElementById("primoQuery").value = "any,contains," + document.getElementById("primoQueryTemp").value.replace(/[,]/g, " ");
|
||||||
/* If you changed the form name at the top, change it below to match */
|
/* If you changed the form name at the top, change it below to match */
|
||||||
document.forms.searchPrimoForm1.submit();
|
document.forms.searchPrimoForm1.submit();
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user