QR Code

Extension Information
Extension File Name: 
qrcode_juice.js
Author: 
Richard Wallis
Extension Class Name: 
qrcodeJuice
Function Parameters: 

 Constructor arguments:
arg: juice - instance of juice
arg: insert - JuiceInsert for page
arg: targetDiv - id of div element on page in which to insert jacket image
arg: fieldstr - string containing comma-separated list of Juice meta field names
arg: fieldsep - separator for multiple fields (will appear in QR code string) default is null string
 
arg: imgsize - size of qr code PNG image (note: this is size of image in pixels, not the amount of info in the QR code)
          Valid values are: s (120x120 - default) - m (230x230) - l (350x350)
 

Example Code: 

 function buildQRInsert(){
var div = '<div id="QRPanel" style="display: block; float: right; width: 230px; height: 230px"><div id="QRDiv" style="width: 230px; height: 230px"></div></div>';
var insert = new JuiceInsert(div,"#details > .table","before");
new qrcodeJuice(juice,insert,"QRDiv","title,location,shelfmark",'\n','m');
}
 

 This extension will insert a QR Code image on to a page.  It uses the Google Chart API to construct the image.
The string that is passed to the Cart API for encoding, is constructed by concatenating together the values stored in the meta values, the names of which, are passed in the fieldstr argument.   Those values are optionally separated by the string passed in the fieldsep argument.

QRCode in Talis Prism