-
Notifications
You must be signed in to change notification settings - Fork 0
/
OCLS_MARCVIEW.js
44 lines (41 loc) · 1.11 KB
/
OCLS_MARCVIEW.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
function getBib(rId){
var wsBaseUrl="http://bibc.ocls.ca:8080/symws/";
var clientId="DS_CLIENT";
var catKey;
catKey=jQuery('#'+rId+'_DOC_ID').find('.DOC_ID_value').text().split(':')[1];
var wsUrl=wsBaseUrl+'rest/standard/lookupTitleInfo?clientID='+clientId+'&titleID='+catKey+'&includeOPACInfo=false&marcEntryFilter=all&json=true&callback=?';
getFullBib(catKey,wsUrl);
}
function getFullBib(catKey,wsUrl){
jQuery.ajax({
type: 'GET',
url: wsUrl,
dataType: 'json',
success: function(data) {
marcInfo=data.TitleInfo[0].BibliographicInfo.MarcEntryInfo;
var marcOutput='<div id="marc_output">';
jQuery.each(marcInfo,function(){
marcOutput+= this.entryID + ' ' + this.indicators + ' ' + this.text + '</br>'}); //end each
marcOutput+='</div>';
jQuery(function() {
jQuery(marcOutput).dialog({
width:500,
maxHeight:700,
hide: { effect: "scale", duration: 750 },
title:'MARC for record #'+catKey,
modal:true,
buttons:{
Ok: function(){
jQuery(this).dialog("close");
}
}
});
});
}//end success function
,
error: function (xhr, ajaxOptions, thrownError) {
alert(xhr.status);
alert(thrownError);
}
});//end ajax()
}