Configuration changes to Primo II

This relates to the original post “Configuration changes to Primo

With the new SP 3.0.3, the architecture of Primo tiles has changed a bit, therefore the full Section 2 of “Configuration changes to Primo” can be replaced by this text:

Requested change

Addition of the class ‘WLTab’ to the <li> element wrapping the ‘Additional Services’ tab heading in the Primo Central resuls page.

Reason

The <li> element wrapping the ‘Additional Services’ tab heading in the Primo results list is usually given a css class of “WLTab”. This is used by the javascript to identify the correct location in the page carry out some operations to add the ‘Add to WebLearn’ functionality. However, in the Primo Central results when the ‘Additional Services’ tab is the first tab (in order, left to right), this class was not allocated. This resulted in the javascript not working. The addition of the class to the relevant div was requested so the javascript would work for all records.

Change made

The WLTab class was added to the relevant <li> element

Detail of change

This was achieved by modifying the default results tile for Primo. By default, the results are built up dynamically from resultsTile.jsp. This file resides in: fe_web>tiles (full path: /exlibris/primo/p3_1/ng/primo/home/system/thirdparty/openserver/server/search/deploy/primo_library-app.ear/primo_library-libweb.war/tiles).

The following changes are made to the tile. The following change is to generate the additional class only when the first tab is the “Additional Services” tab (internal name: getit_link2).

New lines of code replace one existing line and are as follows:

<li id="exlidResult${resultStatus.index}-ViewOnlineTab" class="EXLViewOnlineTab EXLResultTab ${specialTabClass} ${tabState.viewOnlineTab.iconCode}">

Existing line to be replaced by the code inside the dotted lines as shown below (the line above the dotted line is intended to helpĀ  locate the region to edit):

<%-- viewonline,getit_link1,locations,details,reviewsandtags,recommendations, getit_link2 --%>
 <c:if test="${tab=='viewonline' && not empty tabState.viewOnlineTab}">
---------------
<c:choose>
 <c:when test="${not empty tabState.moreTab}">
 <li id="exlidResult${resultStatus.index}-ViewOnlineTab" class="EXLViewOnlineTab EXLResultTab ${specialTabClass} ${tabState.viewOnlineTab.iconCode}">
 </c:when>
 <c:otherwise>
 <li class="EXLViewOnlineTab WLTab EXLResultTab ${specialTabClass} ${tabState.viewOnlineTab.iconCode}">
 </c:otherwise>
 </c:choose>
 ----------------

If the first tab is not the additional services tab, then we need the class for the link of additional services tab only. To achieve this, we modify the code as follows. Existing line to be replaced:

<li id="exlidResult${resultStatus.index}-MoreTab"MsoPlainText">EXLResultTab ${specialTabClass} ${tabState.moreTab.iconCode}">

by the following line:

<li id="exlidResult${resultStatus.index}-MoreTab"MsoPlainText">WLTab EXLResultTab ${specialTabClass} ${tabState.moreTab.iconCode}">

Changes were also made in fullRecord.jsp tile to achieve consistency among brief results and full record display. New lines of code replace one existing line and are as follows. Existing line to be replaced:

<li class="EXLViewOnlineTab EXLResultTab ${specialTabClass} ${ (renderForm.tabs[0] eq 'viewOnlineTab') ? 'EXLResultSelectedTab':''} ${tabState.viewOnlineTab.iconCode}">

by the code inside the dotted lines as shown below(the lines above and below the dotted lines are intended to helpĀ  locate the region to edit):

<%-- viewonline,getit_link1,locations,details,reviewsandtags,recommendations, getit_link2 --%>
 <c:if test="${tab=='viewonline' && not empty tabState.viewOnlineTab}">
 ---------------------------
 <c:choose>
 <c:when test="${not empty tabState.moreTab}">
 <li id="exlidResult0-ViewOnlineTab" class="EXLViewOnlineTab EXLResultTab ${specialTabClass} ${(renderForm.tabs[0] eq 'viewOnlineTab') ? 'EXLResultSelectedTab':''}${tabState.viewOnlineTab.iconCode}">
 </c:when>
 <c:otherwise>
 <li id="exlidResult0-ViewOnlineTab" class="EXLViewOnlineTab WLTab EXLResultTab ${specialTabClass} ${(renderForm.tabs[0] eq 'viewOnlineTab') ? 'EXLResultSelectedTab':''}${tabState.viewOnlineTab.iconCode}">
 </c:otherwise>
 </c:choose>
 ---------------------------
 <c:choose>
 <c:when test="${tabState.viewOnlineTab.popOut == 'on'}">

However, we also want to add the class WLTab to the “Additional Services” tab when it is not the first tab. For this reason, we modify another part of the code.

Existing line to be replaced:

<li class="EXLMoreTab EXLResultTab ${(renderForm.tabs[0] eq 'moreTab') ? 'EXLResultSelectedTab':''}${specialTabClass} ${tabState.moreTab.iconCode}">

by the following line:

<li class="EXLMoreTab WLTab EXLResultTab ${(renderForm.tabs[0] eq 'moreTab') ? 'EXLResultSelectedTab':''}${specialTabClass} ${tabState.moreTab.iconCode}">
Posted in Uncategorized | Comments Off on Configuration changes to Primo II

Comments are closed.