delete facets from DOM when not in use
This commit is contained in:
@@ -255,9 +255,15 @@ window.onload = function () {
|
||||
<!-- script to make OneSearch dropdown work -->
|
||||
<script type="text/javascript">
|
||||
function customizeSearch(facet) {
|
||||
document.getElementById('dropdownMenu1').innerHTML = facet + ' <span class="caret"></span>';
|
||||
document.getElementById('dropdownMenu1').innerHTML = facet + ' <span class="caret"></span>';
|
||||
document.querySelectorAll('.deleteWithDropdownChange').forEach(e => e.remove());
|
||||
|
||||
if (facet === "Books") {
|
||||
document.getElementById("formToAppendInputsTo").insertAdjacentHTML('afterbegin', '<input name="facet" value="rtype,include,books" type="hidden" class="deleteWithDropdownChange" />');
|
||||
} else if (facet === "Articles") {
|
||||
document.getElementById("formToAppendInputsTo").insertAdjacentHTML('afterbegin', '<input name="mfacet" value="rtype,include,articles,1" type="hidden" class="deleteWithDropdownChange"/><input name="mfacet" value="rtype,include,newspaper_articles,1" type="hidden" class="deleteWithDropdownChange"/>');
|
||||
} else {
|
||||
console.log("no match")
|
||||
};
|
||||
};
|
||||
</script>
|
||||
|
||||
@@ -207,15 +207,15 @@
|
||||
<p class="faux-card">Find print books and ebooks using OneSearch</p>
|
||||
</div>
|
||||
<div class="col-xs-12">
|
||||
<a href="#" class="searchmenu" onclick="customizeSearch('Articles')"><strong>Articles</strong></a>
|
||||
<a class="searchmenu" onclick="customizeSearch('Articles')"><strong>Articles</strong></a>
|
||||
<p class="faux-card">Find articles in journals, newspapers and magazines</p>
|
||||
</div>
|
||||
<div class="col-xs-12">
|
||||
<a href="#" class="searchmenu" onclick="customizeSearch('Videos')"><strong>Videos</strong></a>
|
||||
<a class="searchmenu" onclick="customizeSearch('Videos')"><strong>Videos</strong></a>
|
||||
<p class="faux-card">Find DVDs and streaming videos</p>
|
||||
</div>
|
||||
<div class="col-xs-12">
|
||||
<a href="#" class="searchmenu" onclick="customizeSearch('Everything')"><strong>Everything</strong></a>
|
||||
<a class="searchmenu" onclick="customizeSearch('Everything')"><strong>Everything</strong></a>
|
||||
<p class="faux-card">Search for all using OneSearch</p>
|
||||
</div>
|
||||
<div class="col-xs-12">
|
||||
@@ -223,11 +223,11 @@
|
||||
<p class="faux-card">Find A to Z list and find databases by subject</p>
|
||||
</div>
|
||||
<div class="col-xs-12">
|
||||
<a href="#" class="searchmenu" onclick="customizeSearch('Journals')"><strong>Journals</strong></a>
|
||||
<a class="searchmenu" onclick="customizeSearch('Journals')"><strong>Journals</strong></a>
|
||||
<p class="faux-card">Find specific scholarly journals (peer reviewed)</p>
|
||||
</div>
|
||||
<div class="col-xs-12">
|
||||
<a href="#" class="searchmenu" onclick="customizeSearch('Newspapers')"><strong>Newspapers and magazines</strong></a>
|
||||
<a class="searchmenu" onclick="customizeSearch('Newspapers')"><strong>Newspapers and magazines</strong></a>
|
||||
<p class="faux-card">Find specific newspapers and magazines</p>
|
||||
</div>
|
||||
<div class="col-xs-12">
|
||||
|
||||
Reference in New Issue
Block a user