45
Customizing Encore 4.2 with JavaScript Andrew Preater Senate House Libraries University of London

Customizing your Innovative Encore library catalogue with JavaScript - EIUG 2012 presentation

Embed Size (px)

DESCRIPTION

I presented this talk on JavaScript in Encore 4.2 at the European Innovative Users Group (EIUG) 2012 conference held at University of Leeds, 20-21 June 2012. I describe a new feature in Encore 4.2 that allows for customising the Encore record display using JavaScript. I discuss examples of what I have done at Senate House Library using this.

Citation preview

Page 1: Customizing your Innovative Encore library catalogue with JavaScript - EIUG 2012 presentation

Customizing Encore 4.2 with JavaScript

Andrew PreaterSenate House LibrariesUniversity of London

Page 2: Customizing your Innovative Encore library catalogue with JavaScript - EIUG 2012 presentation

http://bit.ly/uol175

Page 3: Customizing your Innovative Encore library catalogue with JavaScript - EIUG 2012 presentation

Your JavaScript in Encore 4.2

Examples

What I’ll talk about

Page 4: Customizing your Innovative Encore library catalogue with JavaScript - EIUG 2012 presentation

1. Persistent link

2. Social bookmarking buttons

3. QR codes

4. Tweaking Amazon jackets

5. Store requests

6. LibraryThing for Libraries

Examples

Page 5: Customizing your Innovative Encore library catalogue with JavaScript - EIUG 2012 presentation

Beta testing from January 2012

Live in March 2012

Encore 4.2

Page 6: Customizing your Innovative Encore library catalogue with JavaScript - EIUG 2012 presentation
Page 7: Customizing your Innovative Encore library catalogue with JavaScript - EIUG 2012 presentation
Page 8: Customizing your Innovative Encore library catalogue with JavaScript - EIUG 2012 presentation

div#footerArea

Your scripts

Page 9: Customizing your Innovative Encore library catalogue with JavaScript - EIUG 2012 presentation

div#customTop

div#customBottom

div#customSidebar

Page 10: Customizing your Innovative Encore library catalogue with JavaScript - EIUG 2012 presentation

Examples

Page 11: Customizing your Innovative Encore library catalogue with JavaScript - EIUG 2012 presentation

Persistent link

Page 12: Customizing your Innovative Encore library catalogue with JavaScript - EIUG 2012 presentation

Simple example

Page 13: Customizing your Innovative Encore library catalogue with JavaScript - EIUG 2012 presentation

1. Get bib number from document.URL

http://encore.ulrls.lon.ac.uk/iii/encore/record/C__Rb1000880__SJos%C3%A9%20Saramago__Ff%3Afacetlocations%3Aull%3Aull%3ASENATE%20HOUSE%20LIBRARY%3A%3A__Ff%3Afacetlanguages%3Aeng%3Aeng%3AEnglish%3A%3A__Ff%3Afacetfields%3Aauthor%3Aauthor%3AAuthor%3A%3A__Ff%3Afacetavailability%3Atrue%3Atrue%3AAt%20the%20library%3A%3A__P0%2C11__Orightresult__X4?lang=eng&suite=cobalt

Page 14: Customizing your Innovative Encore library catalogue with JavaScript - EIUG 2012 presentation

3. Write the innerHTML of the div

2. Create a div using document.createElement

Include the persistent URL:

http://encore.ulrls.lon.ac.uk/iii/encore/record/C__R + bib number

Page 15: Customizing your Innovative Encore library catalogue with JavaScript - EIUG 2012 presentation

4. Attach it to the customBottom div using appendChild

Page 16: Customizing your Innovative Encore library catalogue with JavaScript - EIUG 2012 presentation

Social bookmarking links

Page 17: Customizing your Innovative Encore library catalogue with JavaScript - EIUG 2012 presentation

Social bookmarking links

Page 18: Customizing your Innovative Encore library catalogue with JavaScript - EIUG 2012 presentation

