Search Results for INITIAL_AUTHOR_SRCH="Singer, Bryan, 1965-" (2024)

'; setTimeout(function(){ if (hideFacets) { jQuery("#limitcolumn_title").hide(); jQuery("#limitcolumn_availability").hide(); setTimeout(function() { jQuery(".facet").hide(); }, 150); jQuery(".navigatorCheckBox").hide(); jQuery(".limitcolumn_button").hide(); } jQuery(".navigatorName a").each(function() { curHref = jQuery(this).attr('href'); curHref = curHref.replace(".limitcolumn.navigatorclick?", "?FRBR=1&"); jQuery(this).attr('href', curHref); }); //jQuery(".navigatorName a").contents().unwrap(); if (hideFacets) { jQuery("#facetFormFORMAT").parent().show(); jQuery("#facetFormFRBR_FORMAT").parent().show(); jQuery("#facetFormERC_FORMAT").parent().show(); } jQuery("#limitcolumn_title").before(linkTabHTML); }, 300); jQuery(document).ready(function() { setTimeout(function() { jQuery('#sortSelect option[value!=""][value]').each(function() { var sortCode = jQuery(this).attr('value'); jQuery(this).removeAttr('onchange'); //jQuery(this).attr('onclick', 'window.location="'+window.location.href+'&st='+sortCode+'"'); jQuery(this).click(function() { window.location = window.location.href + '&st=' + sortCode; }); }); jQuery(".nonmobile .pagination .resultsToolbar_paginationNumbers a, .nonmobile .pagination .navigationImage a").each(function() { var curHref = jQuery(this).attr('href'); var pageLink = curHref.match(/handlepagingviasearchsession\/[0-9]*/); pageLink = pageLink[0].replace("handlepagingviasearchsession/", ""); pageHit = pageLink * 12; curHref = curHref.replace(/search\/results.*\?/, "search/results?FRBR=1&"); if (curHref.search("rw=") > 0) { curHref = curHref.replace(/rw=[0-9]*/, "rw=" + pageHit); } else { curHref += "&rw=" + pageHit; } jQuery(this).attr('href', curHref); }); if (jQuery('.mobile').length > 0) { jQuery(".mobile .paginationSingles .pageLink").each(function() { var curHref = jQuery(this).attr('href'); var pageLink = curHref.match(/handlepagingviasearchsession\/[0-9]*/); pageLink = pageLink[0].replace("handlepagingviasearchsession/", ""); pageHit = (pageLink - 1) * 12; curHref = curHref.replace(/search\/results.*\?/, "search/results?FRBR=1&"); if (curHref.search("rw=") > 0) { curHref = curHref.replace(/rw=[0-9]*/, "rw=" + pageHit); } else { curHref += "&rw=" + pageHit; } jQuery(this).attr('href', curHref); }); jQuery(".mobile #paginationForm #paginationInput").keyup(function() { var pageOnclick = '' + jQuery(".mobile #paginationForm #paginationButton").attr('onclick'); var pageHit = jQuery('.mobile #paginationForm #paginationInput').val(); if (pageHit == 0) { pageHit = 1; } pageHit = (pageHit - 1) * 12; pageOnclick = pageOnclick.replace(/[&]rw=[0-9]*/g, ""); pageOnclick = pageOnclick.replace(/[&]t:ac=[0-9]*/g, ""); pageOnclick = pageOnclick.replace(/search\/results.*\?/, "search/results?FRBR=1&rw=" + pageHit + "&"); jQuery(".mobile #paginationForm #paginationButton").attr('onclick', pageOnclick); }); } }, 300); }); jQuery('#q').attr('value', ""); //setTimeout("jQuery('#sortSelect').hide()",500); if (frbrGetSearchParam('DISP') != "") { var dispDocId = unescape(frbrGetSearchParam('DISP')); var linkToClick = "a[onclick*='" + dispDocId + "'][id*=detailLink]"; if (linkToClick == "") { //nonmodal display linkToClick = "a[href*='" + dispDocId + "'][id*=detailLink]"; } //console.log("click link "+ linkToClick); setTimeout(function() { $J(linkToClick).click() }, 500); // $(document).ready(function(){jQuery(linkToClick).click()}); } } } jQuery(document).ready(function() { if (!jQuery("div.resultsToolbar_num_results .frbrNote").length) { jQuery("div.resultsToolbar_num_results").append('

(Some may be grouped)

