[Wactclc-primo] widget scopes now "stick" thanks to new code!

Elena Bianco Elena.Bianco at skagit.edu
Tue May 7 16:40:10 PDT 2019


Oh, my Outlook just blocked the attachment (it's an .asp file).  I'll try it again as plain text...

Elena Bianco, Systems & Technical Services Librarian
Skagit Valley College
2405 E. College Way
Mount Vernon, WA 98273
(360)416-7624

From: Wactclc-primo <wactclc-primo-bounces at lists.ctc.edu> On Behalf Of Elena Bianco
Sent: Tuesday, May 7, 2019 4:37 PM
To: WACTCLC Primo discussions <wactclc-primo at lists.ctc.edu>
Subject: Re: [Wactclc-primo] widget scopes now "stick" thanks to new code!

So, I just used Lauren's script, but I still am getting no facets when searching Library Catalog, Course Reserves or the SVC Digital Archives.

It's on our dev site:  http://editlib.mv.skagit.edu, but not sure it's viewable to anyone off campus and it won't be copied over to the live site until 7 pm, so I'm attaching the file to this email.

Not sure what the problem is, but I am wondering if it has to do with the structure of our existing website. I don't have access to the actual front page of our website (it's the only page I can't edit directly). I do have access to edit the includes files and to various containers on the site through a home-grown editing software, so I'm wondering if that is having an impact on the Javascript running correctly.

Anyway, if someone with better Javascript skills than me could have a look and help me figure out what's going on, that would be great.

Thanks,

Elena


Elena Bianco, Systems & Technical Services Librarian
Skagit Valley College
2405 E. College Way
Mount Vernon, WA 98273
(360)416-7624

From: Wactclc-primo <wactclc-primo-bounces at lists.ctc.edu<mailto:wactclc-primo-bounces at lists.ctc.edu>> On Behalf Of Herman, Amy
Sent: Tuesday, May 7, 2019 12:33 PM
To: WACTCLC Primo discussions <wactclc-primo at lists.ctc.edu<mailto:wactclc-primo at lists.ctc.edu>>
Subject: [Wactclc-primo] widget scopes now "stick" thanks to new code!

After today's Alma meeting I used Lauren's code on Github, and then customized it for our library (mainly editing  and adding labels).  Now our search scopes "stick" after we run a search from our widgets!  THANK YOU LAUREN BRYANT AT SHORELINE!

Amy Herman
Library Faculty | Olympic College
1600 Chester Avenue | Bremerton, WA 98337
aherman at olympic.edu<mailto:aherman at olympic.edu> | 360-475-7256

[alma signature]


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ctc.edu/pipermail/wactclc-primo_lists.ctc.edu/attachments/20190507/091bb98f/attachment-0002.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 6652 bytes
Desc: image001.png
URL: <http://lists.ctc.edu/pipermail/wactclc-primo_lists.ctc.edu/attachments/20190507/091bb98f/attachment-0002.png>
-------------- next part --------------
<div style="margin-bottom: 1em;">
<h3>OneSearch for books, articles and more:</h3> 

<!--Widget Starts Here-->
<form id="simple" name="searchForm" method="get" target="_self" action="https://sbctc-skagit.primo.exlibrisgroup.com/discovery/" enctype="application/x-www-form-urlencoded; charset=utf-8" onsubmit="searchPrimo()">
<div class="">
<input type="text" id="primoQueryTemp" style="width: 40%;">
<!--Value in the next line should be your institution-->
<input type="hidden" name="institution" value="SKAGIT">
<!--Value in the next line should be your Ex Libris code-->
<input type="hidden" name="vid" value="01STATEWA_SKAGIT:SKAGIT">
<!--Next line is for Library Catalog. ID is named primoTab and used in Javascript to pull URL-->
<input type="hidden" name="tab" id="primoTab">
<!--Next line specifies basic search instead of advanced search in Primo-->
<input type="hidden" name="mode" value="Basic">
<!--Below this line defines your drop-down options. They must be named as value equals.-->
<select name="search_scope" id="primoScope" style="width: 38%; height: 34px;">
      <option value="MyInstitution">Library Catalog</option>
      <option value="MyInst_and_CI">Everything</option>
      <option value="CentralIndex">Online Resources</option>
      <option value="CourseReserves">Course Reserves</option>
	<option value="SVCDigitalArchives">SVC Digital Archives</option>
 </select>
<!-- Fixed parameters -->
<input type="hidden" name="displayMode" value="full">
<input type="hidden" name="bulkSize" value="10">
<input type="hidden" name="highlight" value="true">
<input type="hidden" name="dum" value="true">
<input type="hidden" name="query" id="primoQuery">
<input type="hidden" name="displayField" value="all">
<!-- Enable this if "Expand My Results" is enabled by default in Views Wizard -->
<input type="hidden" name="pcAvailabiltyMode" value="true">
<!-- Search Button. Change style= as you like for font/size/border-->
<input id="go" title="Search" onclick="searchPrimo()" type="button" value="Go" alt="Search" style="border-radius: 4px; font-family: Helvetica, Arial, sans-serif; background: linear-gradient(#2d95b7, #23748e); color: #ffffff; border: 1px solid;">
</div></form>
<!--Widget Ends Here-->

<!--Below this line is the javascript that must appear on the page where your Primo VE widget is placed. Many people argue that Javascript should be the last thing to run on a page and is best placed right before the closing body tag-->
<script type="text/javascript">
function searchPrimo() {
document.getElementById("primoQuery").value = "any,contains," + document.getElementById("primoQueryTemp").value.replace(/[,]/g, " ");

var dropdownValue = document.getElementById("primoScope").value;
var tabValue;
switch (dropdownValue){
    case "MyInstitution":
        tabValue = "LibraryCatalog";
        break;
    case "MyInst_and_CI":
        tabValue = "Everything";
        break;
    default:
        tabValue = dropdownValue;
        break;
}
document.getElementById("primoTab").value = tabValue;
document.forms["searchForm"].submit();
}
</script>
<!--End Javascript for Primo VE widget-->



</div>

<div>
<p style="font-size: 0.85em;" class="text-center">  <a href="https://skagit.hosted.panopto.com/Panopto/Pages/Viewer.aspx?id=0533f16c-a924-4d09-8ca1-66fb560f30e2">OneSearch How-to Video</a> | <a href="https://skagit-primo.hosted.exlibrisgroup.com/primo-explore/account?vid=SKAGIT&section=overview&lang=en_US">Your Library Account</a> | <a href="https://skagit-primo.hosted.exlibrisgroup.com/primo-explore/jsearch?vid=SKAGIT&lang=en_US">A-Z Journal Finder</a> |<a href="https://skagit-primo.hosted.exlibrisgroup.com/primo-explore/search?q&tab=default_tab&search_scope=SKAGIT_ALMA&sortby=title&vid=SKAGIT&lang=en_US&mode=advanced&offset=0"> Advanced Search</a>
</div>
</p>


More information about the Wactclc-primo mailing list