Add HTML Widget

Download Report

Transcript Add HTML Widget

Customizing Enterprise with
Widgets
Michael L. Bowden
SNRG Conference
June 10, 2014
Harrisburg Area Community College
http://hacc.ent.sirsi.net/client/default
Agenda
Introduction to widgets
 Widgets you can add to Enterprise

Introduction to Widgets
Widgets are small pieces of code –
typically javascript – that allow you to
add/change how information is displayed
 Enterprise comes with several widgets

◦ RefWorks, Syndetics, LibraryThing, etc.
◦ For a complete list, see List of Delivered
HTML Widgets for Enterprise/Portfolio in the
Support Portal
Introduction to Widgets (cont.)

In addition to delivered widgets, you can
also access widgets created by the
SirsiDynix Community.
◦
◦
◦
◦
◦
Log into the Support Portal
Click on Community
Select Developers Community
Select Contributions
Search for Module: Enterprise or Type: Widget
Introduction to Widgets (cont.)
Widgets are found in the Enterprise
Admin interface
 To see all the widgets installed on your
system:

◦ Login to the Admin interface
◦ Click on Manage Displays
◦ Click on Manage HTML Widgets
Introduction to Widgets (cont.)

To add a widget to a display,
◦ Click on Manage Displays
◦ Choose either Manage Search Result
Displays or Manage Detail Displays
◦ Find the Display to modify – typically the
ILS_Default.
◦ Click on the HTML icon associated with the
display.
◦ Add your widget.
◦ Refresh the Cache! (Important)
Banded Results

Alternates the background color of the
results on the Search Result page.
◦
◦
◦
◦
Click Manage Displays
Click Manage HTML Widgets
Click Add HTML Widget
Fill out the widget form as follows:




Type: Script Only
Code: BANDEDRESULTS
Name: Banded Results
Description: Change the background color of
every other record on the Search Results page.
Banded Results (cont.)
 Select fields for use in the widget: leave blank
 Localized Strings
 Code: BG_COLOR
 Name: #F7F7F7 (or any light web color)
 Bound Javascript Function: bandedResults
 Custom Javascript:
function bandedResults() {
jQuery("div.cell_wrapper:odd").css("backgroundcolor","${BG_COLOR}");
}
 Click Ok to save.
Banded Results (Cont.)
To add the new widget to your Search
Results display, click Manage Displays
 Select Manage Search Result Displays
 Find ILS_Default
 Click on the HTML icon
 Find the Banded Results widget on the
left and move it to the right.
 Click OK.

Banded Results (cont.)
Click Refresh Cache on the left hand
menu. This is an important step. Until
you refresh the cache, your widget will
not work.
 Test your widget by searching in
Enterprise. Every other record should
have a different background color.

Banded Results (cont.)
Show All Libraries in the Library
Facet

Simple widget to display all libraries in the
Library Facet without clicking more.
◦
◦
◦
◦
Click Manage Displays
Click Manage HTML Widgets
Click Add HTML Widget
Fill out the widget form as follows:




Type: Script Only
Code: FACET-LIBRARY
Name: Facet-ShowAllLibraries
Description: Show all libraries in the Library
Facet when there are more than 5 libraries.
Show All Libraries in the Library
Facet (cont.)
 Select fields for use in the widget: leave blank
 Localized Strings: None
 Bound Javascript Function:
prepshowAllLibraries
 Custom Javascript:
function prepshowAllLibraries(junk) {
setTimeout(function(){showAllLibraries()},220);
}
function showAllLibraries(junk){
$('moreLIBRARY').click('moreNagivators');
$('fewerLinkLIBRARY').hide();
}
Click Ok to save.
Show All Libraries in the Library
Facet (cont.)
To add the new widget to your Search
Results display, click Manage Displays
 Select Manage Search Result Displays
 Find ILS_Default
 Click on the HTML icon
 Find the Facet-ShowAllLibraries
widget on the left and move it to the
right.
 Click OK.

Show All Libraries in the Library
Facet (cont.)
Other Widgets to Consider

The following widgets are available on the
Support Portal under Community 
Developers Community 
Contributions:
◦ OCLCs Cite This Widget
◦ Marc View Widget
Questions?
Contact Information
Michael L. Bowden
Library Central Services
One HACC Drive
Harrisburg, PA 17110-2999
e: [email protected]
t: (717) 780-2503