QR codes

Page 19: Customizing your Innovative Encore library catalogue with JavaScript - EIUG 2012 presentation

QR codes

http://encore.ulrls.lon.ac.uk/iii/mobile/record/C__Rb1000880?lang=eng&utm_source=encore&utm_medium=qr&utm_campaign=mobile

bit.ly/L6YtmR

Page 20: Customizing your Innovative Encore library catalogue with JavaScript - EIUG 2012 presentation

QR codes

Page 21: Customizing your Innovative Encore library catalogue with JavaScript - EIUG 2012 presentation

Tweaking Amazon book jackets

Page 22: Customizing your Innovative Encore library catalogue with JavaScript - EIUG 2012 presentation

Amazon jackets

Page 23: Customizing your Innovative Encore library catalogue with JavaScript - EIUG 2012 presentation

Amazon jackets

Get your ISBN here:var key = "ISBN:9781844678785"

Page 24: Customizing your Innovative Encore library catalogue with JavaScript - EIUG 2012 presentation

1. If length is 13, convert it to an ISBN-10

2. Rewrite jacket img src and href

Amazon jackets

Page 25: Customizing your Innovative Encore library catalogue with JavaScript - EIUG 2012 presentation
Page 26: Customizing your Innovative Encore library catalogue with JavaScript - EIUG 2012 presentation

Requesting journals from store

Page 27: Customizing your Innovative Encore library catalogue with JavaScript - EIUG 2012 presentation

Store requests

Done in WebBridge in classic catalogue

No WebBridge bib resource table in Encore

Page 28: Customizing your Innovative Encore library catalogue with JavaScript - EIUG 2012 presentation
Page 29: Customizing your Innovative Encore library catalogue with JavaScript - EIUG 2012 presentation

Not an acceptable alternative

Page 30: Customizing your Innovative Encore library catalogue with JavaScript - EIUG 2012 presentation

div#toggleAnyComponent

Page 31: Customizing your Innovative Encore library catalogue with JavaScript - EIUG 2012 presentation
Page 32: Customizing your Innovative Encore library catalogue with JavaScript - EIUG 2012 presentation
Page 33: Customizing your Innovative Encore library catalogue with JavaScript - EIUG 2012 presentation

LibraryThing for Librarieswww.librarything.com/forlibraries

Page 34: Customizing your Innovative Encore library catalogue with JavaScript - EIUG 2012 presentation
Page 35: Customizing your Innovative Encore library catalogue with JavaScript - EIUG 2012 presentation

1. Append an element with LTfL divs in it.

2. Source LTfL JS after

LibraryThing

Page 36: Customizing your Innovative Encore library catalogue with JavaScript - EIUG 2012 presentation
Page 37: Customizing your Innovative Encore library catalogue with JavaScript - EIUG 2012 presentation

Similar items

Reviews

Tag browser

Page 38: Customizing your Innovative Encore library catalogue with JavaScript - EIUG 2012 presentation
Page 39: Customizing your Innovative Encore library catalogue with JavaScript - EIUG 2012 presentation
Page 40: Customizing your Innovative Encore library catalogue with JavaScript - EIUG 2012 presentation
Page 41: Customizing your Innovative Encore library catalogue with JavaScript - EIUG 2012 presentation
Page 42: Customizing your Innovative Encore library catalogue with JavaScript - EIUG 2012 presentation

Bib record display only

Limit is what you can do with JavaScript

Limitations

Page 43: Customizing your Innovative Encore library catalogue with JavaScript - EIUG 2012 presentation

Please steal and improve my JavaScript:http://bit.ly/encore42js

Page 44: Customizing your Innovative Encore library catalogue with JavaScript - EIUG 2012 presentation

Encore wikihttp://csdirect.iii.com/lswiki/Encore/

Page 45: Customizing your Innovative Encore library catalogue with JavaScript - EIUG 2012 presentation

Thank you

Me: @preater

[email protected]

www.preater.com