'); } });} //end of section to only execute if Bento is not in play//*******************************************************************************************************************//function setupFormats() { var frbrFormats = { "Books": { "id": "frbr-book", "title": "Book", "code": "BOOK", "facetCode": " ", "ils": true, "erc": true }, "Audio disc": { "id": "frbr-audio-disc", "title": "Audio disc", "code": "SOUNDDISC", "facetCode": " ", "ils": true, "erc": true }, "Continuing Resources": { "id": "frbr-continuing-resources", "title": "Continuing Resources", "code": "CR", "facetCode": " ", "ils": true, "erc": true }, "Video cassette": { "id": "frbr-video-cassette", "title": "Video cassette", "code": "VIDEOCASS", "facetCode": " ", "ils": true, "erc": true }, "Microform": { "id": "frbr-microform", "title": "Microform", "code": "MICROFORM", "facetCode": " ", "ils": true, "erc": true }, "Audio cassette": { "id": "frbr-audio-cassette", "title": "Audio cassette", "code": "SOUNDCASS", "facetCode": " ", "ils": true, "erc": true }, "Video disc": { "id": "frbr-video-disc", "title": "Video disc", "code": "VIDEODISC", "facetCode": " ", "ils": true, "erc": true }, "Maps": { "id": "frbr-maps", "title": "Maps", "code": "MAP", "facetCode": " ", "ils": true, "erc": true }, "Visual Materials": { "id": "frbr-visual-materials", "title": "Visual Materials", "code": "VISUAL", "facetCode": " ", "ils": true, "erc": true }, "Computer file": { "id": "frbr-computer-file", "title": "Computer file", "code": "COMPFILE", "facetCode": " ", "ils": true, "erc": true }, "Sound recording": { "id": "frbr-sound-recording", "title": "Sound recording", "code": "SOUNDREC", "facetCode": " ", "ils": true, "erc": true }, "Music Sound Recording": { "id": "frbr-music-sound-recording", "title": "Music Sound Recording", "code": "MUSICSNDREC", "facetCode": " ", "ils": true, "erc": true }, "Music": { "id": "frbr-music", "title": "Music", "code": "NOTATEDMUSIC", "facetCode": " ", "ils": true, "erc": true }, "Manuscript": { "id": "frbr-manuscript", "title": "Manuscript", "code": "MS", "facetCode": " ", "ils": true, "erc": true }, "Regular print": { "id": "frbr-regular-print", "title": "Regular print", "code": "REGPRINT", "facetCode": " ", "ils": true, "erc": true }, "Atlas": { "id": "frbr-atlas", "title": "Atlas", "code": "ATLAS", "facetCode": " ", "ils": true, "erc": true }, "Filmstrip": { "id": "frbr-filmstrip", "title": "Filmstrip", "code": "FILMSTRIP", "facetCode": " ", "ils": true, "erc": true }, "Section": { "id": "frbr-section", "title": "Section", "code": "SECTION", "facetCode": " ", "ils": true, "erc": true }, "Motion picture": { "id": "frbr-motion-picture", "title": "Motion picture", "code": "MOTIONPICT", "facetCode": " ", "ils": true, "erc": true }, "Kit": { "id": "frbr-kit", "title": "Kit", "code": "KIT", "facetCode": " ", "ils": true, "erc": true }, "Mixed materials": { "id": "frbr-mixed-materials", "title": "Mixed materials", "code": "MIXED", "facetCode": " ", "ils": true, "erc": true }, "Remote sensing image": { "id": "frbr-remote-sensing-image", "title": "Remote sensing image", "code": "REMOTESEN", "facetCode": " ", "ils": true, "erc": true }, "Picture": { "id": "frbr-picture", "title": "Picture", "code": "PICTURE", "facetCode": " ", "ils": true, "erc": true }, "3-D Object": { "id": "frbr-3d-object", "title": "3-D Object", "code": "OBJECT", "facetCode": " ", "ils": true, "erc": true }, "Video Cartridge": { "id": "frbr-video-cartridge", "title": "Video cartridge", "code": "VIDEOCART", "facetCode": " ", "ils": true, "erc": true }, "Large Print": { "id": "frbr-large-print", "title": "Large print", "code": "LARGEPRINT", "facetCode": " ", "ils": true, "erc": true }, "Non projected graphic": { "id": "frbr-non-projected-graphic", "title": "Non projected graphic", "code": "NONPROJGRAPH", "facetCode": " ", "ils": true, "erc": true }, "Video recording": { "id": "frbr-video-recording", "title": "Video recording", "code": "VIDEOREC", "facetCode": " ", "ils": true, "erc": true }, "Chart": { "id": "frbr-chart", "title": "Chart", "code": "CHART", "facetCode": " ", "ils": true, "erc": true }, "Diagram": { "id": "frbr-diagram", "title": "Diagram", "code": "DIAGRAM", "facetCode": " ", "ils": true, "erc": true }, "Slide": { "id": "frbr-slide", "title": "Slide", "code": "SLIDE", "facetCode": " ", "ils": true, "erc": true }, "Print": { "id": "frbr-print", "title": "Print", "code": "PRINT", "facetCode": " ", "ils": true, "erc": true }, "Tactile": { "id": "frbr-tactile", "title": "Tactile", "code": "TACTILE", "facetCode": " ", "ils": true, "erc": true }, "Drawing": { "id": "frbr-drawing", "title": "Drawing", "code": "DRAWING", "facetCode": " ", "ils": true, "erc": true }, "Flashcard": { "id": "frbr-flash-card", "title": "Flashcard", "code": "FLASHCARD", "facetCode": " ", "ils": true, "erc": true }, "Globe": { "id": "frbr-globe", "title": "Globe", "code": "GLOBE", "facetCode": " ", "ils": true, "erc": true }, "View": { "id": "frbr-view", "title": "View", "code": "VIEW", "facetCode": " ", "ils": true, "erc": true }, "Photo": { "id": "frbr-photo", "title": "Photo", "code": "PHOTO", "facetCode": " ", "ils": true, "erc": true }, "Projected graphic": { "id": "frbr-projected-graphic", "title": "Projected graphic", "code": "UNKNOWN", "facetCode": " ", "ils": true, "erc": true }, "Technical drawing": { "id": "frbr-technical-drawing", "title": "Technical drawing", "code": "TECHDRAWING", "facetCode": " ", "ils": true, "erc": true }, "eBook": { "id": "frbr-ebook", "title": "eBook", "code": "E_BOOK", "facetCode": " ", "ils": false, "erc": true }, "Online Resource": { "id": "frbr-online-resource", "title": "Online Resource", "code": "ER", "facetCode": " ", "ils": true, "erc": true }, "eAudiobook": { "id": "frbr-eaudiobook", "title": "eAudiobook", "code": "E_SOUNDREC", "facetCode": " ", "ils": false, "erc": true }, "eVideo": { "id": "frbr-evideo", "title": "eVideo", "code": "E_VIDEO", "facetCode": " ", "ils": false, "erc": true }, "Cassette": { "id": "frbr-cassette", "title": "Audio cassette", "code": "SOUNDCASS", "facetCode": " ", "ils": true, "erc": true }, "Other": { "id": "frbr-other", "title": "Other", "code": "UNKNOWN", "facetCode": " ", "ils": true, "erc": true },/*** BEGIN CUSTOM ***/ "Large print": { "id": "frbr-large-print", "title": "Large print", "code": "LARGEPRINT", "facetCode": " ", "ils": true, "erc": true },/*** END CUSTOM ***/ "Libros": { "id": "frbr-book", "title": "Libros", "code": "BOOK", "facetCode": " ", "ils": true, "erc": true }, "Disco de audio": { "id": "frbr-audio-disc", "title": "Disco de audio", "code": "SOUNDDISC", "facetCode": " ", "ils": true, "erc": true }, "Recursos permanentes": { "id": "frbr-continuing-resources", "title": "Recursos permanentes", "code": "CR", "facetCode": " ", "ils": true, "erc": true }, "Videocasete": { "id": "frbr-video-cassette", "title": "Videocasete", "code": "VIDEOCASS", "facetCode": " ", "ils": true, "erc": true }, "Microforma": { "id": "frbr-microform", "title": "Microforma", "code": "MICROFORM", "facetCode": " ", "ils": true, "erc": true }, "Casete de audio": { "id": "frbr-audio-cassette", "title": "Casete de audio", "code": "SOUNDCASS", "facetCode": " ", "ils": true, "erc": true }, "Disco de video": { "id": "frbr-video-disc", "title": "Disco de video", "code": "VIDEODISC", "facetCode": " ", "ils": true, "erc": true }, "Mapas": { "id": "frbr-maps", "title": "Mapas", "code": "MAP", "facetCode": " ", "ils": true, "erc": true }, "Material visual": { "id": "frbr-visual-materials", "title": "Material visual", "code": "VISUAL", "facetCode": " ", "ils": true, "erc": true }, "Fichero informático": { "id": "frbr-computer-file", "title": "Archivo informático", "code": "COMPFILE", "facetCode": " ", "ils": true, "erc": true }, "Grabación sonora": { "id": "frbr-sound-recording", "title": "Grabación sonora", "code": "SOUNDREC", "facetCode": " ", "ils": true, "erc": true }, "Grabación sonora musical": { "id": "frbr-music-sound-recording", "title": "Grabación sonora musical", "code": "MUSICSNDREC", "facetCode": " ", "ils": true, "erc": true }, "Música": { "id": "frbr-music", "title": "Música", "code": "NOTATEDMUSIC", "facetCode": " ", "ils": true, "erc": true }, "Manuscrito": { "id": "frbr-manuscript", "title": "Manuscrito", "code": "MS", "facetCode": " ", "ils": true, "erc": true }, "Letra normal": { "id": "frbr-regular-print", "title": "Letra normal", "code": "UNKNOWN", "facetCode": " ", "ils": true, "erc": true }, "Atlas": { "id": "frbr-atlas", "title": "Atlas", "code": "ATLAS", "facetCode": " ", "ils": true, "erc": true }, "Tira de película": { "id": "frbr-filmstrip", "title": "Tira de película", "code": "FILMSTRIP", "facetCode": " ", "ils": true, "erc": true }, "Sección": { "id": "frbr-section", "title": "Sección", "code": "SECTION", "facetCode": " ", "ils": true, "erc": true }, "Película": { "id": "frbr-motion-picture", "title": "Película", "code": "MOTIONPICT", "facetCode": " ", "ils": true, "erc": true }, "Equipo": { "id": "frbr-kit", "title": "Equipo", "code": "KIT", "facetCode": " ", "ils": true, "erc": true }, "Materiales mixtos": { "id": "frbr-mixed-materials", "title": "Materiales mixtos", "code": "MIXED", "facetCode": " ", "ils": true, "erc": true }, "Imagen obtenida por teledetección": { "id": "frbr-remote-sensing-image", "title": "Imagen de teledetección", "code": "REMOTESEN", "facetCode": " ", "ils": true, "erc": true }, "Dibujo": { "id": "frbr-picture", "title": "Dibujo", "code": "PICTURE", "facetCode": " ", "ils": true, "erc": true }, "Objecto 3-D": { "id": "frbr-3d-object", "title": "Objecto 3-D", "code": "OBJECT", "facetCode": " ", "ils": true, "erc": true }, "Cartridge de video": { "id": "frbr-video-cartridge", "title": "Cartridge de video", "code": "VIDEOCART", "facetCode": " ", "ils": true, "erc": true }, "Letra grande": { "id": "frbr-large-print", "title": "Letra grande", "code": "LARGEPRINT", "facetCode": " ", "ils": true, "erc": true }, "Gráfico no proyectado": { "id": "frbr-non-projected-graphic", "title": "Gráfico no proyectado", "code": "NONPROJGRAPH", "facetCode": " ", "ils": true, "erc": true }, "Grabación de vídeo ": { "id": "frbr-video-recording", "title": "Video recording", "code": "VIDEOREC", "facetCode": " ", "ils": true, "erc": true }, "Gráfico": { "id": "frbr-chart", "title": "Gráfico", "code": "CHART", "facetCode": " ", "ils": true, "erc": true }, "Diagrama": { "id": "frbr-diagram", "title": "Diagrama", "code": "DIAGRAM", "facetCode": " ", "ils": true, "erc": true }, "Diapositiva": { "id": "frbr-slide", "title": "Diapositiva", "code": "SLIDE", "facetCode": " ", "ils": true, "erc": true }, "Impreso": { "id": "frbr-print", "title": "Impreso", "code": "PRINT", "facetCode": " ", "ils": true, "erc": true }, "Táctil": { "id": "frbr-tactile", "title": "Táctil", "code": "TACTILE", "facetCode": " ", "ils": true, "erc": true }, "Dibujo": { "id": "frbr-drawing", "title": "Dibujo", "code": "DRAWING", "facetCode": " ", "ils": true, "erc": true }, "Tarjetas didácticas": { "id": "frbr-flash-card", "title": "Tarjeta de memoria flash", "code": "FLASHCARD", "facetCode": " ", "ils": true, "erc": true }, "Globo terráqueo": { "id": "frbr-globe", "title": "Globo terráqueo", "code": "GLOBE", "facetCode": " ", "ils": true, "erc": true }, "Ver": { "id": "frbr-view", "title": "Ver", "code": "VIEW", "facetCode": " ", "ils": true, "erc": true }, "Fotografía": { "id": "frbr-photo", "title": "Photo", "code": "PHOTO", "facetCode": " ", "ils": true, "erc": true }, "Gráfico proyectado": { "id": "frbr-projected-graphic", "title": "Projected graphic", "code": "UNKNOWN", "facetCode": " ", "ils": true, "erc": true }, "Dibujo técnico": { "id": "frbr-technical-drawing", "title": "Dibujo técnico", "code": "TECHDRAWING", "facetCode": " ", "ils": true, "erc": true }, "Libro electrónico": { "id": "frbr-ebook", "title": "Libro electrónico", "code": "E_BOOK", "facetCode": " ", "ils": false, "erc": true }, "Recurso en línea": { "id": "frbr-online-resource", "title": "Recurso en línea", "code": "ER", "facetCode": " ", "ils": true, "erc": true }, "eAudiolibro": { "id": "frbr-eaudiobook", "title": "eAudiolibro", "code": "E_SOUNDREC", "facetCode": " ", "ils": false, "erc": true }, "eVideo": { "id": "frbr-evideo", "title": "eVideo", "code": "E_VIDEO", "facetCode": " ", "ils": false, "erc": true }, "Casete": { "id": "frbr-cassette", "title": "Casete", "code": "SOUNDCASS", "facetCode": " ", "ils": true, "erc": true }, "Otro": { "id": "frbr-other", "title": "Otro", "code": "UNKNOWN", "facetCode": " ", "ils": true, "erc": true } } //console.log('frbrFormatBOOK:'+frbrFormats['Books']['code']); //console.log('frbrFormatE_BOOK:'+frbrFormats['eBook']['code']); //console.log('frbrFormatBOOK:'+frbrFormats['BOOK']['code']); return frbrFormats;}//*******************************************************************************************************************//function removeGmd(titleData) { //console.log("tD:"+titleData); titleData = titleData.replace(/ *\[sound recording *(\([A-Za-z0-9_-]*\))* *\]/i, ""); titleData = titleData.replace(/ *\[videorecording *(\([A-Za-z0-9_-]*\))* *\]/i, ""); titleData = titleData.replace(/ *\[text .large print.\]/i, ""); titleData = titleData.replace(/ *\[microform\]/i, ""); titleData = titleData.replace(/ *\[computer file\]/i, ""); titleData = titleData.replace(/ *\[electronic resource\]/i, ""); titleData = titleData.replace(/ *\[filmstrip\]/i, ""); titleData = titleData.replace(/ *\[braille\]/i, ""); titleData = titleData.replace(/ *\[kit\]/i, ""); titleData = titleData.replace(/ *\[motion picture\]/i, ""); titleData = titleData.replace(/ *\[slide\]/i, ""); titleData = titleData.replace(/ *\[transparency\]/i, ""); titleData = titleData.replace(/ *\[realia\]/i, "");/*** BEGIN CUSTOM ***/ titleData = titleData.replace(/ *\[large print\]/i, "");/*** END CUSTOM ***/ titleData = titleData.replace(/ *\[grabación sonora *(\([A-Za-z0-9_-]*\))* *\]/i, ""); titleData = titleData.replace(/ *\[grabación de video *(\([A-Za-z0-9_-]*\))* *\]/i, ""); titleData = titleData.replace(/ *\[texto .en tipografía mayor.\]/i, ""); titleData = titleData.replace(/ *\[microforma\]/i, ""); titleData = titleData.replace(/ *\[archivo computacional\]/i, ""); titleData = titleData.replace(/ *\[recurso electrónico\]/i, ""); titleData = titleData.replace(/ *\[tira de película\]/i, ""); //titleData = titleData.replace(/ *\[braille\]/i, ""); titleData = titleData.replace(/ *\[conjunto\]/i, ""); titleData = titleData.replace(/ *\[película\]/i, ""); titleData = titleData.replace(/ *\[diapositiva\]/i, ""); titleData = titleData.replace(/ *\[transparencia\]/i, ""); //titleData = titleData.replace(/ *\[realia\]/i, ""); //console.log("nT:"+titleData); return titleData;}//*******************************************************************************************************************//function removeSubtitle(titleData) { if (ignoreAllSubtitles == true) { titleData = titleData.replace(/ [:=] .*$/, ""); } else { titleData = titleData.replace(/: a novel *.*/i,""); titleData = titleData.replace(/: a memoir *.*/i,""); } return titleData}//*******************************************************************************************************************//// On Each Hit Loadedfunction frbrSearch(rId) { frbrFormats = setupFormats();if (verboseMode == true) { frbrishAnalysis = {}; frbrishAnalysis.resultId = rId;} if (currentSearch.indexOf("FRBR=1") == -1) { var myProfile = com_sirsi_ent_page.friendlyUrl; //'frbr'; var myLocale = com_sirsi_ent_page.localeCode; if (jQuery('.frbrNote').length == 0) { // jQuery("div.resultsToolbar_num_results").append('

