'); addToAccordion('#detail_accordion'+detail, accordionHeader, accordionContent); NoveListSelectEnrichment(detailElement.childNodes[0].innerHTML); }}function NoveListSelectEnrichment(isbn) { if (typeof(novSelect) == 'undefined') { currentNovSelectAttempt++; if(currentNovSelectAttempt<= 10) { setTimeout("NoveListSelectEnrichment("+isbn+")", 250); } } else { novSelect.loadContentForISBN(String(isbn), novelistProfile, novelistPassword); }}// Important: Modifications to this file may be overwritten during an upgrade.// If you want to customize this widget and have those modifications persist through upgrades,// make a copy of this widget and make modifications to the copied widget.// You can then assign the copied widget to the detail or search result displays you want.if('undefined' === typeof eRC_PreviewButton) { eRC_PreviewButton = { ercPreviewButtonClass:'ercPreviewButton', addPreviewButtonToResult:function(resultId) { eRC_Base.getTitleData(function(data){ var hitlistOrDetail = 'detail'; if (resultId.match(/hitlist/)) { hitlistOrDetail = 'hitlist'; } var resultIndex = resultId.replace(hitlistOrDetail, ''); if(data && data.previews && data.previews.length > 0) { if (com_sirsi_ent_page.isMobile) { var ercPreviewActions = ResultActions.asyncResultActions['ERC_PREVIEW']; if (!ercPreviewActions) { ResultActions.asyncResultActions['ERC_PREVIEW'] = {}; ercPreviewActions = ResultActions.asyncResultActions['ERC_PREVIEW']; } ercPreviewActions['result' + resultIndex] = {'action': eRC_PreviewButton.getErcPreviewFormats}; // Show the preview button. ResultActions.updateResultAction('ERC_PREVIEW', 'result' + resultIndex, hitlistOrDetail, true, 'Preview'); } else { var resultNumber = resultId.match(/\d+/)[0]; if (hitlistOrDetail.match(/hitlist/)) { // add button to button column $J('#results_right' + resultId).append('
'); } else { // add button to button column $J('#detailActions' + resultId).append('
'); } } } else { ResultActions.updateResultAction('ERC_PREVIEW', 'result' + resultIndex, hitlistOrDetail, false); } }, resultId); }, getErcPreviewFormats:function(resultIndex, hitlistOrDetail) { var resultId = hitlistOrDetail + resultIndex; eRC_Dialogs.openFormatDialog(function(selectedFormat) { if(!selectedFormat || selectedFormat.error) { return; } var message; if('DOWNLOAD' === selectedFormat.action) { message = 'Your download will start shortly.'; window.location.assign(selectedFormat.url); } else if('REDIRECT' === selectedFormat.action) { message = 'You will be redirected to your content.'; safeWindowOpen(selectedFormat.url, '_blank'); } if(message) { if (com_sirsi_ent_page.isMobile) { showMessageModal('Preview', [message], false); } else { eRC_Dialogs.openMessageDialog(null, resultId, {message:message, title:'Preview'}); } } }, resultId, true); } };}// Important: Modifications to this file may be overwritten during an upgrade.// If you want to customize this widget and have those modifications persist through upgrades,// make a copy of this widget and make modifications to the copied widget.// You can then assign the copied widget to the detail or search result displays you want.if('undefined' === typeof eRC_DownloadButton) { eRC_DownloadButton = { reloadNeeded:false, ercDownloadButtonClass:'ercDownloadButton', addButtonToResult:function(resultId) { eRC_Base.getTitleData(function(data) { eRC_DownloadButton.addValidButton(resultId, data); },resultId); }, //GUI callbacks handleDownloadButtonClick:function(resultIndex, hitlistOrDetail, params) { var resultId = hitlistOrDetail + resultIndex; if(params.needLogin) { com_sirsi_ent_login.loginFirst(function(needReload) { eRC_DownloadButton.reloadNeeded = needReload; eRC_Dialogs.openFormatDialog(function(format, duration) { eRC_DownloadButton.handleFormatResponse(resultId, format, duration, params.needPin); }, resultId); }); return; } eRC_Dialogs.openFormatDialog(function(format, duration) { eRC_DownloadButton.handleFormatResponse(resultId, format, duration, params.needPin); }, resultId); }, handleHoldButtonClick:function(resultIndex, hitlistOrDetail) { var resultId = hitlistOrDetail + resultIndex; com_sirsi_ent_login.loginFirst(function(needReload) { eRC_DownloadButton.reloadNeeded = needReload; eRC_Dialogs.openHoldDialog(function(emailHold, autoCheckout) { eRC_DownloadButton.handleEmailHoldResponse(resultId, emailHold, autoCheckout); }, resultId); }); }, handleFormatResponse:function(resultId, format, duration, needPin) { if(format && !format.error) { eRC_Dialogs.openAccountDialog(function(resourceRetrievalUrl) { eRC_DownloadButton.handleAccountDialogResponse(resultId, resourceRetrievalUrl, needPin); }, resultId, format, duration); } else { if(eRC_DownloadButton.reloadNeeded) { window.location.reload(); } } }, handleEmailHoldResponse:function(resultId, emailHold, autoCheckout) { if(emailHold && !emailHold.error) { eRC_Dialogs.showLoad(); eRC_Base.getPlaceHoldResponse(function(responseJson) { eRC_DownloadButton.handleHoldResponse(resultId, responseJson); }, resultId, emailHold, autoCheckout); } else { if(eRC_DownloadButton.reloadNeeded) { window.location.reload(); } } }, handleHoldResponse:function(resultId, responseJson) { // we might be using this, set it up com_sirsi_ent_strings.setStringFormatFunc_JavaStyle(); var title = 'Error'; var message; var action = function() {}; //a do-nothing function var error; if(!responseJson || responseJson.error) { error = true; message = 'There was a problem placing your hold. Please try again later or contact your library for assistance.'; if(responseJson && responseJson.error) { message = responseJson.error; } } else { title = 'Place Hold'; message = responseJson.message; } // we're done using this, revert com_sirsi_ent_strings.resetString_dot_format(); eRC_Dialogs.hideLoad(); if (com_sirsi_ent_page.isMobile) { showMessageModal(title, [message], error, function() { if(eRC_DownloadButton.reloadNeeded) { window.location.reload(); } }); } else { eRC_Dialogs.openMessageDialog(function() { if(eRC_DownloadButton.reloadNeeded) { window.location.reload(); } }, resultId, {message:message, title:title}, responseJson); } if(!error && eRC_Dialogs.messageDialogTimeoutMS) { setTimeout(function() { eRC_Dialogs.closeMessageDialog(resultId); }, eRC_Dialogs.messageDialogTimeoutMS); } action(); }, handleAccountDialogResponse:function(resultId, resourceRetrievalUrl, needPin) { if(resourceRetrievalUrl && !resourceRetrievalUrl.error) { eRC_Dialogs.showLoad(); eRC_Base.getDownloadResponse(function(responseJson) { eRC_DownloadButton.handleCheckoutResponse(resultId, responseJson); }, resourceRetrievalUrl, needPin); } else { eRC_Dialogs.openFormatDialog(function(format, duration, onlyOne) { if(onlyOne) { if(eRC_DownloadButton.reloadNeeded) { window.location.reload(); } } else { eRC_DownloadButton.handleFormatResponse(resultId, format, duration, needPin); } }, resultId); } }, handleCheckoutResponse:function(resultId, responseJson) { var title = 'Error'; var action = function() {}; //a do-nothing function var error; if (com_sirsi_ent_page.isMobile) { var buttonLabel; var buttonClick; var messages = []; if(!responseJson || responseJson.error) { error = true; messages.push(responseJson.error ? responseJson.error : 'There was an error communicating with eResource Central.'); if(responseJson && responseJson.description) { messages.push(responseJson.description); } } else if(responseJson.hasOwnProperty('success') && !responseJson.success) { error = true; messages.push(responseJson.message.value ? responseJson.message.value: 'There was an error communicating with eResource Central.'); if(responseJson && responseJson.description) { messages.push(responseJson.description); } } else if('SYNC' === responseJson.action) { title = 'Checkout'; messages.push(responseJson.message.value); } else if('DOWNLOAD' === responseJson.action) { title = 'Download'; messages.push('Your download will start shortly, or you may click the button below.'); action = function() { safeWindowOpen(responseJson.url, '_blank'); }; buttonLabel = 'Download'; buttonClick = "safeWindowOpen('" + responseJson.url + "', '_blank');"; } else if('REDIRECT' === responseJson.action) { title = 'Redirecting'; messages.push('You will be redirected to your content, or you may click the button below.'); action = function() { safeWindowOpen(responseJson.url, '_blank'); }; buttonLabel = 'Open Content'; buttonClick = "safeWindowOpen('" + responseJson.url + "', '_blank');"; } else if (responseJson.message) { error = true; messages.push(responseJson.message); } else if (responseJson.cause && responseJson.cause.message) { error = true; messages.push(responseJson.cause.message); } else { error = true; messages.push('There was an error accessing your title. Please try again later. If the problem persists, contact your library for assistance.'); } eRC_Dialogs.hideLoad(); showMessageModal(title, messages, error, function() { if(eRC_DownloadButton.reloadNeeded) { window.location.reload(); } }, false, buttonLabel, buttonClick); } else { var message; if(!responseJson || responseJson.error) { error = true; message = responseJson.error ? responseJson.error : 'There was an error communicating with eResource Central.'; if(responseJson && responseJson.description) { message += '
' + responseJson.description; } } else if(responseJson.hasOwnProperty('success') && !responseJson.success) { error = true; message = responseJson.message.value ? responseJson.message.value: 'There was an error communicating with eResource Central.'; if(responseJson && responseJson.description) { message += '
' + responseJson.description; } } else if('SYNC' === responseJson.action) { title = 'Checkout'; message = responseJson.message.value; } else if('DOWNLOAD' === responseJson.action) { title = 'Download'; message = 'Your download will start shortly, or you may click the button below.'; action = function() { safeWindowOpen(responseJson.url, '_blank'); }; message += '
'; } else if('REDIRECT' === responseJson.action) { if (responseJson.isIFrameDisplay) { title = 'Checkout'; message = '
'; } else { title = 'Redirecting'; message = 'You will be redirected to your content, or you may click the button below.'; action = function () { safeWindowOpen(responseJson.url, '_blank'); }; message += '
'; } } else if (responseJson.message) { error = true; message = responseJson.message; } else if (responseJson.cause && responseJson.cause.message) { error = true; message = responseJson.cause.message; } else { error = true; message = 'There was an error accessing your title. Please try again later. If the problem persists, contact your library for assistance.'; } eRC_Dialogs.hideLoad(); eRC_Dialogs.openMessageDialog(function() { if(eRC_DownloadButton.reloadNeeded) { window.location.reload(); } }, resultId, {message:message, title:title}, responseJson && 'SYNC' === responseJson.action, responseJson.isIFrameDisplay); } if(!error && eRC_Dialogs.messageDialogTimeoutMS) { setTimeout(function() { eRC_Dialogs.closeMessageDialog(resultId); }, eRC_Dialogs.messageDialogTimeoutMS); } action(); }, //helper funcs addValidButton:function(resultId, ercItem) { if(!resultId) { return; } var hitlistOrDetail = 'detail'; if(resultId.match(/hitlist/)) { hitlistOrDetail = 'hitlist'; } var resultIndex = resultId.replace(hitlistOrDetail, ''); if($J('#content.mobile').length) { var actionResultId = 'result' + resultIndex; if(!ercItem) { ResultActions.updateResultAction('ERC_FULL', actionResultId, hitlistOrDetail, false); return; } if(ercItem.status && 'OK' === ercItem.status && ercItem.formats && ercItem.formats.length > 0) { var ercDownloadOrHoldActions = ResultActions.asyncResultActions['ERC_FULL']; if(!ercDownloadOrHoldActions) { ResultActions.asyncResultActions['ERC_FULL'] = {}; ercDownloadOrHoldActions = ResultActions.asyncResultActions['ERC_FULL']; } var buttonLabel; if(ercItem.availability && ercItem.availability.available) { if (ercItem.availability.downloadText) { buttonLabel = ercItem.availability.downloadText; } else { buttonLabel = 'Download'; } var params = {}; for(var i = 0; i < ercItem.formats.length; i++) { var auth = ercItem.formats[i].authentication; if(auth && (auth.patronId || (auth.accountsUrl && (auth.ereaderAccount || auth.partnerAccount)))) { params['needLogin'] = true; if(auth.patronPin) { params['needPin'] = true; } break; } } ercDownloadOrHoldActions[actionResultId] = {'action': eRC_DownloadButton.handleDownloadButtonClick, 'params': params}; } else if (ercItem.holdable) { buttonLabel = 'Place Hold'; ercDownloadOrHoldActions[actionResultId] = {'action': eRC_DownloadButton.handleHoldButtonClick}; } else { ResultActions.updateResultAction('ERC_FULL', actionResultId, hitlistOrDetail, false); return; } // Show the button. ResultActions.updateResultAction('ERC_FULL', actionResultId, hitlistOrDetail, true, buttonLabel); } else { ResultActions.updateResultAction('ERC_FULL', actionResultId, hitlistOrDetail, false); } } else if(!ercItem) { return; } else if(ercItem.status && 'OK' === ercItem.status && ercItem.formats && ercItem.formats.length > 0) { var buttonLabel = 'Place Hold'; var onClickText = 'javascript: '; if(ercItem.availability && ercItem.availability.available) { if (ercItem.availability.downloadText) { buttonLabel = ercItem.availability.downloadText; } else { buttonLabel = 'Download'; } onClickText += "$(this).focus();eRC_DownloadButton.handleDownloadButtonClick('" + resultIndex + "','" + hitlistOrDetail + "',"; var params = {}; for(var i = 0; i < ercItem.formats.length; i++) { var auth = ercItem.formats[i].authentication; if(auth && (auth.patronId || (auth.accountsUrl && (auth.ereaderAccount || auth.partnerAccount)))) { params['needLogin'] = true; if(auth.patronPin) { params['needPin'] = true; } break; } } onClickText += JSON.stringify(params) + ");"; } else if (ercItem.holdable) { onClickText += "$(this).focus();eRC_DownloadButton.handleHoldButtonClick('" + resultIndex + "','" + hitlistOrDetail + "');"; } if(onClickText.substr(12)) { // if there's no onClick text besides 'javascript: ', don't bother with a button eRC_DownloadButton.showButton(resultId, buttonLabel, onClickText); } } }, showButton:function(resultId, displayText, onClickText) { var matches = resultId.match(/^(detail|hitlist)(\d+)$/); if (matches) { var buttonId = resultId+eRC_DownloadButton.ercDownloadButtonClass; var button = document.getElementById(buttonId); if(!button) { button = document.createElement('button'); button.setAttribute('id', buttonId); button.setAttribute('class', eRC_DownloadButton.ercDownloadButtonClass+' button'); var parentJsId; if('detail' === matches[1]) { parentJsId = '#detailActions' + matches[0]; } else { parentJsId = '#results_cell' + matches[2] + ' .results_right'; } $J(parentJsId).append(button); } button.innerHTML = displayText; button.setAttribute('onClick',onClickText); $J(button).show(); } }, };}function showHoldings(){if(window.location.href.indexOf('lm=TABS_DIGITAL')==-1){ //DO NOT RUN THIS ON THEIR DIGITAL CONTENT SEARCH TAB, WHERE SOME TITLES ARE FROM THE ILS// json calls to to retrieve location, library and item type policiesjQuery.getJSON('https://sdws06.sirsidynix.net/lmac_ilsws/rest/admin/lookupLocationPolicyList?clientID=DS_CLIENT&json=true&callback=?',function(data){LocationList=data.policyInfo; jQuery.getJSON('https://sdws06.sirsidynix.net/lmac_ilsws/rest/admin/lookupLibraryPolicyList?clientID=DS_CLIENT&json=true&callback=?',function(data){ LibraryList=data.policyInfo; jQuery.getJSON('https://sdws06.sirsidynix.net/lmac_ilsws/rest/admin/lookupItemTypePolicyList?clientID=DS_CLIENT&json=true&callback=?',function(data){ ItemTypeList=data.policyInfo; // wait for page to finish loading jQuery(window).ready(function(){ //jQuery('#results_wrapper').ready(function(){ // loops through each title in results and inserts link to detail display then holdings insertLinks(); }); }); });});} //END LIMIT CHECK}function insertLinks(){ // loop through dom for each item in results jQuery('div.cell_wrapper').each(function(){ // get the profile name var theProfile = com_sirsi_ent_page.friendlyUrl; theProfile = theProfile.toUpperCase(); //get the catkey var catKey=jQuery(this).find('.DOC_ID_value').text().split(':')[1]; var hitNum = jQuery(this).find('.results_cell').attr('id'); var hitNum = hitNum.replace(/results_cell/, ""); if (catKey > 0) { // insert a hook for later calls jQuery(this).find('div.results_bio').append(''); //jQuery(this).find('div.results_right').after('
'); // get item holdings data getCopies(catKey,theProfile, hitNum); } // end loop through dom });}function getCopies(catKey,theProfile, hitNum){var herelib;var branchlib;var nearlib;if (theProfile == "CARTERET") { herelib = "CARTERET"; branchlib = ""; nearlib = "";}else if (theProfile == "CLARK") { herelib = "CLARK"; branchlib = ""; nearlib = "WESTFIELD";}else if (theProfile == "CRANBURY") { herelib = "CRANBURY"; branchlib = ""; nearlib = "";}else if (theProfile == "DUNELLEN") { herelib = "DUNELLEN"; branchlib = ""; nearlib = "";}else if (theProfile == "CRANFORD") { herelib = "CRANFORD"; branchlib = ""; nearlib = "FANWOOD,SCOTCHPL";}else if (theProfile == "EDISONTOWNSHIP") { herelib = "EPL-MAIN"; branchlib = "EPL-NORTH,EPL-CLARA,EPL-BKM,"; nearlib = "METUCHEN,";}else if (theProfile == "EASTBRUNSWICK" || theProfile == "EASTBRUNS_OPAC") { herelib = "EASTB"; branchlib = ""; nearlib = "MILLTOWN,SPOTSWOOD,OB-CENTRAL,MONROE";}else if (theProfile == "ELIZABETH") { herelib = "ELIZMAIN"; branchlib = "ELIZELMORA,ELIZLACORT,ELIZPORT,"; nearlib = "ROSELLE,ROSPARK,KENILWORTH,CARTERET,SPRINGFIELD, ";}else if (theProfile == "FANWOOD") { herelib = "FANWOOD"; branchlib = ""; nearlib = "CRANFORD,SPRINGFIELD,SCOTCHPL";}else if (theProfile == "HPPL") { herelib = "HPPL"; branchlib = ""; nearlib = "EPL-MAIN,METUCHEN";}else if (theProfile == "JAMESBURG") { herelib = "JAMESBURG"; branchlib = ""; nearlib = "";}else if (theProfile == "KENILWORTH") { herelib = "KENILWORTH"; branchlib = ""; nearlib = "";}else if (theProfile == "KEYPORT") { herelib = "KEYPORT"; branchlib = ""; nearlib = "";}else if (theProfile == "LONGBRANCH") { herelib = "LBPL"; branchlib = "LBPL-ELBRN,"; nearlib = "";}else if (theProfile == "EDISONBKM") { herelib = "EPL-BKM"; branchlib = "EPL-MAIN,EPL-NORTH,EPL-CLARA,"; nearlib = "METUCHEN,";}else if (theProfile == "MATAWAN") { herelib = "MAPL"; branchlib = ""; nearlib = "OB-CENTRAL,OB-LH,KEYPORT,";}else if (theProfile == "MCC") { herelib = "MCC"; branchlib = ""; nearlib = "EPL-MAIN,EPL-NORTH,EPL-CLARA,";}else if (theProfile == "METUCHEN") { herelib = "METUCHEN"; branchlib = ""; nearlib = "EPL-MAIN,EPL-NORTH,EPL-CLARA,MCC,";}else if (theProfile == "MDSX") { herelib = "MDSX"; branchlib = ""; nearlib = "";}else if (theProfile == "PLAINFIELD" || theProfile == "PLAINFIELD_OPAC" || theProfile == "PLAINFIELD_OPAC_ADV") { herelib = "PLAINFIELD"; branchlib = ""; nearlib = "";}else if (theProfile == "MILLTOWN") { herelib = "MILLTOWN"; branchlib = ""; nearlib = "EASTB";}else if (theProfile == "MONROE") { herelib = "MONROE"; branchlib = "MONROE-BKM,"; nearlib = "EASTB,";}else if (theProfile == "NEWBRUNSWICK") { herelib = "NEWBRUNSWICK"; branchlib = ""; nearlib = "NORTHBRUNSWICK";}else if (theProfile == "NORTHBRUNSWICK") { herelib = "NOBR"; branchlib = ""; nearlib = "NEWBRUNSWICK,";}else if (theProfile == "OLDCENTRAL") { herelib = "OB-CENTRAL"; branchlib = "OB-LH,"; nearlib = "MAPL,KEYPORT,EASTB,";}else if (theProfile == "PERTH") { herelib = "PERTH"; branchlib = ""; nearlib = "";}else if (theProfile == "PISCATAWAY") { herelib = "PISC-KEN"; branchlib = "PISC-WES,"; nearlib = "EPL-MAIN,";}else if (theProfile == "PLAINSBORO") { herelib = "PLAINSBORO"; branchlib = ""; nearlib = "";}else if (theProfile == "REDBANK") { herelib = "RBANK"; branchlib = ""; nearlib = "LBPL,";}else if (theProfile == "ROSELLE") { herelib = "ROSELLE"; branchlib = ""; nearlib = "";}else if (theProfile == "ROSPARK") { herelib = "ROSPARK"; branchlib = ""; nearlib = "";}else if (theProfile == "SOUTHAMBOY") { herelib = "SAMB"; branchlib = ""; nearlib = "";}else if (theProfile == "SAYREVILLE") { herelib = "SAYREVILLE"; branchlib = ""; nearlib = "";}else if (theProfile == "SANDBOX") { herelib = "EASTB"; branchlib = ""; nearlib = "";}else if (theProfile == "LMXAC") { herelib = "LMXAC"; branchlib = ""; nearlib = "EPL-NORTH,EPL-CLARA,EPL-MAIN";}else if (theProfile == "SCOTCHPLAINS") { herelib = "SCOTCHPL"; branchlib = ""; nearlib = "CRANFORD,SPRINGFIELD,FANWOOD";}else if (theProfile == "SOUTHPLAINFIELD") { herelib = "SOPPL"; branchlib = ""; nearlib = "";}else if (theProfile == "SOUTHBRUNSWICK" || theProfile == "SOUTHBRUNSWICK_OPAC") { herelib = "SBPL-MAIN"; branchlib = "SBPL-BKM,"; nearlib = "";}else if (theProfile == "SOUTHRIVER") { herelib = "SRIVER"; branchlib = ""; nearlib = "";}else if (theProfile == "SPOTSWOOD") { herelib = "SPOTSWOOD"; branchlib = ""; nearlib = "MILLTOWN,EASTB,";}else if (theProfile == "SPRINGFIELD") { herelib = "SPRING"; branchlib = ""; nearlib = "";}else if (theProfile == "WESTFIELD") { herelib = "WESTFIELD"; branchlib = ""; nearlib = "CLARK";}else { herelib = "LMXAC"; branchlib = ""; nearlib = "";}// json call to web services api and loop through resultsjQuery.getJSON('https://sdws06.sirsidynix.net/lmac_ilsws/rest/standard/lookupTitleInfo?clientID=DS_CLIENT&titleID='+catKey+'&includeItemInfo=true&marcEntryFilter=full&json=true&callback=?',function(data){// create list for itemsvar itemsArray = [];// list for items at local library or group of libraries (based on profile)var itemsArrayTop = [];// list for items at local library or group of libraries (based on profile)var itemsArrayBranch = [];// list for items at related or nearby libraries (based on profile)var itemsArrayMiddle = [];// list for items that are eresourcesvar eresourcesArray = [];//jump down into array returned by jsonvar titleInfo = data.TitleInfo[0];var copyInfo = data.TitleInfo[0].CallInfo;//var mhldInfo = titleInfo.MarcHoldingsInfo;//if (mhldInfo) {// jQuery('#copies_'+catKey).before('
//
');// getMarcHoldings(catKey,mhldInfo,theProfile,hitNum,herelib,branchlib,nearlib);//}// loop through copyInfo array returned by jsonjQuery.each(copyInfo,function(i,value){// get library descriptionvar libID = this.libraryID;var LibraryDesc = getDescription(this.libraryID,LibraryList);// get call numbervar callInfo=this.callNumber;if (this.numberOfCopies > 0) {// loop through itemInfo array returned by jsonjQuery.each(value.ItemInfo,function(){// get home locationvar HomeLocDesc = getDescription(this.homeLocationID,LocationList);// get current locationvar CurrentLocDesc = getDescription(this.currentLocationID,LocationList);// get item typevar ItemTypeDesc = getDescription(this.itemTypeID,ItemTypeList);if (this.currentLocationID == "CHECKEDOUT") { CurrentLocDesc = "Checked Out";}if (this.reshelvingLocationID) { CurrentLocDesc = getDescription(this.reshelvingLocationID,LocationList);}// replace some annoying labels from Symphony policies with Enterprise friendly onesLibraryDesc = cleanupLibraryDesc(HomeLocDesc,LibraryDesc);HomeLocDesc = cleanupLocDesc(HomeLocDesc);ItemTypeDesc = cleanupItemTypeDesc(ItemTypeDesc);CurrentLocDesc = cleanupLocDesc(CurrentLocDesc);// get public note if it existsvar itemNote='';if (this.publicNote) {itemNote = ' ('+this.publicNote+')';}// create status if current and home location are not equalvar itemStatus='';if (CurrentLocDesc!=HomeLocDesc) {itemStatus = CurrentLocDesc;}else {itemStatus = HomeLocDesc;}// get due date and add to status// if (this.dueDate) {// var date = new Date(this.dueDate);// itemStatus = '--Due '+(date.getMonth()+1)+'/'+date.getDate()+'/'+ date.getFullYear();// }if (libID == herelib) { var thisLine = '
'; itemsArrayTop.push(thisLine);}else if(branchlib.indexOf(libID + ',') > -1) { var thisLine = '
'; itemsArrayBranch.push(thisLine);}else if(nearlib.indexOf(libID + ',') > -1) { var thisLine = '
'; itemsArrayMiddle.push(thisLine);}else { var thisLine = '
'; itemsArray.push(thisLine);}// end json itemInfo loop});}else { // call number with zero copies ItemTypeDesc = "On Order"; itemNote = ""; itemStatus = " Being acquired by the library"; if (libID == herelib) { var thisLine = '
'; itemsArrayTop.push(thisLine); } else if(branchlib.indexOf(libID + ',') > -1) { var thisLine = '
'; itemsArrayBranch.push(thisLine); } else if(nearlib.indexOf(libID + ',') > -1) { var thisLine = '
'; itemsArrayMiddle.push(thisLine); } else { var thisLine = '
'; itemsArray.push(thisLine); }}// end json copyInfo loop});//// sort lines by library//itemsArrayTop.sort(// function(a, b) {// if (a.toLowerCase() < b.toLowerCase()) return -1;// if (a.toLowerCase() > b.toLowerCase()) return 1;// return 0;// }//);//// sort lines by library//itemsArrayBranch.sort(// function(a, b) {// if (a.toLowerCase() < b.toLowerCase()) return -1;// if (a.toLowerCase() > b.toLowerCase()) return 1;// return 0;// }//);//// sort lines by library//itemsArrayMiddle.sort(// function(a, b) {// if (a.toLowerCase() < b.toLowerCase()) return -1;// if (a.toLowerCase() > b.toLowerCase()) return 1;// return 0;// }//);//// sort lines by libraryitemsArray.sort( function(a, b) { if (a.toLowerCase() < b.toLowerCase()) return -1; if (a.toLowerCase() > b.toLowerCase()) return 1; return 0; });if ((itemsArrayTop.length != 0)||(itemsArrayBranch.length != 0)||(itemsArrayMiddle.length !=0)||(itemsArray.length != 0)) {var itemsOutputTop = itemsArrayTop.join("\n");var itemsOutputBranch = itemsArrayBranch.join("\n");var itemsOutputMiddle = itemsArrayMiddle.join("\n");var itemsOutput = itemsArray.join("\n");//var moreCopiesCount = itemsArrayMiddle.length + itemsArray.length;var moreCopiesCount = itemsArray.length;jQuery('#startlink_'+catKey).remove();//var myheight = jQuery('div.results_bio').height();//jQuery('#copies_'+catKey).append('
');var divwidth = 625var tablewidth = 600;if(window.location.pathname.search("mylists") > 0) { divwidth = 585; tablewidth = 560;}jQuery('#copies_'+catKey).append('
');if ((itemsOutputTop != "" || itemsOutputBranch != "" || itemsOutputMiddle != "" || itemsOutput != "") && herelib != "CCS") { jQuery('#copies_'+catKey).append('
library | Call Number | item type | item notes | status |
---|
');}// ### uncomment if this code replaces code on Details display, so as to always display other libraries' holdings//if (itemsArray.length !=0) {//jQuery('#startcopies_'+catKey).append('
See holdings at other libraries
');// } if (itemsArray.length !=0) { if (herelib != "CCS") { jQuery('#copies_'+catKey).after('
'); if (itemsArrayTop.length == 0 && itemsArrayMiddle == 0) { moreCopies(catKey); jQuery('.morecopies_'+catKey).show(); jQuery('#morelink_'+catKey).hide(); } } else {// jQuery('.morecopies_'+catKey).show(); } } var x1 = jQuery('#copies_' + catKey + ' .detailItems').offset().left; var y1 = jQuery('#copies_' + catKey + ' .detailItems').offset().top; var h1 = jQuery('#copies_' + catKey + ' .detailItems').outerHeight(true); var w1 = jQuery('#copies_' + catKey + ' .detailItems').outerWidth(true); var b1 = y1 + h1; var r1 = x1 + w1; var x2 = jQuery('#results_cell' + hitNum + ' .results_right').offset().left; var y2 = jQuery('#results_cell' + hitNum + ' .results_right').offset().top; var h2 = jQuery('#results_cell' + hitNum + ' .results_right').outerHeight(true); var w2 = jQuery('#results_cell' + hitNum + ' .results_right').outerWidth(true); var b2 = y2 + h2; var r2 = x2 + w2; if (b1 < y2 || y1 > b2 || r1 < x2 || x1 > r2) { //jQuery('#copies_'+catKey).append('
'); } else { //jQuery('#copies_'+catKey).append('
'); jQuery('#copies_'+catKey+' .vertspacer').height(b2-y1+12); }}// end json getJSON loop});}function moreCopies(catKey){// executed when you click on the More Copies link// show the hidden copies// insert a Hide copies link// the style overflow visible part is to fix css problem in ie8jQuery('.morecopies_'+catKey).show();jQuery('#copies_'+catKey).before('
');jQuery('#morelink_'+catKey).hide();jQuery('.cell_wrapper').attr("style","overflow:visible/0;");return false;}function hideCopies(catKey){// executed when you click on the Hide Copies link// hide the additiontal copies// insert a More copies link// the style overflow visible part is to fix css problem in ie8jQuery('.morecopies_'+catKey).hide();jQuery('#morelink_'+catKey).show();jQuery('#lesslink_'+catKey).remove();jQuery('.cell_wrapper').attr("style","overflow:auto/0;");return false;}function getDescription (thisID,thisPolicy) {// routine to retrieve descriptive labels from policyvar thisDescription = '';for (var i = 0; i < thisPolicy.length; i++) {if (thisPolicy[i].policyID == thisID) {return thisPolicy[i].policyDescription;break;}}}function cleanupLocDesc(thisLocation) {// replace some annoying labels from Symphony policies with Enterprise friendly ones//thisLocation = thisLocation.replace(/UAA Learning Resources Center - /g,'');//thisLocation = thisLocation.replace(/UAA Learning Resources Center/g,'');return thisLocation;}function cleanupItemTypeDesc(ItemTypeDesc) {// replace some annoying labels from Symphony policies with Enterprise friendly ones//ItemTypeDesc = ItemTypeDesc.replace(/Trade Paperback/g,'Book');//ItemTypeDesc = ItemTypeDesc.replace(/Music or Spoken Word CD Set/g,'CD Set');return ItemTypeDesc;}function cleanupLibraryDesc (HomeLocDesc,LibraryDesc) {// replace some annoying labels from Symphony policies with Enterprise friendly ones//LibraryDesc = LibraryDesc.replace(/Egan Library/g,'Egan');//LibraryDesc = LibraryDesc.replace(/Mendenhall Valley/g,'Mendenhall');return LibraryDesc;}function getProfile() {// parse the profile url and convert to a profile name useful for sorting the holdingsvar urlParts = jQuery('#searchBoxHomeLink a').attr('href').split('/').length;var theProfile = jQuery('#searchBoxHomeLink a').attr('href').split('/')[urlParts - 2].toUpperCase();// theProfile = theProfile.replace(/ANCMUSEUM/g,'Anchorage Museum');// theProfile = theProfile.replace(/ASL/g,'State Library');theProfile = theProfile.replace(/UAAMATSU/g,'UAA Mat-Su');return theProfile;}function placeNoImageArt (rId) {var customImageName = 'no_image.gif'; //Put in the name of your custom imageif(document.getElementById('detailActions'+rId) != undefined){ jQuery('.detail_cover_art[src*="no_image.png"]').each(function(){ jQuery(this).attr('src', '/custom/web/'+customImageName); });}else{ jQuery('.results_img[src*="no_image.png"]').each(function(){ jQuery(this).attr('src', '/custom/web/'+customImageName); }); }}var locationMap={};var baseWsURL='https://sdws06.sirsidynix.net/lmac_ilsws/';var clientID='DS_CLIENT';var locationDone=false;var maxAttempts=40;var curAttempt=0;function startReshelvingDetail(rId){showReshelving(rId);}// WAIT FOR POLICIESfunction waitReshelvingItems (bibKey,hitNum) {if (locationDone==false){curAttempt++;if(curAttempt<=maxAttempts){setTimeout(function() { waitReshelvingItems(bibKey,hitNum); },500);}// if 2 }// if 1else{ getReshelving(bibKey,hitNum);}// else}// GET BIB IDfunction showReshelving(rId) {var hitNum = rId.split("detail")[1];var bibKey = $J('#'+rId+'_DOC_ID .DOC_ID_value').text().split(':')[1];var itemLibraryEvent = 'detail.detailavailabilityaccordions:lookuptitleinfo/ent:$002f$002fSD_ILS$002f0$002fSD_ILS:'+bibKey+'/ILS/'+hitNum; $J(document).ajaxComplete(function(e, xhr, detailCall) { var curEvent=detailCall.url; console.log(detailCall); if(curEvent.indexOf(itemLibraryEvent)!==-1){ getReshelvingPolicies(); waitReshelvingItems(bibKey,hitNum); } });}// GET RESHELVINGfunction getReshelving (bibKey,hitNum) {$J.getJSON(baseWsURL+'rest/standard/lookupTitleInfo?clientID='+clientID+'&titleID='+bibKey+'&includeItemInfo=true&includeOPACInfo=false&json=true&callback=?',function(data){for (i=0;i
Tag | Ind. | Subfields | ';var marcUrl=wsBaseUrl+'catalog/bib/key/'+catKey+'?includeFields=*';jQuery.ajax({ type: 'GET', url: marcUrl, dataType: 'json', headers: { "Accept": "application/json","Content-Type":"application/json","SD-Preferred-Role":"GUEST", "x-sirs-clientID":clientId,"sd-originating-app-id":origApp},success: function(marcdata) { bibTag=marcdata.fields.bib.fields;var marcOutput='
---|---|---|
'+curTag+' | ';htmlOutput+=''+curInd+' | ';jQuery.each(bibTag[tagIndex].subfields,function(subfieldIndex){ if(jQuery.inArray(curTag,fixedFieldTags)==-1){var subfieldCode=' |
' + htmlOutput + '
');//openModal($J('#'+rId+'_marcview'), 'MARC for record # '+catKey, {width:500, maxHeight:700}, true);/***begin jqueryui dialog***/ $J(function() {$J(htmlOutput).dialog({width:'97%',maxHeight:700,hide: { effect: "scale", duration: 750 },title:'MARC for record # '+catKey,modal:true,buttons:{Ok: function(){$J(this).dialog("close");}}});});setTimeout(function(){$J('#marc_table_'+catKey).parent().css('background-color',"#fff");$J('#marc_table_'+catKey).parent().addClass('floatingModal');$J('#marc_table_'+catKey).siblings('.ui-dialog-titlebar').addClass('text-h2');$J('#marc_table_'+catKey).siblings('.ui-dialog-buttonpane').find('.ui-dialog-buttonset').addClass('okButton');$J('#marc_table_'+catKey).siblings('.ui-dialog-buttonpane').find('button').addClass('button fullwidth').removeClass('ui-button ui-corner-all ui-widget');$J('#marc_table_'+catKey).parent().css('top', "18%");$J('#marc_table_'+catKey).css('max-height',"350px");},100);/***end jQueryUI dialog****/}else {/***begin jqueryui dialog***/ $J(function() {$J(htmlOutput).dialog({width:500,maxHeight:700,hide: { effect: "scale", duration: 750 },title:'MARC for record # '+catKey,modal:true,buttons:{Ok: function(){$J(this).dialog("close");}}});});/***end jQueryUI dialog****/}},error: function (xhr, ajaxOptions, thrownError) { console.log('Error occurred of status ' + xhr.status + ', message is ' + thrownError); }});//end ajax()}//end getbibRoafunction reload_jqueryui(rId){jQuery.getScript( "/client/js/ui/jquery.ui.core.js", function( data, textStatus, jqxhr ) { getBibRoa(rId);});}// Important: Modifications to this file may be overwritten during an upgrade.// If you want to customize this widget and have those modifications persist through upgrades,// make a copy of this widget and make modifications to the copied widget.// You can then assign the copied widget to the detail or search result displays you want.if('undefined' === typeof eRC_Base) { eRC_Base = { //variables ercIds:[], ercTitleData:[], ercFormats:[], titleWaitingCallbacks:[], titlesReady:false, titleAjaxCallsOut:0, //initialization addErcId:function(rId) { var ercId = eRC_Base.getErcIdFromDom(rId); if(ercId) { eRC_Base.ercIds.push({'ercId':ercId,'resultId':rId}); } }, getErcIdFromDom:function (rId) { return $J('#'+rId+'_ERC_ID > .ERC_ID_value').text(); }, //loading the data loadTheData:function() { var idString = ''; for(var i = 0; i < eRC_Base.ercIds.length; i++) { var idVal = eRC_Base.ercIds[i]; if(idString.indexOf(idVal) === -1) { idString += ','+idVal.ercId; } } if(idString.length > 0) { idString = idString.substr(1); } if(idString) { var titlesUrl = addPathParams(com_sirsi_ent_widgets.URLS.eRC.titleInfoUrl, encodeAsTapestry(idString)); eRC_Base.titleAjaxCallsOut++; new AjaxHandler(null, titlesUrl, null, eRC_Base.handleTitlesResponse, null, true).invokeAjax(); } else { eRC_Base.titlesReady = true; } }, handleTitlesResponse:function(response) { eRC_Base.titleAjaxCallsOut--; if((typeof eRC_Base.ercTitleData !== 'undefined') && eRC_Base.ercTitleData) { if ((typeof response.responseJSON !== 'undefined')) { // could the response be undefined? What should we do in that scenario? if(response.responseJSON.eResourceList) { response.responseJSON.eResourceList.forEach(function (er) { eRC_Base.ercTitleData.push(er); }); } if(response.responseJSON.eFormatList) { response.responseJSON.eFormatList.forEach(function (er) { if(!eRC_Base.ercFormats.contains(er)) { eRC_Base.ercFormats.push(er); } }); } } } else { if (response.responseJSON) { eRC_Base.ercTitleData = response.responseJSON.eResourceList; eRC_Base.ercFormats = response.responseJSON.eFormatList; } } eRC_Base.titlesReady = true; var unCalled = []; for(var i = 0; i < eRC_Base.titleWaitingCallbacks.length; i++) { var callback = eRC_Base.titleWaitingCallbacks[i]; var data = eRC_Base.getData(callback.ercId); if(data || eRC_Base.titleAjaxCallsOut == 0) { callback.callback(data); } else { unCalled.push(callback); } } eRC_Base.titleWaitingCallbacks = unCalled; }, getSingleTitle:function(eResourceId) { var titlesUrl = addPathParams(com_sirsi_ent_widgets.URLS.eRC.titleInfoUrl, encodeAsTapestry(eResourceId)); eRC_Base.titleAjaxCallsOut++; new AjaxHandler(null, titlesUrl, null, eRC_Base.handleTitlesResponse, null, true).invokeAjax(); }, //functions getData:function(ercDocumentId) { if (!ercDocumentId) { return; } if (eRC_Base.ercTitleData) { var eResourceList = eRC_Base.ercTitleData; for (var i = 0; i < eResourceList.length; i++) { if (eResourceList[i].id == ercDocumentId) { return eResourceList[i]; } } } //we didn't find it, so request it. // but don't request it if we've already got too many callouts still pending if (eRC_Base.titleAjaxCallsOut < 50) { eRC_Base.getSingleTitle(ercDocumentId); } }, getErcId:function(resultId, isRetry) { if(!resultId) { return; } for(var i = 0; i < eRC_Base.ercIds.length; i++) { var ercId = eRC_Base.ercIds[i]; if(ercId.resultId == resultId) { return ercId.ercId; } } //we might have never seen this result id before. //so, add it to the list (which should pull the ercId from the dom) //and then try again. if(!isRetry) { eRC_Base.addErcId(resultId); return eRC_Base.getErcId(resultId, true); } }, getFormatDetails:function(formatName) { for(format of eRC_Base.ercFormats) { if(format.format === formatName) { return format; } } return null; }, createAnchorTextLinks:function(string, linkInfo) { let div = document.createElement('div'); //linkInfo in an object with keys {replacement, text, and link} if (linkInfo && linkInfo.length > 0) { let regx = /\{[A-Za-z0-9.]+\}/g; let index = 0; string.replace(regx, (match, offset) => { let obj = this.findLinkMatch(linkInfo, match); //append everything before the link div.append(document.createTextNode(string.substring(index, offset))); if(obj) { let a = document.createElement("a"); a.appendChild(document.createTextNode(obj.text)); a.setAttribute("href", "//" + obj.url); a.setAttribute("target", "_blank"); div.append(a); } index = offset + match.length; } ); if(index < string.length -1) { div.append(document.createTextNode(string.substr(index))); } } else { div.append(document.createTextNode(string)); } return div; }, findLinkMatch:function(linkInfo, match) { for(let i = 0; i < linkInfo.length; i++) { if(linkInfo[i].replacement === match) { return linkInfo[i]; } } }, //'API' functions getTitleData:function(callbackFunction, resultId) { var data; // we need to limit the call outs to a reasonable number so that we don't overwhelm the system resources. if(eRC_Base.titlesReady && eRC_Base.titleAjaxCallsOut < 200) { data = eRC_Base.getData(eRC_Base.getErcId(resultId)); } if(data) { callbackFunction(data); } else { eRC_Base.titleWaitingCallbacks.push({'callback':callbackFunction,'ercId':eRC_Base.getErcId(resultId)}); } }, getAccountsResponse:function(callbackFunction, ercAccountsUrl) { var getAccountsUrl = addPathParams(com_sirsi_ent_widgets.URLS.eRC.accountsUrl, encodeAsTapestry(ercAccountsUrl)); new AjaxHandler(null, getAccountsUrl, null, function(response) { callbackFunction(response.responseJSON) }, null, true).invokeAjax(); }, getDownloadResponse:function(callbackFunction, ercResourceUrl, needPin) { var downloadUrl = addPathParams(com_sirsi_ent_widgets.URLS.eRC.getEResourceUrl, encodeAsTapestry(ercResourceUrl)+'/'+!!needPin); new Ajax.Request(downloadUrl, { onSuccess:function(response) { callbackFunction(response.responseJSON) }, onException: Tapestry.ajaxFailureHandler, onFailure: Tapestry.ajaxFailureHandler, asynchronous: true }); }, getPlaceHoldResponse:function(callbackFunction, resultId, emailHold, autoCheckout) { if(typeof autoCheckout !== 'boolean') { autoCheckout = false; } var array = emailHold.split("@"); // tapestry doesn't want us to pass @ characters, so let's split the email address // tapestry doesn't like empty params, so we need to use encodeAsTapestry to pass special values (like empty strings) var getHoldUrl = addPathParams(com_sirsi_ent_widgets.URLS.eRC.placeHoldUrl, encodeAsTapestry(eRC_Base.getErcId(resultId)) + '/' + encodeAsTapestry(array[0]) + '/' + encodeAsTapestry(array[1]) + '/' + autoCheckout); new AjaxHandler(null, getHoldUrl, null, function(response) { callbackFunction(response.responseJSON) }, null, true).invokeAjax(); }, getHoldEmail:function(callbackFunction, resultId) { var getHoldEmail = addPathParams(com_sirsi_ent_widgets.URLS.eRC.emailHoldUrl, encodeAsTapestry(eRC_Base.getErcId(resultId))); new AjaxHandler(null, getHoldEmail, null, function(response) { callbackFunction(response.responseJSON) }, null, true).invokeAjax(); }, fixErcIds:function(sortedDocIds) { // we want to maintain the new sort order var newErcIds = []; if (eRC_Base.ercIds && eRC_Base.ercIds.length > 0) { var ercIdIndex = 0; if (sortedDocIds) { for (var idIndex = 0; idIndex < sortedDocIds.length; idIndex++) { var docId = sortedDocIds[idIndex]; for (var ercIdIndex = 0; ercIdIndex < eRC_Base.ercIds.length; ercIdIndex++) { var currentErcIdObject = eRC_Base.ercIds[ercIdIndex]; var containsErcId = docId.indexOf(currentErcIdObject.ercId); if (containsErcId !== -1) { var currentErcId = currentErcIdObject.ercId; newErcIds.push({'ercId': currentErcId, 'resultId': 'hitlist' + idIndex}); break; } } } } else { var processedResultIdSet = []; var resultIdMap = new Map(); for (var i = 0; i < eRC_Base.ercIds.length; i++) { var ercIdObject = eRC_Base.ercIds[i]; if (!processedResultIdSet.contains(ercIdObject.resultId)) { var resultId = ercIdObject.resultId; var ercId = $J('#' + resultId + '_ERC_ID > .ERC_ID_value').text(); resultIdMap.set(ercId, resultId); processedResultIdSet.push(currentResultId); } } var keys = resultIdMap.keys; for (var j = 0; j < keys.length; j++) { var currentResultId = resultIdMap.get(keys[j]); newErcIds.push({'ercId': j, 'resultId': currentResultId}); } } } eRC_Base.ercIds = newErcIds; }, reorderErcIds:function(docId, destinationIndex, keepItem) { if (eRC_Base.ercIds) { var ercIdFound = false; var ercId, currentIndex; var processedResultIdSet = []; var destination = keepItem ? destinationIndex : eRC_Base.ercIds.length; //check if it's even in the list, otherwise don't worry about it for (var ercIndex = 0; ercIndex < eRC_Base.ercIds.length; ercIndex++) { var currentErcIdObject = eRC_Base.ercIds[ercIndex]; var containsErcId = docId.indexOf(currentErcIdObject.ercId); if (containsErcId !== -1) { ercIdFound = true; ercId = currentErcIdObject.ercId; // remove 'hitlist' to get list index currentIndex = currentErcIdObject.resultId.toString().substring(7); } if (!processedResultIdSet.contains(currentErcIdObject.resultId)) { processedResultIdSet.push(currentErcIdObject.resultId); } } if ('undefined' !== typeof currentIndex) { eRC_Base.adjustResultIds(currentIndex, destination, ercIdFound, ercId, processedResultIdSet.length, keepItem); } else { eRC_Base.fixErcIds(null); } } }, // keepItem - boolean - whether or not we're keeping the item (delete, then no; move, then no; reorder, then yes) adjustResultIds:function(currentResultId, destinationResultId, ercIdInList, ercId, hitlistSize, keepItem) { var newErcIds = []; var processedResultIdSet = []; var currentPosition = currentResultId; var destinationPosition = destinationResultId; var smallerIndex = currentPosition < destinationPosition ? currentPosition : destinationPosition; var upperIndex = currentPosition < destinationPosition ? destinationPosition : currentPosition; // set values before moved items for (var index = 0; index < smallerIndex; index++) { var loopResultId = eRC_Base.getResultIdFromPosition(index); if (eRC_Base.getErcId(loopResultId) && !(eRC_Base.getErcId(loopResultId) === ercId)) { newErcIds.push({'ercId': eRC_Base.getErcId(loopResultId), 'resultId': loopResultId}); } } // put item in list where it goes if it was in the list if (ercIdInList && keepItem) { newErcIds.push({'ercId': ercId, 'resultId': eRC_Base.getResultIdFromPosition(destinationResultId)}); } // set values of moved items if ((currentPosition < destinationPosition) || !keepItem) { var nextPosition = currentResultId; // pull everyone up one while (nextPosition < destinationPosition) { var resultId = nextPosition; var nextErcId = eRC_Base.getNextErcId(resultId); if (nextErcId) { newErcIds.push({'ercId': nextErcId, 'resultId': eRC_Base.getResultIdFromPosition(resultId)}); } nextPosition++; } } else { // push everyone down one var nextPosition = destinationPosition; while (nextPosition < currentPosition) { var nextResultId = eRC_Base.getResultIdFromPosition(nextPosition); var nextErcId = eRC_Base.getErcId(nextResultId, false); if (nextErcId) { newErcIds.push({'ercId': nextErcId, 'resultId': eRC_Base.getResultIdFromPosition(nextPosition + 1)}); } nextPosition++; } } // set values after moved items for (var index = upperIndex + 1; index < hitlistSize; index++) { var loopResultId = eRC_Base.getResultIdFromPosition(index); if (eRC_Base.getErcId(loopResultId)) { newErcIds.push({'ercId': eRC_Base.getErcId(loopResultId, false), 'resultId': loopResultId}); } } eRC_Base.ercIds = newErcIds; }, getResultIdFromPosition:function(position) { return 'hitlist' + position; }, getNextErcId:function(resultId) { var position = parseInt(resultId) + 1; var newResultId = eRC_Base.getResultIdFromPosition(position); return eRC_Base.getErcId(newResultId, false); } }; $J(function() { eRC_Base.loadTheData(); });}function collapseFacets() { // Hide facet columns initially $J('.searchLimitsColumn').hide(); // Add Dropdown Caret to All Facet Titles $J('.searchLimitsColumn .facet .facetTitleRow .facetTitle').prepend(''); // Fix spacing of collapsed facets $J('.searchLimitsColumn .facetTitleRow').css('margin-bottom','0px'); $J('.searchLimitsColumn .facetTitle').css('margin-bottom','0px'); $J('.searchLimitsColumn').show(); // Add Dropdown Caret to All Breadcrumb Sections $J('.searchLimitsColumn .breadCrumbsContainer .breadCrumbs .facetTitle').prepend(''); $J('.searchLimitsColumn #breadCrumbsContainer .breadCrumbs .facetTitle').prepend(''); //// Hide Library facet content // Wrap Library Facet Elements in Div (Only Elements That Should Be Hidden) $J('.searchLimitsColumn .facet form[id^="facet"]').each(function() { $J(this).find(' > div').not('.facetTitleRow').wrapAll(''); }); // Add Class to Newly Created Div, Append Clearer Div, and Hide Div $J('.searchLimitsColumn .facet form > div').not('.facetTitleRow').each(function() { $J(this).addClass('facet-info').append('').hide(); }); //// Create toggle for Library facet accordion content // Display/Hide Filter Choices for Library Results $J('.searchLimitsColumn .facet').each(function() { $J(this).find('> form .facetTitleRow').click(function() { $J(this).parent().find('.facet-info').slideToggle('slow', function() { if ($J(this).css('display') == 'none') { $J(this).parent().find('> .facetTitleRow .facetTitle > i').replaceWith(''); if ($J(this).find('> form').attr('id') !== 'facetFormPUBDATE') { $J(this).parent().find('.limitcolumn_button button[value=Include]').hide(); $J(this).parent().find('.limitcolumn_button button[value=Exclude]').hide(); } else { $J(this).parent().find('.limitcolumn_button button[value=Include]').show(); $J(this).parent().find('.limitcolumn_button button[value=Exclude]').show(); } $J(this).parent().find('.facetTitle').css('font-weight', '400'); var facetNumber = $J(this).find('input[type="checkbox"]:checked').length; if ($J(facetNumber).length > 0) { $J(this).parent().find('.facetTitleRow').css({ 'border-bottom': '0' }); $J(this).parent().find('.facetTitleRow').append('Selected: ' + facetNumber + '
'); } else { $J(this).parent().find('.facetTitleRow').css({ 'border-bottom': '0' }); } } else { $J(this).parent().find('> .facetTitleRow .facetTitle > i').replaceWith(''); $J(this).parent().find('.limitcolumn_button button[value=Include]').show(); $J(this).parent().find('.limitcolumn_button button[value=Exclude]').show(); $J(this).css('padding-top','10px'); $J(this).parent().find('.facetTitleRow').css({ 'border-bottom': 'solid 1px #dedede' }); $J(this).parent().find('.facetTitle').css('font-weight', '600'); $J(this).parent().find('.facetTitleRow .facets-selected').remove(); } }); }); }); //// Create toggle for Library facet accordion content // Add margin to bottom of last breadcrumb $J('.searchLimitsColumn .limitcolumn_wrapper').find('.breadCrumbsContainer:last').css('margin-bottom', '10px'); $J('.searchLimitsColumn .limitcolumn_wrapper').find('#breadCrumbsContainer:last').css('margin-bottom', '10px'); $J('.searchLimitsColumn, .rightSearchLimitsColumn').show(); if ($J('.searchLimitsColumn #breadCrumbsContainer').text() == "") { $J('.searchLimitsColumn #breadCrumbsContainer').css('margin-bottom', '0'); } // Hide facet include/exclude buttons $J('.searchLimitsColumn .facet').each(function() { $J(this).css('padding-bottom','5px'); if ($J(this).find('> form').attr('id') !== 'facetFormPUBDATE') { $J(this).find('.limitcolumn_button').hide(); } }); // Move include/exclude buttons $J('.searchLimitsColumn .facet').each(function() { $J(this).find('.limitcolumn_button').appendTo($J(this).find('.facet-info')); }); // Show include/exclude when checkboxes are checked (hide if none are checked) $J('.searchLimitsColumn .facet').each(function() { $J(this).find('.facetItem input[type="checkbox"]').change(function() { if ($J(this).parentsUntil('.facet').find('input[type="checkbox"]:checked').length > 0) { $J(this).parentsUntil('.facet').find('.limitcolumn_button').show(); } else { $J(this).parentsUntil('.facet').find('.limitcolumn_button').hide(); } if ($J('.limitcolumn_wrapper').find('.facet > form').has('input[type="checkbox"]:checked').length > 1) { // Animate overlay $J('#include-exclude-overlay').addClass('overlay-visible'); $J('#clear-all-filters').click(function() { $J('#include-exclude-overlay').removeClass('overlay-visible'); $J('.facet').find('input[type="checkbox"]:checked').each(function() { this.checked = false; }); }); } else { $J('#include-exclude-overlay').removeClass('overlay-visible'); } }); }); }function chkOwn(rID) {// Identify Library Profile based on ULR Value.var chk1 = document.URL;var chk2 = chk1.split("/");var LibName = chk2[5];var cellnm = rID.split('hitlist');var hitnm = cellnm[1];//var ercButtonChk = 'hitlist' + hitnm + 'ercDownloadButton';//console.log(ercButtonChk);// Identify Page beyond 1var pgchk = jQuery('#CurrentPagetop').text();var pgchkval = pgchk.valueOf();//alert(pgchkval);var chkhit = hitnm.valueOf();//cellnumr = parseInt(chkhit) + ((pgchkval -1) * 12);cellnumr = parseInt(chkhit);//alert(cellnumr);// Get Cat key from DOC IDvar docuid = (jQuery('#'+rID+'_DOC_ID .DOC_ID_value').text()).split(':') ;var catKey = docuid[1] ;//alert(chkhit);var cellchk = '#results_cell' + cellnumr;//alert(cellchk);jQuery.getJSON('https://sdws06.sirsidynix.net/lmac_ilsws/rest/standard/lookupTitleInfo?clientID=DS_CLIENT&titleID=' + catKey+'&includeItemInfo=true&json=true&callback=?',function(zz){callinf = zz.TitleInfo[0].CallInfo;var htmlOutput='';var cntem=0;jQuery.each(callinf,function(entryIndex,entry) {var libID;var library;libID = this.libraryID;console.log('LIBRARYID: ' + libID + ' LibName: ' + LibName + ' CellNum: ' + cellnm + ' hitnm: ' + hitnm);//alert(libID);//alert(hitnm);//alert(LibName);//The LibID is the ILS policy name for the Library.//LibName is the Enterprise profile name extracted from the browser window.//LibName: pisc-wes = https://lmac.ent.sirsi.net/client/en_US/pisc-wesif ((libID == "CARTERET") && (LibName == "carteret")) {jQuery(cellchk).css("background-color","#BCF5A9");}if ((libID == "CLARK") && (LibName == "clark")) {jQuery(cellchk).css("background-color","#BCF5A9");}if ((libID == "CRANBURY") && (LibName == "cranbury")) {jQuery(cellchk).css("background-color","#BCF5A9");}if ((libID == "CRANFORD") && (LibName == "cranford")) {jQuery(cellchk).css("background-color","#BCF5A9");}if ((libID == "DUNELLEN") && (LibName == "dunellen")) {jQuery(cellchk).css("background-color","#BCF5A9");}if ((libID == "ELIZMAIN") && (LibName == "elizabeth")) {jQuery(cellchk).css("background-color","#BCF5A9");}if ((libID == "ELIZLACORT") && (LibName == "elizabeth")) {jQuery(cellchk).css("background-color","#BCF5A9");}if ((libID == "ELIZPORT") && (LibName == "elizabeth")) {jQuery(cellchk).css("background-color","#BCF5A9");}if ((libID == "ELIZELMORA") && (LibName == "elizabeth")) {jQuery(cellchk).css("background-color","#BCF5A9");}if ((libID == "EPL-BKM") && (LibName == "edisonbkm")) {jQuery(cellchk).css("background-color","#BCF5A9");}if ((libID == "EPL-CLARA") && (LibName == "edisontownship")) {jQuery(cellchk).css("background-color","#BCF5A9");}if ((libID == "EPL-MAIN") && (LibName == "tabstest")) {jQuery(cellchk).css("background-color","#BCF5A9");}if ((libID == "EPL-MAIN") && (LibName == "edisontownship")) {jQuery(cellchk).css("background-color","#BCF5A9");}if ((libID == "EPL-NORTH") && (LibName == "edisontownship")) {jQuery(cellchk).css("background-color","#BCF5A9");}if ((libID == "EASTB") && (LibName == "eastbrunswick")) {jQuery(cellchk).css("background-color","#BCF5A9");}if ((libID == "FANWOOD") && (LibName == "fanwood")) {jQuery(cellchk).css("background-color","#BCF5A9");}if ((libID == "HPPL") && (LibName == "hppl")) {jQuery(cellchk).css("background-color","#BCF5A9");}if ((libID == "JAMESBURG") && (LibName == "jamesburg")) {jQuery(cellchk).css("background-color","#BCF5A9");}if ((libID == "KENILWORTH") && (LibName == "kenilworth")) {jQuery(cellchk).css("background-color","#BCF5A9");}if ((libID == "KEYPORT") && (LibName == "keyport")) {jQuery(cellchk).css("background-color","#BCF5A9");}if ((libID == "LBPL") && (LibName == "longbranch")) {jQuery(cellchk).css("background-color","#BCF5A9");}if ((libID == "LBPL-ELBRN") && (LibName == "longbranch")) {jQuery(cellchk).css("background-color","#BCF5A9");}if ((libID == "LMXAC") && (LibName == "lmxac")) {jQuery(cellchk).css("background-color","#BCF5A9");}if ((libID == "MAPL") && (LibName == "matawan")) {jQuery(cellchk).css("background-color","#BCF5A9");}if ((libID == "MCC") && (LibName == "mcc")) {jQuery(cellchk).css("background-color","#BCF5A9");}if ((libID == "MDSX") && (LibName == "middlesex")) {jQuery(cellchk).css("background-color","#BCF5A9");}if ((libID == "METUCHEN") && (LibName == "metuchen")) {jQuery(cellchk).css("background-color","#BCF5A9");}if ((libID == "MILLTOWN") && (LibName == "milltown")) {jQuery(cellchk).css("background-color","#BCF5A9");}if ((libID == "MONROE") && (LibName == "monroe")) {jQuery(cellchk).css("background-color","#BCF5A9");}if ((libID == "MONROE-BKM") && (LibName == "monroe")) {jQuery(cellchk).css("background-color","#BCF5A9");}if ((libID == "NEWBRUNS") && (LibName == "newbrunswick")) {jQuery(cellchk).css("background-color","#BCF5A9");}if ((libID == "NOBR") && (LibName == "northbrunswick")) {jQuery(cellchk).css("background-color","#BCF5A9");}if ((libID == "OB-CENTRAL") && (LibName == "oldcentral")) {jQuery(cellchk).css("background-color","#BCF5A9");}if ((libID == "OB-LH") && (LibName == "oldcentral")) {jQuery(cellchk).css("background-color","#BCF5A9");}if ((libID == "PERTH") && (LibName == "perth")) {jQuery(cellchk).css("background-color","#BCF5A9");}if ((libID == "PISC-KEN") && (LibName == "piscataway")) {jQuery(cellchk).css("background-color","#BCF5A9");}if ((libID == "PISC-WES") && (LibName == "piscataway")) {jQuery(cellchk).css("background-color","#BCF5A9");}if ((libID == "PISC-WES") && (LibName == "pisc-wes")) {jQuery(cellchk).css("background-color","#BCF5A9");}if ((libID == "PLAINFIELD") && (LibName == "plainfield")) {jQuery(cellchk).css("background-color","#BCF5A9");}if ((libID == "PLAINFIELD") && (LibName == "plainfield_OPAC")) {jQuery(cellchk).css("background-color","#BCF5A9");}if ((libID == "PLAINFIELD") && (LibName == "plainfield_OPAC_ADV")) {jQuery(cellchk).css("background-color","#BCF5A9");}if ((libID == "PLAINSBORO") && (LibName == "plainsboro")) {jQuery(cellchk).css("background-color","#BCF5A9");}if ((libID == "RBANK") && (LibName == "redbank")) {jQuery(cellchk).css("background-color","#BCF5A9");}if ((libID == "ROSELLE") && (LibName == "roselle")) {jQuery(cellchk).css("background-color","#BCF5A9");}if ((libID == "ROSPARK") && (LibName == "rospark")) {jQuery(cellchk).css("background-color","#BCF5A9");}if ((libID == "EASTB") && (LibName == "sandbox")) {jQuery(cellchk).css("background-color","#BCF5A9");}if ((libID == "SAMB") && (LibName == "southamboy")) {jQuery(cellchk).css("background-color","#BCF5A9");}if ((libID == "SAYREVILLE") && (LibName == "sayreville")) {jQuery(cellchk).css("background-color","#BCF5A9");}if ((libID == "SBPL-BKM") && (LibName == "southbrunswick")) {jQuery(cellchk).css("background-color","#BCF5A9");}if ((libID == "SBPL-MAIN") && (LibName == "southbrunswick")) {jQuery(cellchk).css("background-color","#BCF5A9");}if ((libID == "SCOTCHPL") && (LibName == "scotchplains")) {jQuery(cellchk).css("background-color","#BCF5A9");}if ((libID == "SPOTSWOOD") && (LibName == "spotswood")) {jQuery(cellchk).css("background-color","#BCF5A9");}if ((libID == "SOPPL") && (LibName == "southplainfield")) {jQuery(cellchk).css("background-color","#BCF5A9");}if ((libID == "SRIVER") && (LibName == "southriver")) {jQuery(cellchk).css("background-color","#BCF5A9");}if ((libID == "SPRING") && (LibName == "springfield")) {jQuery(cellchk).css("background-color","#BCF5A9");}if ((libID == "WESTFIELD") && (LibName == "westfield")) {jQuery(cellchk).css("background-color","#BCF5A9");}});}); //var chkcover = jQuery('.displayElementText highlightMe ELECTRONIC_ACCESS').text();//console.log(chkcover);}// Important: Modifications to this file may be overwritten during an upgrade.// If you want to customize this widget and have those modifications persist through upgrades,// make a copy of this widget and make modifications to the copied widget.// You can then assign the copied widget to the detail or search result displays you want.var novelistUrl = "https://imageserver.ebscohost.com/novelistselect/ns2init.js";//The location of the NoveList jsvar novelistProfile = "ebplinf.main.novselent"; //This is your profile as provided by Novelistvar novelistPassword = "dGJyMOPY8Uyzrq4A"; //This is your password as provided by Novelistvar currentNovSelectAttempt = 1;function goNovelist(detail){ var detailIndex=""; if(detail!=undefined) { detailIndex = "detail"+detail; } else { detail=""; } if (typeof(novSelect) == 'undefined') { novelistScript = new Element('script', { type: 'text/javascript', id: 'EIT', src: ''+novelistUrl+''}); $J('body').append(novelistScript); } var detailElement = document.getElementById(detailIndex + '_ISBN'); if(detailElement && detailElement.hasChildNodes()) { var accordionHeader = $J('Novelist Content
'); var accordionContent = $J(''); addToAccordion('#detail_accordion'+detail, accordionHeader, accordionContent); NoveListSelectEnrichment(detailElement.childNodes[0].innerHTML); }}function NoveListSelectEnrichment(isbn) { if (typeof(novSelect) == 'undefined') { currentNovSelectAttempt++; if(currentNovSelectAttempt<= 10) { setTimeout("NoveListSelectEnrichment("+isbn+")", 250); } } else { novSelect.loadContentForISBN(String(isbn), novelistProfile, novelistPassword); }}30 Results Found
Select All
123
000000000000LONGBRANCH_PUBLIC
Select a list
The following items were successfully added.
There was an error while adding the following items. Please try again.
One or more items could not be added because you are not logged in.
1.
A Caribbean Heiress in Paris
by
Adriana Herrera
Format: Electronic Resources Cover Image URL https://cover.hoopladigital.com/hpc_9781488214349_270.jpeg
Electronic Resources
HOOPLA:14698943
A Caribbean Heiress in Paris
2.
A Caribbean Heiress in Paris
by
Adriana Herrera
Format: Electronic Resources Cover Image URL https://cover.hoopladigital.com/hqn_9780369706294_270.jpeg
Electronic Resources
HOOPLA:15274031
A Caribbean Heiress in Paris
View Other Search Results
3.
A Caribbean Heiress in Paris
by
Herrera, Adriana,
Publication 2022 Language English Format: Books Page Number 336 PAGES ; ISBN 9781335427519
SD_ILS:2583291
9781335427519
Old Bridge Public Library-Central~1
Cranford Public Library~1
New Brunswick Public Library~1
Plainfield Public Library~1
Westfield Memorial Library~1
Plainsboro Public Library~1
Scotch Plains Public Library~1
TEST!!!
4.
A Caribbean heiress in Paris
by
Herrera, Adriana (Romance author),
Publication 2022 Language English Format: Books Page Number 362 PAGES ; ISBN 9781335639844
SD_ILS:2579034
9781335639844
Spotswood Public Library~1
Monroe Township Library~1
Cranford Public Library~1
South River Public Library~1
Matawan Aberdeen Public Library~1
Highland Park Public Library~1
Elizabeth Main Library~1
TEST!!!
5.
A Caribbean heiress in Paris
by
Herrera, Adriana (Romance author),
Publication 2023 Language English Format: Other Page Number 1 AUDIO MEDIA PLAYER (10 HR., 30 MIN.) : ISBN 9798822669123
SD_ILS:2703287
9798822669123
Old Bridge Public Library-Central~1
TEST!!!
6.
A Caribbean heiress in Paris
by
Herrera, Adriana (Romance author),
Publication 2022 Language English Format: Books Edition Large print edition. Page Number 539 PAGES (LARGE PRINT) ; ISBN 9798885783798
SD_ILS:2683772
9798885783798
Old Bridge Public Library-Central~1
Plainfield Public Library~1
North Brunswick Public Library~1
TEST!!!
7.
Escapade [electronic resource]
by
Palmer, Diana,
Freading Click here Publication 2018 Language English Format: Electronic Resources Page Number 1 ONLINE RESOURCE (384 PAGES) ISBN 9781488096372
SD_ILS:2690153
9781488096372
~0
TEST!!!
8.
First Title value, for Searching
The Unspeakable Perk
First Author value, for Searching
Adams, Samuel Hopkins
Format eBook Electronic Format PLAIN TEXT Excerpt: Caribbean Area -- Fiction
eBook
GUTENBERG:etext5009
The Unspeakable Perk
9.
Alliance with His Stolen Heiress
by
San Andres, Lydia
Format: Electronic Resources Cover Image URL https://cover.hoopladigital.com/hqn_9780369730268_270.jpeg
Electronic Resources
HOOPLA:15272947
Alliance with His Stolen Heiress
10.
Free to Be Me
by
Nicholls, Peter
Format: Electronic Resources Cover Image URL https://cover.hoopladigital.com/csp_9780645795561_270.jpeg
Electronic Resources
HOOPLA:16199748
Free to Be Me
Why a Life Ethic is Replacing the Work Ethic
11.
by
Jackson, Brenda
Format: eBook Electronic Format: HTML, ADOBE EPUB, KINDLE Cover Image URL https://img1.od-cdn.com/ImageType-200/1071-1/{6F8CA4DB-BFED-4EA0-AEF9-7F71FD499AF3}Img200.jpg https://img1.od-cdn.com/ImageType-100/1071-1/{6F8CA4DB-BFED-4EA0-AEF9-7F71FD499AF3}Img100.jpg
eBook
OVERDRIVE:6f8ca4db-bfed-4ea0-aef9-7f71fd499af3
Stranded with the Tempting Stranger & The Executive's Surprise Baby
12.
Escapade
by
Palmer, Diana
Format: eBook Electronic Format: HTML, ADOBE EPUB, KINDLE Cover Image URL https://img1.od-cdn.com/ImageType-100/2363-1/{2B5FB962-7F68-48DC-8574-096DA2A7544C}IMG100.JPG https://img1.od-cdn.com/ImageType-200/2363-1/{2B5FB962-7F68-48DC-8574-096DA2A7544C}IMG200.JPG
eBook
OVERDRIVE:2b5fb962-7f68-48dc-8574-096da2a7544c
Escapade
Select All
123
30 Results Found