(Some may be grouped)

'); } var hitSelector = '#' + rId.replace(/hitlist/, "results_bio"); //console.log('hitSelector: '+hitSelector); $J('.hitNumber').hide(); isErcHit = 0; var hitDocId = $J('#' + rId + '_DOC_ID').text(); if (hitDocId == "") { isErcHit = 1; hitDocId = $J('#' + rId + '_ERC_ID').text(); hitFullId = $J(hitSelector + ' .displayDetailLink > a').attr('onclick'); //console.log('hitFullId: ' +hitFullId); if (hitFullId == null) { hitFullId = $J(hitSelector + ' .displayDetailLink > a').attr('href'); hitFullId = hitFullId.replace(/^.*detailnonmodal./, ""); hitFullId = hitFullId.replace(/\/.*$/, ""); hitFullId = hitFullId.replace(/\$002f/g, "/"); } else { hitFullId = hitFullId.toString(); hitFullId = hitFullId.match(/ent:.*\?/); hitFullId = String(hitFullId); hitFullId = hitFullId.replace(/\/.*$/, ""); // hitFullId = hitFullId.replace("\/[0-9]+\/[0-9]+\/[0-9]+\\?", ""); hitFullId = hitFullId.replace(/\$002f/g, "/"); } //console.log('hitFullId ' + hitFullId); hitDocId = hitFullId; } var isIlsh*t = 0; if (hitDocId.indexOf("SD_ILS") > -1) { isIlsh*t = 1; } //console.log('Checking Hit ' + rId + ' Doc ID ' +hitDocId);if (verboseMode == true) { frbrishAnalysis.hitDocId = hitDocId; frbrishAnalysis.skipIdList = skipIdList; frbrishAnalysis.skipIdTest = skipIdList[hitDocId];} if (skipIdList[hitDocId]) { $J(hitSelector).parent().parent().hide(); //console.log(' Hit found in save list so not displayed');if (verboseMode == true) { frbrishAnalysis.isSkip = true; console.log(frbrishAnalysis);} } else { //console.log(' Hit not found in save list now searching for multiple titles');if (verboseMode == true) { frbrishAnalysis.isSkip = false;} if (hideSkipFromSubsequentClusters == true) { skipIdList[hitDocId] = true; } var baseRssURL = "/client/rss/hitlist/" + myProfile + "/"; var baseSearchURL = "/client/" + myLocale + "/" + myProfile + "/search/results?"; var curTitle = $J('#' + rId + '_FRBR_AUTHORIZED_TITLE').text(); var curMainTitle = $J('#' + rId + '_FRBR_TITLE').text(); if ((curTitle.match(/^Selections$/) != null) || (curTitle.match(/^Selections\./) != null) || (curTitle.indexOf(". Selections") > -1)) { curTitle = ""; } // if the authorized title does not contain Vol., Volume, or Part, but the main title does, then do not use the authorized title for searching else if ((curTitle.match(/\. Vol\. [0-9]/) == null) && (curTitle.match(/\. Volume [0-9]/) == null) && (curTitle.match(/\. Part [0-9]/) == null)) { if ((curMainTitle.match(/\. Vol\. [0-9]/) != null) || (curMainTitle.match(/\. Volume [0-9]/) != null) || (curMainTitle.match(/\. Part [0-9]/) != null)) { curTitle = ""; } } var curAuthor = $J('#' + rId + '_FRBR_AUTHOR').text(); var authorizedTitle = 1; if (curTitle == "") { // will have issues if no author & uniform title is made up of common words curTitle = $J('#' + rId + '_FRBR_TITLE').text(); if (curTitle == "") { // will have issues if no author & uniform title is made up of common words curTitle = $J('#' + rId + '_' + ercTitleCode).text(); curMainTitle = $J('#' + rId + '_' + ercTitleCode).text(); } authorizedTitle = 0; } if (curAuthor == "" && isIlsh*t == 0) { curAuthor = $J('#' + rId + '_' + ercAuthorCode).text(); } //console.log(rId + " Author:|" + curAuthor + "|"); //console.log(rId + " Title:|" +curTitle + "|"); // require both Title and Author to attempt collapse; allow Title only if it is a Uniform Title curTitle = curTitle.replace(/ : *$/,''); if (((curTitle != "") && (curAuthor != "")) || ((authorizedTitle == 1) && (curTitle != ""))) { //curTitle.replace(/;/g,""); curTitle = removeGmd(curTitle); curTitle = curTitle.replace(/[.:;=\/]$/, ""); curMainTitle = curTitle.replace(/[.:;=\/]$/, "");if (verboseMode == true) { if (curAuthor != "") { frbrishAnalysis.curAuthor = curAuthor; } else { frbrishAnalysis.curAuthor = ""; } frbrishAnalysis.curTitle = curTitle; frbrishAnalysis.curMainTitle = curMainTitle;} var frbrSearchString = 'qu=TITLE:\"' + curTitle.replace(/ /g, '+') + '\"'; var rssSearchString = 'qu=TITLE:\"' + curTitle.replace(/ /g, '+').replace(/[?&;¿¡]/g, '') + '\"'; if (curAuthor != "") { frbrSearchString += '&qu=AUTHOR:\"' + curAuthor.replace(/ /g, '+') + '\"'; rssSearchString += '&qu=AUTHOR:\"' + curAuthor.replace(/ /g, '+').replace(/[?&;¿¡]/g, '') + '\"'; } // console.log('frbr search string ' + frbrSearchString); // console.log('rss search string ' + rssSearchString); var frbrRssSearchURL = baseRssURL + rssSearchString; var frbrHitSearchURL = baseSearchURL + frbrSearchString + '&FRBR=1'; if (searchFacets !== '') { frbrRssSearchURL += '&qf=' + searchFacets; frbrHitSearchURL += '&qf=' + searchFacets; } if (searchLimit !== '') { frbrRssSearchURL += '&lm=' + searchLimit; frbrHitSearchURL += '&lm=' + searchLimit; } if (searchTarget !== '') { frbrRssSearchURL += '&te=' + searchTarget; frbrHitSearchURL += '&te=' + searchTarget; } frbrRssSearchURL += '&ln=' + myLocale; //console.log('rss search string ' + frbrRssSearchURL);if (!unclusterIdList.hasOwnProperty(frbrSearchString.toLowerCase())) { unclusterIdList[frbrSearchString.toLowerCase()] = {};}if (verboseMode == true) { frbrishAnalysis.rss = window.location.origin + frbrRssSearchURL; frbrishAnalysis.url = window.location.origin + frbrHitSearchURL; frbrishAnalysis.hits = []; frbrishAnalysis.frbrSearchString = frbrSearchString; frbrHit = {};} var numTitles = 0; $J.ajax({ type: 'GET', url: frbrRssSearchURL, dataType: 'xml', async: false, success: function(data) { var entries = $J(data).find('entry'); numTitles = $J(entries).length; if (numTitles > 1) { //console.log(' Search found '+ numTitles +' titles'); var expressions = []; //console.log("authTitle: "+authorizedTitle); if (authorizedTitle == 0) {if (verboseMode == true) { frbrishAnalysis.isAuthorizedTitle = false;} //console.log("curTitle:"+curTitle); //console.log("curMainTitle:"+curMainTitle); var seriesPattern = new RegExp("^" + curMainTitle.toUpperCase() + " AND |^" + curMainTitle.toUpperCase() + "\.{0,1} VOLUME |^" + curMainTitle.toUpperCase() + "\.{0,1} VOL\. |^" + curMainTitle.toUpperCase() + "\.{0,1} PART |^" + curMainTitle.toUpperCase() + "\.{0,1} [0-9]{1,} |^" + curMainTitle.toUpperCase() + " Y |" + curMainTitle.toUpperCase() + "\. [A-Z ]{3,} "); //console.log("seriesPattern:"+seriesPattern); var frbrEntries = $J.map($J(entries), function(frbrEntry) { var frbrHitTitle = $J(frbrEntry).find('title').text().replace("First Title value, for Searching ", ""); frbrHitTitle = jQuery('

').html(frbrHitTitle).text(); frbrHitTitle = removeGmd(frbrHitTitle); frbrHitTitle = removeSubtitle(frbrHitTitle); if (titleIncludesResponsibility) { frbrHitTitle = frbrHitTitle.replace(/ \/ .*$/, ''); } frbrHitTitle = frbrHitTitle.replace(/[.:;=\/]$/, ""); //console.log("authTitle=0: "+frbrHitTitle.toUpperCase()+"|curTitle:"+curTitle.toUpperCase()); //console.log($J(frbrEntry).find('id').text().replace(/ent:\/\/.*\//,"")); //console.log("frbrHitTitle:"+frbrHitTitle);if (verboseMode == true) { frbrHit.entry = {}; frbrHit.entry.title = $J(frbrEntry).find('title').html(); frbrHit.entry.link = $J(frbrEntry).find('link').attr('href'); frbrHit.entry.id = $J(frbrEntry).find('id').html(); frbrHit.entry.content = $J(frbrEntry).find('content').html(); frbrHit.frbrHitTitle = frbrHitTitle; frbrHit.id = $J(frbrEntry).find('id').text().replace(/ent:\/\/.*\//, "");} if ($J(frbrEntry).find('id').text().indexOf(hitDocId) !== -1) { //don't eliminate the title we started from!if (verboseMode == true) { frbrHit.result = "Starting record: Retain for cluster"; frbrishAnalysis.hits.push(JSON.parse(JSON.stringify(frbrHit)));} if (unclusterIdList[frbrSearchString.toLowerCase()][$J(frbrEntry).find('id').text().replace(/ent:\/\/.*\//, "")]) { unclusterIdList[frbrSearchString.toLowerCase()][$J(frbrEntry).find('id').text().replace(/ent:\/\/.*\//, "")] = false; } return frbrEntry; } else if ((frbrHitTitle.toUpperCase().indexOf(curTitle.toUpperCase()) > 5 && (frbrHitTitle.toUpperCase().indexOf(" = " + curTitle.toUpperCase()) == -1)) || (authorizedTitle == 0 && frbrHitTitle.toUpperCase().indexOf(curTitle.toUpperCase()) < 0)) { //console.log("ctitle not found in ftitle or not found: "+frbrHitTitle.toUpperCase().indexOf(curTitle.toUpperCase()));if (verboseMode == true) { frbrHit.result = "curTitle not found or found after first 5 characters of frbrHitTitle but not a parallel title: Don't include in cluster"; frbrishAnalysis.hits.push(JSON.parse(JSON.stringify(frbrHit)));} if (unclusterIdList[frbrSearchString.toLowerCase()][$J(frbrEntry).find('id').text().replace(/ent:\/\/.*\//, "")] != false) { unclusterIdList[frbrSearchString.toLowerCase()][$J(frbrEntry).find('id').text().replace(/ent:\/\/.*\//, "")] = true; } //removedIds.push($J(frbrEntry).find('id').text().replace(/ent:\/\/.*\//,"") ); //$J(this).remove(); numTitles--; return null; } else if (hideSkipFromSubsequentClusters == true && skipIdList[$J(frbrEntry).find('id').text()]) {if (verboseMode == true) { frbrHit.result = "Already in an earlier cluster: Don't include in cluster"; frbrishAnalysis.hits.push(JSON.parse(JSON.stringify(frbrHit)));} numTitles--; return null; } else if (seriesPattern.test(frbrHitTitle.toUpperCase())) { //console.log("volume pattern match:"+$J(frbrEntry).find('id').text().replace(/ent:\/\/.*\//,"") );if (verboseMode == true) { frbrHit.result = "Series/Volume pattern match: Don't include in cluster"; frbrishAnalysis.hits.push(JSON.parse(JSON.stringify(frbrHit)));} if (unclusterIdList[frbrSearchString.toLowerCase()][$J(frbrEntry).find('id').text().replace(/ent:\/\/.*\//, "")] != false) { unclusterIdList[frbrSearchString.toLowerCase()][$J(frbrEntry).find('id').text().replace(/ent:\/\/.*\//, "")] = true; } //removedIds.push($J(frbrEntry).find('id').text().replace(/ent:\/\/.*\//,"") ); //$J(this).remove(); numTitles--; return null; } else if (frbrHitTitle.length > curTitle.length + allowedLengthMismatch || curTitle.length > frbrHitTitle.length + allowedLengthMismatch ) { //console.log("title length too different "+curTitle.length+"::"+frbrHitTitle.length);if (verboseMode == true) { frbrHit.result = "frbrHitTitle is more than " + allowedLengthMismatch + " characters longer than curTitle, or curTitle is more than " + allowedLengthMismatch + " characters longer than frbrHitTitle"; frbrishAnalysis.hits.push(JSON.parse(JSON.stringify(frbrHit)));} if (unclusterIdList[frbrSearchString.toLowerCase()][$J(frbrEntry).find('id').text().replace(/ent:\/\/.*\//, "")] != false) { unclusterIdList[frbrSearchString.toLowerCase()][$J(frbrEntry).find('id').text().replace(/ent:\/\/.*\//, "")] = true; } numTitles--; return null; } else {if (verboseMode == true) { frbrHit.result = "Matching record: Retain for cluster"; frbrishAnalysis.hits.push(JSON.parse(JSON.stringify(frbrHit)));} if (unclusterIdList[frbrSearchString.toLowerCase()][$J(frbrEntry).find('id').text().replace(/ent:\/\/.*\//, "")]) { unclusterIdList[frbrSearchString.toLowerCase()][$J(frbrEntry).find('id').text().replace(/ent:\/\/.*\//, "")] = false; } return frbrEntry; } //console.log(' Revised search total: '+ numTitles +' titles'); }); } // authorizedTitle = 0 else { //process hits from authorized title searchesif (verboseMode == true) { frbrishAnalysis.isAuthorizedTitle = true;} //console.log("curTitle:"+curTitle); //console.log("curMainTitle:"+curMainTitle); var seriesPattern = new RegExp("^" + curMainTitle.toUpperCase() + " AND |^" + curMainTitle.toUpperCase() + "\.{0,1} VOLUME |^" + curMainTitle.toUpperCase() + "\.{0,1} VOL\. |^" + curMainTitle.toUpperCase() + "\.{0,1} PART |^" + curMainTitle.toUpperCase() + "\.{0,1} [0-9]{1,} |^" + curMainTitle.toUpperCase() + "\.{0,1} I[IVX]{1,} |" + curMainTitle.toUpperCase() + " IN |" + curMainTitle.toUpperCase() + " Y |" + curMainTitle.toUpperCase() + "\. [A-Z ]{3,} "); //console.log("seriesPattern:"+seriesPattern); var frbrEntries = $J.map($J(entries), function(frbrEntry) { var frbrHitTitle = $J(frbrEntry).find('title').text().replace("First Title value, for Searching ", ""); frbrHitTitle = jQuery('

').html(frbrHitTitle).text(); frbrHitTitle = removeGmd(frbrHitTitle); frbrHitTitle = removeSubtitle(frbrHitTitle); if (titleIncludesResponsibility) { frbrHitTitle = frbrHitTitle.replace(/ \/ .*$/, ''); } frbrHitTitle = frbrHitTitle.replace(/[.:;=\/]$/, ""); //console.log($J(frbrEntry).find('id').text().replace(/ent:\/\/.*\//,"")); //console.log("frbrHitTitle:"+frbrHitTitle);if (verboseMode == true) { frbrHit.entry = {}; frbrHit.entry.title = $J(frbrEntry).find('title').html(); frbrHit.entry.link = $J(frbrEntry).find('link').attr('href'); frbrHit.entry.id = $J(frbrEntry).find('id').html(); frbrHit.entry.content = $J(frbrEntry).find('content').html(); frbrHit.frbrHitTitle = frbrHitTitle; frbrHit.id = $J(frbrEntry).find('id').text().replace(/ent:\/\/.*\//, "");} // Check if FRBR search hit is the same as the current main title followed by certain words that indicate a later volume in a series if ($J(frbrEntry).find('id').text().indexOf(hitDocId) !== -1) { //don't eliminate the title we started from!if (verboseMode == true) { frbrHit.result = "Starting record: Retain for cluster"; frbrishAnalysis.hits.push(JSON.parse(JSON.stringify(frbrHit)));} if (unclusterIdList[frbrSearchString.toLowerCase()][$J(frbrEntry).find('id').text().replace(/ent:\/\/.*\//, "")]) { unclusterIdList[frbrSearchString.toLowerCase()][$J(frbrEntry).find('id').text().replace(/ent:\/\/.*\//, "")] = false; } return frbrEntry; } else if (hideSkipFromSubsequentClusters == true && skipIdList[$J(frbrEntry).find('id').text()]) {if (verboseMode == true) { frbrHit.result = "Already in an earlier cluster: Don't include in cluster"; frbrishAnalysis.hits.push(JSON.parse(JSON.stringify(frbrHit)));} numTitles--; return null; } else if (seriesPattern.test(frbrHitTitle.toUpperCase())) { //console.log("volume pattern match:"+$J(frbrEntry).find('id').text().replace(/ent:\/\/.*\//,"") );if (verboseMode == true) { frbrHit.result = "Series/Volume pattern match: Don't include in cluster"; frbrishAnalysis.hits.push(JSON.parse(JSON.stringify(frbrHit)));} unclusterIdList[frbrSearchString.toLowerCase()][$J(frbrEntry).find('id').text().replace(/ent:\/\/.*\//, "")] = true; //removedIds.push($J(frbrEntry).find('id').text().replace(/ent:\/\/.*\//,"") ); //$J(this).remove(); numTitles--; return null; } else if ((frbrHitTitle.toUpperCase().indexOf(curTitle.toUpperCase()) < 5 && frbrHitTitle.toUpperCase().indexOf(curTitle.toUpperCase()) >= 0) && (frbrHitTitle.length > curTitle.length + allowedLengthMismatch || curTitle.length > frbrHitTitle.length + allowedLengthMismatch )) {if (verboseMode == true) { frbrHit.result = "curTitle found in first 5 characters of frbrHitTitle, and title lengths differ by more than " + allowedLengthMismatch + " characters: Don't include in cluster"; frbrishAnalysis.hits.push(JSON.parse(JSON.stringify(frbrHit)));} numTitles--; return null; } else {if (verboseMode == true) { frbrHit.result = "Matching record: Retain for cluster"; frbrishAnalysis.hits.push(JSON.parse(JSON.stringify(frbrHit)));} if (unclusterIdList[frbrSearchString.toLowerCase()][$J(frbrEntry).find('id').text().replace(/ent:\/\/.*\//, "")]) { unclusterIdList[frbrSearchString.toLowerCase()][$J(frbrEntry).find('id').text().replace(/ent:\/\/.*\//, "")] = false; } return frbrEntry; } }); }if (verboseMode == true) { frbrishAnalysis.numHits = numTitles; frbrishAnalysis.unclusterIds = unclusterIdList;} //console.log(' Final revised search total: '+ numTitles +' titles'); if (numTitles < 2) { return; } //console.log(removedIds); //console.log(frbrEntries); sessionStorage.unclusterIds = JSON.stringify(unclusterIdList); //console.log(JSON.stringify(unclusterIdList)); var divSelector = '#' + rId.replace(/hitlist/, "results_bio"); if ($J('body').hasClass('mobile')) { divSelector = '#' + rId.replace(/hitlist/, "results_cell"); } $J(divSelector).parent().children('.results_top_half').children('.results_chkbox').hide(); $J(divSelector).parent().children('.results_right').hide(); $J(divSelector).children('.thumb_hidden').hide(); $J(divSelector).parents('.cell_wrapper').addClass("frbrClusterDisplay"); if (formatLinks == true) { $J(divSelector).parents('.cell_wrapper').addClass("frbrButtons"); } //var multipleTag = '

' + multipleFormatsText + '

View all editions

'; //var multipleTag = '

  • ${LIST_EDITIONS}

'; //var multipleTag = '

' + multipleFormatsText + '

    • Search all editions

'; var multipleTag = '

' + multipleFormatsText + '

'; $J(divSelector).append(multipleTag); var frbrThumbButton = ''; $J(divSelector).parents('.results_cell').append(frbrThumbButton); //console.log($J(divSelector).parents('.results_cell').attr('id')); divSelector = '#' + rId.replace(/hitlist/, "results_bio") + " .availableDiv"; //, "availableDiv"); $J(divSelector).hide(); $J(divSelector).next('br').hide(); divSelector = '#' + 'ercAvailableDiv_' + rId; setTimeout(function() { $J(divSelector).hide() }, 500); var divSelector2 = '#' + rId.replace(/hitlist/, "results_bio"); setTimeout(function() { $J(divSelector2).parent().parent().children('button[class^=availability-button]').hide() }, 5000); setTimeout(function() { $J(divSelector2).parent().parent().children('.availability-table-div').hide() }, 5000); //var imgLinkToClick = "a[onclick*='" + dispDocId + "'][id*=detailClick]"; var imgLinkSelector = '.' + rId.replace(/hitlist/, "detailClick"); $J(imgLinkSelector).attr('href', frbrHitSearchURL); $J(imgLinkSelector).attr('onclick', null); linkSelector = '#' + rId.replace(/hitlist/, "detailLink"); $J(linkSelector).attr('href', frbrHitSearchURL); $J(linkSelector).attr('onclick', null); var frbrTitle = removeGmd($J(linkSelector).text()); frbrTitle = frbrTitle.replace(/^\n/, ""); frbrTitle = frbrTitle.replace(/\n$/, ""); testFrbrTitle = frbrTitle.toUpperCase().replace(/^The |^An |^A /, ""); testFrbrTitle = testFrbrTitle.replace(/\.|,|:|=/g, ""); var frbrDialogTitle = frbrTitle; if (typeof $J('#' + rId + '_FRBR_AUTHORIZED_TITLE .FRBR_AUTHORIZED_TITLE_value') !== 'undefined') { testAuthTitle = $J('#' + rId + '_FRBR_AUTHORIZED_TITLE').text().toUpperCase(); if ((testFrbrTitle.toUpperCase().indexOf(testAuthTitle) < 0 && testAuthTitle.indexOf(testFrbrTitle.toUpperCase()) < 0)) { //If the authorized title has a qualifier, display it in parentheses after the current record's main title //Otherwise, display the authorized title followed by the current record's main title var qualPattern = new RegExp(/ [(][^)]*[)]$/); if (qualPattern.test($J('#' + rId + '_FRBR_AUTHORIZED_TITLE').text())) { frbrTitle = frbrTitle + ' (' + $J('#' + rId + '_FRBR_AUTHORIZED_TITLE').text() + ')'; frbrDialogTitle = frbrDialogTitle + ' (' + $J('#' + rId + '_FRBR_AUTHORIZED_TITLE').text() + ')'; } else { //Display the authorized title, then the "current" record's title frbrTitle = $J('#' + rId + '_FRBR_AUTHORIZED_TITLE').text() + ' (' + frbrTitle + ')'; frbrDialogTitle = $J('#' + rId + '_FRBR_AUTHORIZED_TITLE').text() + ' (' + frbrDialogTitle + ')'; } } } $J(linkSelector).html(frbrTitle); $J(frbrEntries).each(function() { var frbrHitTitle = $J(this).find('title').text().replace("First Title value, for Searching ", ""); /*if (frbrHitTitle.toUpperCase().indexOf(curTitle.toUpperCase()) > 5 || (authorizedTitle == 0 && frbrHitTitle.toUpperCase().indexOf(curTitle.toUpperCase()) < 0)) { //console.log("ctitle found in ftitle at(2): "+frbrHitTitle.toUpperCase().indexOf(curTitle.toUpperCase())); $J(this).remove(); return; }*/ var el = $J(this); var frbrHitId = $J(el).find('id').text().replace(/ent:\/\/.*\//, ""); //if (removedIds[frbrHitId]) { //######## //if (unclusterIdList[frbrSearchString.toLowerCase()][frbrHitId]) { //console.log("is removed hit:"+frbrHitId); // next; //######## //} //######## isErcFrbrHit = 0; if ($J(el).find('id').text().indexOf("ERC") > -1) { isErcFrbrHit = 1; frbrFullId = $J(el).find('id').text(); //console.log('Hit id ' + frbrHitId); //console.log("frbrFullId " + frbrFullId); frbrHitId = frbrFullId; } var docInfo = frbrHitId.split(':'); var numAvail = 0; //console.log('docInfo0:'+docInfo[0]); if (displayAvailable) { var availableString = ""; if (docInfo[0] == "SD_ILS") { var titleID = docInfo[1]; //console.log('docInfo1:'+docInfo[1]); if (wsBaseUrl.substr(-1, 1) != "/") { wsBaseUrl += "/"; } var ilsURL = wsBaseUrl; if (ilsType == "Horizon") { ilsURL = wsBaseUrl + 'rest/standard/lookupTitleInfo?clientID=' + clientId + '&includeItemInfo=true&json=true&titleKey=' + titleID + '&callback=?'; } else { ilsURL = wsBaseUrl + 'rest/standard/lookupTitleInfo?clientID=' + clientId + '&includeAvailabilityInfo=true&json=true&titleID=' + titleID + '&callback=?'; } //console.log(ilsURL); $J.getJSON(ilsURL, function(data) { //console.log(data); if (ilsType == "Horizon") { if (data.titleInfo[0].available) { numAvail = data.titleInfo[0].available; } else { numAvail = 0; } } else { numAvail = data.TitleInfo[0].TitleAvailabilityInfo.totalCopiesAvailable; } availableString = '' + numAvail.toString() + ''; //console.log('availableString:'+availableString) jQuery('.frbrAvail_' + titleID).text(availableString); jQuery('#frbrAvailLabel_' + titleID).show(); //add total to count on format line var formatLabel = jQuery('#'+rId+'_frbrLinks .frbrAvail_' + titleID).closest('.frbr-expressions').find('.frbr-menu-labels');/*console.log("expression summary");console.log(formatLabel);var tmpcnt;tempcnt = formatLabel.find('.frbr-number-of-items').text();console.log("|"+tempcnt+"|");console.log("|"+numAvail+"|");console.log(formatLabel.html());*/ if (formatLabel.find('.frbr-number-of-items').length > 0) { formatLabel.find('.frbr-number-of-items').text(parseInt(formatLabel.find('.frbr-number-of-items').text()) + numAvail) } else { if (displayAvailable) { formatLabel.html(formatLabel.html() + ' (' + availableString + ' Available)'); } }//console.log(formatLabel.html()); if (displayAvailable) { //(collapseFormats && displayAvailable) //add total to count on collapsed summary line var frbrSummaryLabel = jQuery('#'+rId+'_frbrLinks .frbrAvail_' + titleID).closest('.results_cell').find('.frbr-sum-of-available'); if (frbrSummaryLabel.html() == "") { frbrSummaryLabel.html(' (0 Available)'); } frbrSummaryLabel.find('.frbr-number-of-items').text(parseInt(frbrSummaryLabel.find('.frbr-number-of-items').text()) + numAvail); } }); } else { /* Query eRC availability */ titleID = frbrHitId.replace(/^ent:\/\/[^\/]+\/[^\/]+\/[^\/:]+:/,""); var numAvail = ""; if (qualifiedErcUrls == true) { var titlesUrl = addPathParams(com_sirsi_ent_widgets.URLS.eRC.titleInfoUrl, encodeAsTapestry(frbrHitId)); //console.log(titlesUrl); jQuery.getJSON(titlesUrl, function(response) { var data = response.eResourceList[0]; if (data && data.status && 'OK' === data.status && data.formats && data.formats.length > 0) { if (data.availability && data.availability.available) { if (data.availability.availableCopies) { // show copies available numAvail = data.availability.availableCopies; } else { // unlimited duration numAvail = 'Unlimited'; } } else { // no copies available numAvail = 0; } } availableString = '' + numAvail + ''; //jQuery('.frbrAvail_'+frbrHitId).text(availableString); jQuery('.frbrAvail_' + titleID.replace(/:/g,"_")).text(availableString); jQuery('#frbrAvailLabel_' + titleID.replace(/:/g,"_")).show(); //add total to count on format line var formatLabel = jQuery('#'+rId+'_frbrLinks .frbrAvail_' + titleID.replace(/:/g,"_")).closest('.frbr-expressions').find('.frbr-menu-labels'); if (formatLabel.find('.frbr-number-of-items').length > 0) { formatLabel.find('.frbr-number-of-items').text(parseInt(formatLabel.find('.frbr-number-of-items').text()) + numAvail) } else { if (displayAvailable) { formatLabel.html(formatLabel.html() + ' (' + availableString + ' Available)'); } } if (displayAvailable) { //(collapseFormats && displayAvailable) //add total to count on collapsed summary line var frbrSummaryLabel = jQuery('#'+rId+'_frbrLinks .frbrAvail_' + titleID.replace(/:/g,"_")).closest('.results_cell').find('.frbr-sum-of-available'); if (frbrSummaryLabel.html() == "") { frbrSummaryLabel.html(' (0 Available)'); } if (numAvail == 'Unlimited') { frbrSummaryLabel.find('.frbr-number-of-items').text(parseInt(frbrSummaryLabel.find('.frbr-number-of-items').text()) + 1); } else { frbrSummaryLabel.find('.frbr-number-of-items').text(parseInt(frbrSummaryLabel.find('.frbr-number-of-items').text()) + numAvail); } } }); } else { if (longErcUrls) { titleID = frbrHitId.replace(/^ent:\/\/[^\/]+\/[^\/]+\/[^\/:]+:/,"") } else { titleID = frbrHitId.replace(/^ent:\/\/[^\/]+\/[^\/]+\//,"") } var titlesUrl = addPathParams(com_sirsi_ent_widgets.URLS.eRC.titleInfoUrl, encodeAsTapestry(titleID)); //console.log(titlesUrl); jQuery.getJSON(titlesUrl, function(response) { var data = response.eResourceList[0]; if (data && data.status && 'OK' === data.status && data.formats && data.formats.length > 0) { if (data.availability && data.availability.available) { if (data.availability.availableCopies) { // show copies available numAvail = data.availability.availableCopies; } else { // unlimited duration numAvail = 'Unlimited'; } } else { // no copies available numAvail = 0; } } availableString = '' + numAvail + ''; //jQuery('.frbrAvail_'+frbrHitId).text(availableString); jQuery('.frbrAvail_' + titleID.replace(/:/g,"_")).text(availableString); jQuery('#frbrAvailLabel_' + titleID.replace(/:/g,"_")).show(); //add total to count on format line var formatLabel = jQuery('#'+rId+'_frbrLinks .frbrAvail_' + titleID.replace(/:/g,"_")).closest('.frbr-expressions').find('.frbr-menu-labels'); if (formatLabel.find('.frbr-number-of-items').length > 0) { if (numAvail == 'Unlimited') { formatLabel.find('.frbr-number-of-items').text(parseInt(formatLabel.find('.frbr-number-of-items').text()) + 1) } else { formatLabel.find('.frbr-number-of-items').text(parseInt(formatLabel.find('.frbr-number-of-items').text()) + numAvail) } } else { if (displayAvailable) { formatLabel.html(formatLabel.html() + ' (' + availableString + ' Available)'); } } if (displayAvailable) { //(collapseFormats && displayAvailable) //add total to count on collapsed summary line var frbrSummaryLabel = jQuery('#'+rId+'_frbrLinks .frbrAvail_' + titleID.replace(/:/g,"_")).closest('.results_cell').find('.frbr-sum-of-available'); if (frbrSummaryLabel.html() == "") { frbrSummaryLabel.html(' (0 Available)'); } if (numAvail == 'Unlimited') { frbrSummaryLabel.find('.frbr-number-of-items').text(parseInt(frbrSummaryLabel.find('.frbr-number-of-items').text()) + 1); } else { frbrSummaryLabel.find('.frbr-number-of-items').text(parseInt(frbrSummaryLabel.find('.frbr-number-of-items').text()) + numAvail); } } }); } } } //console.log("frbrHitId: "+frbrHitId); //console.log("hitDocId: "+hitDocId); if (frbrHitId != hitDocId) { skipIdList[frbrHitId] = true; //console.log(' Adding '+frbrHitId+' to list'); } var frbrLinkURL = frbrHitSearchURL + '&DISP=' + frbrHitId; //console.log('Link url ' +frbrLinkURL); var nonmodalLinkURL = $J(el).find('link').attr('href'); if (typeof nonmodalLinkURL !== "undefined") { nonmodalLinkURL = frbrRemoveParameter(nonmodalLinkURL, "ps"); } else { nonmodalLinkURL = " "; } var content = $J(el).find('content').text(); var tags = content.split('
'); var hasTag = []; jQuery.each(frbrUseFields, function(i, fld) { hasTag[fld] = -1; }); var formatTag = -1; var expressionFormat; //console.log('frbrFormatBOOK:'+frbrFormats['BOOK']['code']); for (var term = 0; term < tags.length; term++) { //console.log('tt:'+tags[term]); var alltags = tags[term].split(''); tags[term] = tags[term].split(''); var termName = alltags.shift(); //translate HTML entities to proper characters var parser = new DOMParser; var dom = parser.parseFromString('' + termName, 'text/html'); termName = dom.body.textContent; tags[term][0] = termName; var termValue = alltags.join(' & '); //console.log('termName(1):'+termName+'|termValue:'+termValue+'|'); if (!(termName == "" && termValue == "")) { // console.log('tt0:'+tags[term][0]); // console.log('isErc:'+isErcFrbrHit); // console.log('formatTag:'+formatTag); if ((tags[term][0] == "Format" || tags[term][0] == "Format:" || (isErcFrbrHit == 1 && (tags[term][0] == "Format" || tags[term][0] == "Format:"))) && formatTag == -1) { // console.log('termName(2):'+termName+'|termValue:'+termValue+'|'); if (termValue.indexOf(" & ") == -1) { // single format term in tag //translate HTML entities to proper characters parser = new DOMParser; dom = parser.parseFromString('' + termValue, 'text/html'); termValue = dom.body.textContent; // console.log('termValue(1):'+termValue+'|'); //formats:'+ frbrFormats[termValue]['code'] +'|'); //console.log("jQiEO:"+jQuery.isEmptyObject(frbrFormats[termValue])+"|"); if (jQuery.isEmptyObject(frbrFormats[termValue])) { //if (typeof frbrFormats[termValue]['code'] === "undefined" || frbrFormats[termValue]['code'].length < 1) { //console.log('frbrFormatBOOK:'+frbrFormats['Book']['code']); frbrFormats[termValue] = []; frbrFormats[termValue]['id'] = "frbr-other"; frbrFormats[termValue]['title'] = termValue; //"Other"; frbrFormats[termValue]['code'] = "UNKNOWN"; } //console.log("fFtcode:"+frbrFormats[termValue]['code']); formatTag = term; tags[term][1] = termValue; expressionFormat = frbrFormats[termValue]['code']; //termValue; if (typeof expressionFormat !== "undefined" && (typeof expressions[expressionFormat] == "undefined" || expressions[expressionFormat].length < 1)) { expressions[expressionFormat] = []; } //console.log('expFormat: ' + expressionFormat); } else { // multiple format terms in tag //console.log('termValue(2):'+termValue+'|'); //console.log('frbrFormatBOOK:'+frbrFormats['BOOK']['code']); var allforms = termValue.split(' & '); allforms.sort(); //console.log("af0:"+allforms[0]+"|"); var tmpexpression = []; for (var checktag = 0; checktag < allforms.length; checktag++) { //console.log("afct:"+allforms[checktag]+"|"); //translate HTML entities to proper characters parser = new DOMParser; dom = parser.parseFromString('' + allforms[checktag], 'text/html'); allforms[checktag] = dom.body.textContent; if (tmpexpression.indexOf(frbrFormats[allforms[checktag]]['code']) == -1) { tmpexpression.push(frbrFormats[allforms[checktag]]['code']); //console.log("tmpexp0:"+tmpexpression[0]); } else { //console.log("checktag(before):"+checktag+"|af[checktag]:"+allforms[checktag]); allforms.splice(checktag, 1); checktag--; //console.log("checktag(after):"+checktag+"|af[checktag]:"+allforms[checktag]); } } //console.log('frbrFormatBOOK:'+frbrFormats['BOOK']['code']); //console.log("af0(2):"+allforms[0]+"|"); if (frbrFormats[allforms[0]]['code'].length < 1) { frbrFormats[allforms[0]]['id'] = "frbr-other"; frbrFormats[allforms[0]]['title'] = "Other"; frbrFormats[allforms[0]]['code'] = "UNKNOWN"; } termValue = allforms.join(' & '); //console.log('termValue(3):'+termValue+'|'); formatTag = term; tags[term][1] = termValue; //console.log("fFtcode:"+frbrFormats[allforms[0]]['code']); expressionFormat = frbrFormats[allforms[0]]['code']; if (typeof expressionFormat != "undefined" && (typeof expressions[expressionFormat] == "undefined" || expressions[expressionFormat].length < 1)) { expressions[expressionFormat] = []; } } } jQuery.each(frbrUseFields, function(i, fld) { if (tags[term][0] == frbrExpressionFields[fld]['label'] || tags[term][0] == frbrExpressionFields[fld]['label'] + ":" || (hasTag[fld] == -1 && tags[term][0].indexOf(frbrExpressionFields[fld]['label']) > -1)) { hasTag[fld] = term; tags[term][1] = termValue; } }); } //end if termname not null } //end for var consoleTmp = ""; if (formatTag > -1) { //console.log("tft:"+tags[formatTag][1]); if (tags[formatTag][1].indexOf(" & ") > -1) { //multi-format record //console.log("made it tft 1"); //console.log("multi-tag tft:"+tags[formatTag][1]); consoleTmp = 'Format ' + tags[formatTag][1] + '|' + frbrFormats[tags[formatTag][1].split(' & ')[0]]['code']; //*** tags[formatTag][1] has an &!! var expressionText = ''; //''; if ($J('body').hasClass('mobile')) { expressionText = '

'; } //var expressionFormat = tags[formatTag][1] //expressionFormat = expressionFormat.replace(/ \& .*$/, ""); //console.log("made it 1a"); /* //### experimental for multi-format records, for treating subformats as subformats rather than additional formats if (tags[formatTag][1].indexOf("BOOK") > -1) { //console.log("made it 2"); if (tags[formatTag][1].indexOf("LARGEPRINT") > -1) { //console.log("made it 3a"); var tmptag = tags[formatTag][1]; tmptag = tmptag.replace("& LARGEPRINT",""); tmptag = tmptag.replace("BOOK", "BOOK (Large print)"); tags[formatTag][1] = tmptag; } else if (tags[formatTag][1].indexOf("COMICS") > -1) { //console.log("made it 3b"); tags[formatTag][1].replace("& COMICS",""); tags[formatTag][1].replace("BOOK", "Book (Comics/GN)"); } } */ var fmts = tags[formatTag][1].split(" & "); fmts.each(function(fmt) { if (expressionText.slice(-1) != ">") { expressionText += " & "; } expressionText += ' ' + fmt; //frbrFormats[fmt]['title']; }); if (jQuery('body').hasClass('mobile')) { expressionText += "

"; } else { expressionText += ""; } } else { //single-format record //console.log("made it tft 1b"); //console.log("ftf: "+frbrFormats[tags[formatTag][1]]['code']); consoleTmp = 'Format ' + tags[formatTag][1] + '|' + frbrFormats[tags[formatTag][1]]['code']; //var expressionText = ' ' + frbrFormats[tags[formatTag][1]]['title']; var expressionText; //expressionText = frbrFormats[tags[formatTag][1]]['title'] + ''; expressionText = tags[formatTag][1] + ''; if (jQuery('body').hasClass('mobile')) { expressionText += '

'; } else { expressionText += ''; } } //console.log("expText: "+expressionText); } else { //no format tag found //var expressionText = ' ' + frbrFormats['Other']['title']; var expressionText; expressionText = frbrFormats['Other']['title'] + ''; if (jQuery('body').hasClass('mobile')) { expressionText += '

'; } else { expressionText += ''; } expressionFormat = 'UNKNOWN'; expressions[expressionFormat] = []; } var expressionSort = ""; jQuery.each(frbrUseFields, function(i, fld) { if ($J('body').hasClass('mobile')) { if (hasTag[fld] > -1) { consoleTmp += ' & ' + frbrExpressionFields[fld]['label'] + ' ' + tags[hasTag[fld]][1]; expressionText += '

'; //if (frbrExpressionFields[fld]['sortBy'] == true) { if (customSort == fld) { expressionSort = tags[hasTag[fld]][1]; expressionSort = expressionSort.replace(/([0-9]+)/g, function(match, $1, offset, original) { return ($1).padStart(6, "0"); }); } } else { expressionText += ''; } } //end if mobile else { //if nonmobile if (hasTag[fld] > -1) { consoleTmp += ' & ' + frbrExpressionFields[fld]['label'] + ' ' + tags[hasTag[fld]][1]; expressionText += '

'; //if (frbrExpressionFields[fld]['sortBy'] == true) { if (customSort == fld) { expressionSort = tags[hasTag[fld]][1]; expressionSort = expressionSort.replace(/([0-9]+)/g, function(match, $1, offset, original) { return ($1).padStart(6, "0"); }); } } else { expressionText += '

'; } } }); if (displayAvailable) { //console.log("availableString(2):"+availableString); if (availableString != "") { if ($J('body').hasClass('mobile')) { expressionText += '

'; } } } if (displayPlaceHold && isErcFrbrHit == 0) { if (docInfo[0] == "SD_ILS") { //expressionText += '

'; } } consoleTmp += ' & nonmodalLinkURL ' + nonmodalLinkURL; //console.log(consoleTmp); if ($J('body').hasClass('mobile')) { expressionText += '

Search Results for INITIAL_AUTHOR_SRCH="Singer, Bryan, 1965-" (2024)

References

Top Articles
Latest Posts
Article information

Author: Roderick King

Last Updated:

Views: 6208

Rating: 4 / 5 (71 voted)

Reviews: 94% of readers found this page helpful

Author information

Name: Roderick King

Birthday: 1997-10-09

Address: 3782 Madge Knoll, East Dudley, MA 63913

Phone: +2521695290067

Job: Customer Sales Coordinator

Hobby: Gunsmithing, Embroidery, Parkour, Kitesurfing, Rock climbing, Sand art, Beekeeping

Introduction: My name is Roderick King, I am a cute, splendid, excited, perfect, gentle, funny, vivacious person who loves writing and wants to share my knowledge and understanding with you.