From: Dan Scott Date: Mon, 6 Jun 2011 15:00:12 +0000 (-0400) Subject: Get the Conifer skins into git in bulk X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=9723a305848958612c63ce76a5154c6769267843;p=contrib%2FConifer.git Get the Conifer skins into git in bulk Note that there is still plenty of refactoring that can be done, but it's better to have this in the repo than sitting in a tmp directory. Signed-off-by: Dan Scott --- diff --git a/Open-ILS/web/opac/images/algoma_logo.png b/Open-ILS/web/opac/images/algoma_logo.png new file mode 100644 index 0000000000..87e4d0fb8f Binary files /dev/null and b/Open-ILS/web/opac/images/algoma_logo.png differ diff --git a/Open-ILS/web/opac/images/algoma_logo_small.png b/Open-ILS/web/opac/images/algoma_logo_small.png new file mode 100644 index 0000000000..36bb304d22 Binary files /dev/null and b/Open-ILS/web/opac/images/algoma_logo_small.png differ diff --git a/Open-ILS/web/opac/images/conifer_tiny_logo.jpg b/Open-ILS/web/opac/images/conifer_tiny_logo.jpg new file mode 100644 index 0000000000..e81c2a159b Binary files /dev/null and b/Open-ILS/web/opac/images/conifer_tiny_logo.jpg differ diff --git a/Open-ILS/web/opac/images/hrsrh_logo.png b/Open-ILS/web/opac/images/hrsrh_logo.png new file mode 100644 index 0000000000..31e211c5ca Binary files /dev/null and b/Open-ILS/web/opac/images/hrsrh_logo.png differ diff --git a/Open-ILS/web/opac/images/hrsrh_logo_small.png b/Open-ILS/web/opac/images/hrsrh_logo_small.png new file mode 100644 index 0000000000..59de781a9f Binary files /dev/null and b/Open-ILS/web/opac/images/hrsrh_logo_small.png differ diff --git a/Open-ILS/web/opac/images/lul_logo.png b/Open-ILS/web/opac/images/lul_logo.png new file mode 100644 index 0000000000..867951c926 Binary files /dev/null and b/Open-ILS/web/opac/images/lul_logo.png differ diff --git a/Open-ILS/web/opac/images/lul_logo_small.png b/Open-ILS/web/opac/images/lul_logo_small.png new file mode 100644 index 0000000000..db617a8427 Binary files /dev/null and b/Open-ILS/web/opac/images/lul_logo_small.png differ diff --git a/Open-ILS/web/opac/images/nosm_logo.png b/Open-ILS/web/opac/images/nosm_logo.png new file mode 100644 index 0000000000..df4223e7d9 Binary files /dev/null and b/Open-ILS/web/opac/images/nosm_logo.png differ diff --git a/Open-ILS/web/opac/images/nosm_logo_small.png b/Open-ILS/web/opac/images/nosm_logo_small.png new file mode 100644 index 0000000000..4851f9540e Binary files /dev/null and b/Open-ILS/web/opac/images/nosm_logo_small.png differ diff --git a/Open-ILS/web/opac/images/sfxinfo.jpg b/Open-ILS/web/opac/images/sfxinfo.jpg new file mode 100644 index 0000000000..d554589d3c Binary files /dev/null and b/Open-ILS/web/opac/images/sfxinfo.jpg differ diff --git a/Open-ILS/web/opac/images/sjcg_logo.png b/Open-ILS/web/opac/images/sjcg_logo.png new file mode 100644 index 0000000000..79ab4e44df Binary files /dev/null and b/Open-ILS/web/opac/images/sjcg_logo.png differ diff --git a/Open-ILS/web/opac/images/sjcg_logo_small.png b/Open-ILS/web/opac/images/sjcg_logo_small.png new file mode 100644 index 0000000000..16760768dc Binary files /dev/null and b/Open-ILS/web/opac/images/sjcg_logo_small.png differ diff --git a/Open-ILS/web/opac/images/uhearst_logo.png b/Open-ILS/web/opac/images/uhearst_logo.png new file mode 100644 index 0000000000..e423bb5c09 Binary files /dev/null and b/Open-ILS/web/opac/images/uhearst_logo.png differ diff --git a/Open-ILS/web/opac/images/uhearst_logo_small.png b/Open-ILS/web/opac/images/uhearst_logo_small.png new file mode 100644 index 0000000000..2539e07a45 Binary files /dev/null and b/Open-ILS/web/opac/images/uhearst_logo_small.png differ diff --git a/Open-ILS/web/opac/images/uwin_main_logo.png b/Open-ILS/web/opac/images/uwin_main_logo.png new file mode 100644 index 0000000000..abf09a184b Binary files /dev/null and b/Open-ILS/web/opac/images/uwin_main_logo.png differ diff --git a/Open-ILS/web/opac/images/uwin_small_logo.png b/Open-ILS/web/opac/images/uwin_small_logo.png new file mode 100644 index 0000000000..25df42f986 Binary files /dev/null and b/Open-ILS/web/opac/images/uwin_small_logo.png differ diff --git a/Open-ILS/web/opac/skin/algoma/js/result_common.js b/Open-ILS/web/opac/skin/algoma/js/result_common.js new file mode 100644 index 0000000000..b2d727a66e --- /dev/null +++ b/Open-ILS/web/opac/skin/algoma/js/result_common.js @@ -0,0 +1,904 @@ +dojo.require('openils.BibTemplate'); +dojo.requireLocalization("openils.opac", "opac"); +var opac_strings = dojo.i18n.getLocalization("openils.opac", "opac"); + +var recordsHandled = 0; +var recordsCache = []; +var lowHitCount = 4; +var isbnList = ''; +var googleBooksLink = false; + +var resultFetchAllRecords = false; +var resultCompiledSearch = null; +var allRecordsReceivedAndProcessed = false; + +var enableHoldsOnAvailable = false; +var enableExtraSearchesLowHits = true; +var localProxyPrefix = 'http://librweb.laurentian.ca/login?url='; + +/* an array of the extra services to which we want to direct people, in order of priority: +Properties: + url: will be proxied via localProxyPrefix + description: will be used in the OPAC display + termTransform: a function name that transforms Evergreen compiled searches to the target search format +*/ +var externalSearchServices = [ + { + "url": "http://books.scholarsportal.info/search.html?searchField=All+Fields&limit=full_text&sortBy=relevance&collection=all&searchTerm=", + "description": "Search ScholarsPortal ebooks", + "termTransform": "allKeywords" + }, + { + "url": "http://scholar.google.com/scholar?q=", + "description": "Search Google Scholar", + "termTransform": "allKeywords" + } +]; + +/* set up the event handlers */ +if( findCurrentPage() == MRESULT || findCurrentPage() == RRESULT ) { + G.evt.result.hitCountReceived.push(resultSetHitInfo); + G.evt.result.recordReceived.push(resultDisplayRecord, resultAddCopyCounts); + G.evt.result.copyCountsReceived.push(resultDisplayCopyCounts); + G.evt.result.allRecordsReceived.push( function(){unHideMe($('result_info_2'))}, fetchGoogleBooksLink, function() { allRecordsReceivedAndProcessed = true; }, fetchChiliFreshReviews); + + attachEvt('result','lowHits',resultLowHits); + attachEvt('result','zeroHits',resultZeroHits); + attachEvt( "common", "locationUpdated", resultSBSubmit ); + /* do this after we have ID's so the rank for mr pages will be correct */ + attachEvt("result", "preCollectRecords", resultPaginate); +} + +function resultSBSubmit(){searchBarSubmit();} + +/* returns the last 'index' postion ocurring in this page */ +function resultFinalPageIndex() { + if(getHitCount() < (getOffset() + getDisplayCount())) + return getHitCount() - 1; + return getOffset() + getDisplayCount() - 1; +} + + + + +/* generic search method */ +function resultCollectSearchIds( type, method, handler ) { + + var sort = (getSort() == SORT_TYPE_REL) ? null : getSort(); + var sortdir = (sort) ? ((getSortDir()) ? getSortDir() : SORT_DIR_ASC) : null; + + var item_type; + var item_form; + var args = {}; + + if( type ) { + var form = parseForm(getForm()); + item_type = form.item_type; + item_form = form.item_form; + + } else { + item_type = (getItemType()) ? getItemType().split(/,/) : null; + item_form = (getItemForm()) ? getItemForm().split(/,/) : null; + } + + var limit = (resultFetchAllRecords) ? 1000 : getDisplayCount(); + + if( getOffset() > 0 ) { + if( getHitCount() > 0 && (getOffset() + getDisplayCount()) > getHitCount() ) + limit = getHitCount() - getOffset(); + } + + var lasso = getLasso(); + + if (lasso) args.org_unit = -lasso; + else args.org_unit = getLocation(); + + args.depth = getDepth(); + args.limit = limit; + args.offset = getOffset(); + args.visibility_limit = 3000; + args.default_class = getStype(); + + if(sort) args.sort = sort; + if(sortdir) args.sort_dir = sortdir; + if(item_type) args.item_type = item_type; + if(item_form) args.item_form = item_form; + if(getAvail()) args.available = 1; + + + if(getFacet()) args.facets = getFacet(); + + if(getAudience()) args.audience = getAudience().split(/,/); + if(getLitForm()) args.lit_form = getLitForm().split(/,/); + if(getLanguage()) args.language = getLanguage().split(/,/); + if(getBibLevel()) args.bib_level = getBibLevel().split(/,/); + if(getCopyLocs()) args.locations = getCopyLocs().split(/,/); + if(getPubdBefore()) args.before = getPubdBefore(); + else if(getPubdAfter()) args.after = getPubdAfter(); + else if(getPubdBetween()) args.between = getPubdBetween().split(/,/); + + _debug('Search args: ' + js2JSON(args)); + _debug('Raw query: ' + getTerm()); + + var atomfeed = "/opac/extras/opensearch/1.1/" + findOrgUnit(args.org_unit).shortname() + "/atom-full/" + getStype() + '?searchTerms=' + getTerm(); + if (args.facets) { atomfeed += ' ' + args.facets; } + if (sort) { atomfeed += '&searchSort=' + sort; } + if (sortdir) { atomfeed += '&searchSortDir=' + sortdir; } + dojo.create('link', {"rel":"alternate", "href":atomfeed, "type":"application/atom+xml"}, dojo.query('head')[0]); + + var req = new Request(method, args, getTerm(), 1); + req.callback(handler); + req.send(); +} + + + + + +/* set the search result info, number of hits, which results we're + displaying, links to the next/prev pages, etc. */ +function resultSetHitInfo() { + + var lasso = getLasso(); + if (!lasso) { + /* tell the user where the results are coming from */ + var baseorg = findOrgUnit(getLocation()); + var depth = getDepth(); + var mydepth = findOrgDepth(baseorg); + if( findOrgDepth(baseorg) != depth ) { + var tmporg = baseorg; + while( mydepth > depth ) { + mydepth--; + tmporg = findOrgUnit(tmporg.parent_ou()); + } + unHideMe($('including_results_for')); + $('including_results_location').appendChild(text(tmporg.name())); + } + } + + + try{searchTimer.stop()}catch(e){} + + //if( findCurrentPage() == MRESULT ) { + if( findCurrentPage() == MRESULT || + + (findCurrentPage() == RRESULT && + ( + getRtype() == RTYPE_TITLE || + getRtype() == RTYPE_AUTHOR || + getRtype() == RTYPE_SUBJECT || + getRtype() == RTYPE_SERIES || + getRtype() == RTYPE_KEYWORD + ) + + ) ) { + + if(getHitCount() <= lowHitCount && getTerm()) + runEvt('result', 'lowHits'); + } + + if(getHitCount() == 0) { + runEvt('result', 'zeroHits'); + return; + } + + + var pages = getHitCount() / getDisplayCount(); + if(pages % 1) pages = parseInt(pages) + 1; + + + + var cpage = (getOffset()/getDisplayCount()) + 1; + + G.ui.result.current_page.appendChild(text(cpage)); + G.ui.result.num_pages.appendChild(text(pages + ")")); /* the ) is dumb */ + + $('current_page2').appendChild(text(cpage)); + $('num_pages2').appendChild(text(pages + ")")); /* the ) is dumb */ + + /* set the offsets */ + var offsetEnd = getDisplayCount() + getOffset(); + if( getDisplayCount() > (getHitCount() - getOffset())) + offsetEnd = getHitCount(); + + G.ui.result.offset_end.appendChild(text(offsetEnd)); + G.ui.result.offset_start.appendChild(text(getOffset() + 1)); + + $('offset_end2').appendChild(text(offsetEnd)); + $('offset_start2').appendChild(text(getOffset() + 1)); + + G.ui.result.result_count.appendChild(text(getHitCount())); + unHideMe(G.ui.result.info); + + $('result_count2').appendChild(text(getHitCount())); + unHideMe($('result_info_div2')); +} + +function resultLowHits() { + showCanvas(); + unHideMe($('result_low_hits')); + if(getHitCount() > 0) + unHideMe($('result_low_hits_msg')); + + var words = []; + for(var key in resultCompiledSearch.searches) + words.push(resultCompiledSearch.searches[key].term); + + var sreq = new Request(CHECK_SPELL, words.join(' ')); + sreq.callback(resultSuggestSpelling); + sreq.send(); + + for(var key in resultCompiledSearch.searches) { + var areq = new Request(FETCH_CROSSREF, key, resultCompiledSearch.searches[key].term); + areq.callback(resultLowHitXRef); + areq.send(); + } + + if( !(getForm() == null || getForm() == 'all' || getForm() == "") ) { + var a = {}; + a[PARAM_FORM] = "all"; + $('low_hits_remove_format_link').setAttribute('href',buildOPACLink(a)); + unHideMe($('low_hits_remove_format')); + } + + resultSuggestSearchClass(); + + if (enableExtraSearchesLowHits) { + resultSuggestExtraSearches(); + } + + if(getTerm()) resultExpandSearch(); /* advanced search */ +} + +var lowHitsXRefSet = {}; +var lowHitsXRefLink; +var lowHitsXRefLinkParent; +function resultLowHitXRef(r) { + if(!lowHitsXRefLink){ + lowHitsXRefLinkParent = $('low_hits_xref_link').parentNode; + lowHitsXRefLink = lowHitsXRefLinkParent.removeChild($('low_hits_xref_link')); + } + var res = r.getResultObject(); + var arr = res.from; + arr.concat(res.also); + if(arr && arr.length > 0) { + unHideMe($('low_hits_cross_ref')); + var word; + var c = 0; + while( word = arr.shift() ) { + + if (lowHitsXRefSet[word] == 1) continue; + lowHitsXRefSet[word] = 1; + + if(c++ > 20) break; + var a = {}; + a[PARAM_TERM] = word; + var template = lowHitsXRefLink.cloneNode(true); + template.setAttribute('href',buildOPACLink(a)); + template.appendChild(text(word)); + lowHitsXRefLinkParent.appendChild(template); + lowHitsXRefLinkParent.appendChild(text(' ')); + } + } +} + +function resultZeroHits() { + showCanvas(); + unHideMe($('result_low_hits')); + unHideMe($('result_zero_hits_msg')); + //if(getTerm()) resultExpandSearch(); /* advanced search */ +} + +function resultExpandSearch() { + var top = findOrgDepth(globalOrgTree); + + /* We don't want to expand the scope to Everywhere in Conifer, that's just confusing */ + if(getDepth() == top || getDepth() - 1 == top) return; + unHideMe($('low_hits_expand_range')); + var par = $('low_hits_expand_link').parentNode; + var template = par.removeChild($('low_hits_expand_link')); + + var bottom = getDepth(); + while( top < bottom ) { + var a = {}; + a[PARAM_DEPTH] = top; + var temp = template.cloneNode(true); + temp.appendChild(text(findOrgTypeFromDepth(top).opac_label())) + temp.setAttribute('href',buildOPACLink(a)); + par.appendChild(temp); + top++; + } +} + +/* Generate links to our extra search services */ +function resultSuggestExtraSearches() { + dojo.forEach(externalSearchServices, function(esItem) { + var extraSearchStuff = this[esItem.termTransform].apply(this, [esItem.url]); + dojo.place("
" + + esItem.description + ": " + extraSearchStuff.displayTerms + "
", "result_low_hits", "child" + ); + }); +} + +/* Transform everything in the Evergreen search to plain old keywords */ +function allKeywords(esUrl) { + var ebook_search = localProxyPrefix + esUrl; + var ebook_terms = ''; + for (var key in resultCompiledSearch.searches) { + ebook_search += resultCompiledSearch.searches[key].term + '+'; + ebook_terms += resultCompiledSearch.searches[key].term + ' '; + } + ebook_search = ebook_search.replace(/ /g, '+'); + ebook_search = ebook_search.replace(/\%20/g, '+'); + ebook_search = ebook_search.replace(/\+$/g, ''); + ebook_terms = ebook_terms.replace(/ $/g, ''); + var extraSuggestion = {"displayTerms": ebook_terms, "searchTerms": ebook_search}; + return extraSuggestion; +} + +function resultSuggestSearchClass() { + var stype = getStype(); + if(stype == STYPE_KEYWORD) return; + var a = {}; var ref; + unHideMe($('low_hits_search_type')); + if(stype != STYPE_TITLE) { + ref = $('low_hits_title_search'); + unHideMe(ref); + a[PARAM_STYPE] = STYPE_TITLE; + ref.setAttribute('href',buildOPACLink(a)); + } + if(stype != STYPE_AUTHOR) { + ref = $('low_hits_author_search'); + unHideMe(ref); + a[PARAM_STYPE] = STYPE_AUTHOR; + ref.setAttribute('href',buildOPACLink(a)); + } + if(stype != STYPE_SUBJECT) { + ref = $('low_hits_subject_search'); + unHideMe(ref); + a[PARAM_STYPE] = STYPE_SUBJECT; + ref.setAttribute('href',buildOPACLink(a)); + } + if(stype != STYPE_KEYWORD) { + ref = $('low_hits_keyword_search'); + unHideMe(ref); + a[PARAM_STYPE] = STYPE_KEYWORD; + ref.setAttribute('href',buildOPACLink(a)); + } + if(stype != STYPE_SERIES) { + ref = $('low_hits_series_search'); + unHideMe(ref); + a[PARAM_STYPE] = STYPE_SERIES; + ref.setAttribute('href',buildOPACLink(a)); + } +} + +function resultSuggestSpelling(r) { + var res = r.getResultObject(); + var phrase = getTerm(); + var words = phrase.split(/ /); + + var newterm = ""; + + for( var w = 0; w < words.length; w++ ) { + var word = words[w]; + var blob = grep(res, function(i){return (i.word == word);}); + if( blob ) blob = blob[0]; + else continue; + if( blob.word == word ) { + if( blob.suggestions && blob.suggestions[0] ) { + newterm += " " + blob.suggestions[0]; + unHideMe($('did_you_mean')); + } else { + newterm += " " + word; + } + } + } + + var arg = {}; + arg[PARAM_TERM] = newterm; + $('spell_check_link').setAttribute('href', buildOPACLink(arg)); + $('spell_check_link').appendChild(text(newterm)); +} + + +function resultPaginate() { + var o = getOffset(); + + if( !( ((o) + getDisplayCount()) >= getHitCount()) ) { + + var args = {}; + args[PARAM_OFFSET] = o + getDisplayCount(); + args[PARAM_SORT] = SORT; + args[PARAM_SORT_DIR] = SORT_DIR; + args[PARAM_RLIST] = new CGI().param(PARAM_RLIST); + + G.ui.result.next_link.setAttribute("href", buildOPACLink(args)); + addCSSClass(G.ui.result.next_link, config.css.result.nav_active); + + $('next_link2').setAttribute("href", buildOPACLink(args)); + addCSSClass($('next_link2'), config.css.result.nav_active); + + args[PARAM_OFFSET] = getHitCount() - (getHitCount() % getDisplayCount()); + + /* when hit count is divisible by display count, we have to adjust */ + if( getHitCount() % getDisplayCount() == 0 ) + args[PARAM_OFFSET] -= getDisplayCount(); + + /* + G.ui.result.end_link.setAttribute("href", buildOPACLink(args)); + addCSSClass(G.ui.result.end_link, config.css.result.nav_active); + + $('end_link2').setAttribute("href", buildOPACLink(args)); + addCSSClass($('end_link2'), config.css.result.nav_active); + */ + } + + if( o > 0 ) { + + var args = {}; + args[PARAM_SORT] = SORT; + args[PARAM_SORT_DIR] = SORT_DIR; + args[PARAM_RLIST] = new CGI().param(PARAM_RLIST); + + args[PARAM_OFFSET] = o - getDisplayCount(); + G.ui.result.prev_link.setAttribute( "href", buildOPACLink(args)); + addCSSClass(G.ui.result.prev_link, config.css.result.nav_active); + + $('prev_link2').setAttribute( "href", buildOPACLink(args)); + addCSSClass($('prev_link2'), config.css.result.nav_active); + + args[PARAM_OFFSET] = 0; + G.ui.result.home_link.setAttribute( "href", buildOPACLink(args)); + addCSSClass(G.ui.result.home_link, config.css.result.nav_active); + + $('search_home_link2').setAttribute( "href", buildOPACLink(args)); + addCSSClass($('search_home_link2'), config.css.result.nav_active); + } + + if(getDisplayCount() < getHitCount()) { + unHideMe($('start_end_links_span')); + unHideMe($('start_end_links_span2')); + } + + showCanvas(); + try{searchTimer.stop()}catch(e){} +} + +function buildunAPISpan (span, type, id) { + var cgi = new CGI(); + var d = new Date(); + + addCSSClass(span,'unapi-id'); + + span.setAttribute( + 'title', + 'tag:' + cgi.server_name + ',' + + d.getFullYear() + + ':' + type + '/' + id + ); +} + +function unhideGoogleBooksLink (data) { + for ( var i in data ) { + //if (data[i].preview == 'noview') continue; + + var gbspan = $n(document.documentElement, 'googleBooksLink-' + i); + var gba = $n(gbspan, "googleBooks-link"); + + gba.setAttribute( + 'href', + data[i].info_url + ); + removeCSSClass( gbspan, 'hide_me' ); + } +} + +/* display the record info in the record display table 'pos' is the + zero based position the record should have in the display table */ +function resultDisplayRecord(rec, pos, is_mr) { + + fieldmapper.IDL.load(['mvr']); + if(rec == null) rec = new mvr(); /* so the page won't die if there was an error */ + recordsHandled++; + recordsCache.push(rec); + + var r = table.rows[pos + 1]; + var currentISBN = cleanISBN(rec.isbn()); + + if (googleBooksLink) { + var gbspan = $n(r, "googleBooksLink"); + if (currentISBN) { + gbspan.setAttribute( + 'name', + gbspan.getAttribute('name') + '-' + currentISBN + ); + + if (isbnList) isbnList += ', '; + isbnList += currentISBN; + } + } + + if (currentISBN && chilifresh && chilifresh != '(none)') { + var cfrow = $n(r, "chilifreshReview"); + if (cfrow) { + removeCSSClass( cfrow, 'hide_me' ); + } + var cflink = $n(r, "chilifreshReviewLink"); + if (cflink) { + cflink.setAttribute( + 'id', + 'isbn_' + currentISBN + ); + } + var cfdiv = $n(r, "chilifreshReviewResult"); + if (cfdiv) { + cfdiv.setAttribute( + 'id', + 'chili_review_' + currentISBN + ) + } + } + +/* + try { + var rank = parseFloat(ranks[pos + getOffset()]); + rank = parseInt( rank * 100 ); + var relspan = $n(r, "relevancy_span"); + relspan.appendChild(text(rank)); + unHideMe(relspan.parentNode); + } catch(e){ } +*/ + + var pic = $n(r, config.names.result.item_jacket); + pic.setAttribute("src", buildISBNSrc(currentISBN)); + + var title_link = $n(r, config.names.result.item_title); + var author_link = $n(r, config.names.result.item_author); + + var onlyrec; + if( is_mr ) { + onlyrec = onlyrecord[ getOffset() + pos ]; + if(onlyrec) { + buildunAPISpan($n(r,'unapi'), 'biblio-record_entry', onlyrec); + + var args = {}; + args.page = RDETAIL; + args[PARAM_OFFSET] = 0; + args[PARAM_RID] = onlyrec; + args[PARAM_MRID] = rec.doc_id(); + pic.parentNode.setAttribute("href", buildOPACLink(args)); + title_link.setAttribute("href", buildOPACLink(args)); + title_link.appendChild(text(normalize(truncate(rec.title(), 65)))); + + } else { + buildunAPISpan($n(r,'unapi'), 'metabib-metarecord', rec.doc_id()); + + buildTitleLink(rec, title_link); + var args = {}; + args.page = RRESULT; + args[PARAM_OFFSET] = 0; + args[PARAM_MRID] = rec.doc_id(); + pic.parentNode.setAttribute("href", buildOPACLink(args)); + } + + if (enableHoldsOnAvailable) { + unHideMe($n(r,'place_hold_span')); + $n(r,'place_hold_link').setAttribute( + 'href','javascript:holdsDrawEditor({record:"'+rec.doc_id()+'",type:"M"});'); + } + + } else { + onlyrec = rec.doc_id(); + buildunAPISpan($n(r,'unapi'), 'biblio-record_entry', rec.doc_id()); + + buildTitleDetailLink(rec, title_link); + var args = {}; + args.page = RDETAIL; + args[PARAM_OFFSET] = 0; + args[PARAM_RID] = rec.doc_id(); + pic.parentNode.setAttribute("href", buildOPACLink(args)); + + if (enableHoldsOnAvailable) { + unHideMe($n(r,'place_hold_span')); + $n(r,'place_hold_link').setAttribute( + 'href','javascript:holdsDrawEditor({record:"'+rec.doc_id()+'",type:"T"});'); + } + + } + + buildSearchLink(STYPE_AUTHOR, rec.author(), author_link); + + if(! is_mr ) { + + $n(r, "recid_holder").appendChild( text( rec.doc_id()) ); + if(!isNull(rec.edition())) { + unHideMe( $n(r, "result_table_extra_span")); + $n(r, "result_table_edition_span").appendChild( text( rec.edition()) ); + } + if(!isNull(rec.pubdate())) { + unHideMe( $n(r, "result_table_extra_span")); + unHideMe($n(r, "result_table_pub_span")); + $n(r, "result_table_pub_span").appendChild( text( rec.pubdate() )); + } + if(!isNull(rec.publisher()) ) { + unHideMe( $n(r, "result_table_extra_span")); + unHideMe($n(r, "result_table_pub_span")); + $n(r, "result_table_pub_span").appendChild( text( " " + rec.publisher() )); + } + + if(!isNull(rec.physical_description()) ) { + unHideMe( $n(r, "result_table_extra_span")); + var t = " " + rec.physical_description(); + //$n(r, "result_table_phys_span").appendChild( text(t.replace(/:.*/g,''))); + $n(r, "result_table_phys_span").appendChild( text(t)); + } + + } + + resultBuildFormatIcons( r, rec, is_mr ); + + var bt_params = { + sync : false, + root : r, + subObjectLimit : 10, + org_unit : findOrgUnit(getLocation()).shortname(), + depth : getDepth() + }; + + if (!is_mr) { + bt_params = dojo.mixin( bt_params, { record : onlyrec } ); + } else { + bt_params = dojo.mixin( bt_params, { metarecord : onlyrec } ); + } + + if (findOrgType(findOrgUnit(getLocation()).ou_type()).can_have_vols()) + unHideMe($n(r,'local_callnumber_list')); + + new openils.BibTemplate( bt_params ).render(); + + unHideMe(r); + + runEvt("result", "recordDrawn", rec.doc_id(), title_link); + + /* + if(resultPageIsDone()) { + runEvt('result', 'allRecordsReceived', recordsCache); + } + */ +} + +function _resultFindRec(id) { + for( var i = 0; i != recordsCache.length; i++ ) { + var rec = recordsCache[i]; + if( rec && rec.doc_id() == id ) + return rec; + } + return null; +} + + +function resultBuildFormatIcons( row, rec, is_mr ) { + + var ress = rec.types_of_resource(); + + for( var i in ress ) { + + var res = ress[i]; + if(!res) continue; + + var link = $n(row, res + "_link"); + link.title = res; + var img = link.getElementsByTagName("img")[0]; + removeCSSClass( img, config.css.dim ); + + var f = getForm(); + if( f != "all" ) { + if( f == modsFormatToMARC(res) ) + addCSSClass( img, "dim2_border"); + } + + var args = {}; + args[PARAM_OFFSET] = 0; + + if(is_mr) { + args.page = RRESULT; + args[PARAM_TFORM] = modsFormatToMARC(res); + args[PARAM_MRID] = rec.doc_id(); + + } else { + args.page = RDETAIL + args[PARAM_RID] = rec.doc_id(); + } + + link.setAttribute("href", buildOPACLink(args)); + + } +} + +function fetchGoogleBooksLink () { + if (allRecordsReceivedAndProcessed) { return; } + + if (isbnList && googleBooksLink) { + var scriptElement = document.createElement("script"); + scriptElement.setAttribute("id", "jsonScript"); + scriptElement.setAttribute("src", + "http://books.google.com/books?bibkeys=" + + escape(isbnList) + "&jscmd=viewapi&callback=unhideGoogleBooksLink"); + scriptElement.setAttribute("type", "text/javascript"); + // make the request to Google Book Search + document.documentElement.firstChild.appendChild(scriptElement); + } +} + +function fetchChiliFreshReviews() { + if (chilifresh && chilifresh != '(none)') { + try { chili_init(); } catch(E) { console.log(E + '\n'); } + } +} + +function resultPageIsDone(pos) { + + return (recordsHandled == getDisplayCount() + || recordsHandled + getOffset() == getHitCount()); +} + +var resultCCHeaderApplied = false; + +/* -------------------------------------------------------------------- */ +/* dynamically add the copy count rows based on the org type 'countsrow' + is the row into which we will add TD's to hold the copy counts + This code generates copy count cells with an id of + 'copy_count_cell__' */ +function resultAddCopyCounts(rec, pagePosition) { + + var r = table.rows[pagePosition + 1]; + var countsrow = $n(r, config.names.result.counts_row ); + var ccell = $n(countsrow, config.names.result.count_cell); + + var nodes = orgNodeTrail(findOrgUnit(getLocation())); + var start_here = 0; + var orgHiding = checkOrgHiding(); + if (orgHiding) { + for (var i = 0; i < nodes.length; i++) { + if (orgHiding.depth == findOrgDepth(nodes[i])) { + start_here = i; + } + } + } + + var node = nodes[start_here]; + var type = findOrgType(node.ou_type()); + ccell.id = "copy_count_cell_" + type.depth() + "_" + pagePosition; + ccell.title = type.opac_label(); + //addCSSClass(ccell, config.css.result.cc_cell_even); + + var lastcell = ccell; + var lastheadcell = null; + + var cchead = null; + var ccheadcell = null; + if(!resultCCHeaderApplied && !getLasso()) { + ccrow = $('result_thead_row'); + ccheadcell = ccrow.removeChild($n(ccrow, "result_thead_ccell")); + var t = ccheadcell.cloneNode(true); + lastheadcell = t; + t.appendChild(text(type.opac_label())); + ccrow.appendChild(t); + resultCCHeaderApplied = true; + } + + if(nodes[start_here+1]) { + + var x = start_here+1; + var d = findOrgDepth(nodes[start_here+1]); + var d2 = findOrgDepth(nodes[nodes.length -1]); + + for( var i = d; i <= d2 ; i++ ) { + + ccell = ccell.cloneNode(true); + + //if((i % 2)) removeCSSClass(ccell, "copy_count_cell_even"); + //else addCSSClass(ccell, "copy_count_cell_even"); + + var node = nodes[x++]; + var type = findOrgType(node.ou_type()); + + ccell.id = "copy_count_cell_" + type.depth() + "_" + pagePosition; + ccell.title = type.opac_label(); + countsrow.insertBefore(ccell, lastcell); + lastcell = ccell; + + if(ccheadcell) { + var t = ccheadcell.cloneNode(true); + t.appendChild(text(type.opac_label())); + ccrow.insertBefore(t, lastheadcell); + lastheadcell = t; + } + } + } + + unHideMe($("search_info_table")); +} + +/* collect copy counts for a record using method 'methodName' */ +function resultCollectCopyCounts(rec, pagePosition, methodName) { + if(rec == null || rec.doc_id() == null) return; + + var loc = getLasso(); + if (loc) loc = -loc; + else loc= getLocation(); + + var req = new Request(methodName, loc, rec.doc_id(), getForm() ); + req.request.userdata = [ rec, pagePosition ]; + req.callback(resultHandleCopyCounts); + req.send(); +} + +function resultHandleCopyCounts(r) { + runEvt('result', 'copyCountsReceived', r.userdata[0], r.userdata[1], r.getResultObject()); +} + + +/* XXX Needs to understand Lasso copy counts... */ +/* display the collected copy counts */ +function resultDisplayCopyCounts(rec, pagePosition, copy_counts) { + if(copy_counts == null || rec == null) return; + + if (getLasso()) { + var copy_counts_lasso = { + transcendant : null, + count : 0, + unshadow : 0, + available : 0, + depth : -1, + org_unit : getLasso() + }; + + for (var i in copy_counts) { + copy_counts_lasso.transcendant = copy_counts[i].transcendant; + copy_counts_lasso.count += parseInt(copy_counts[i].count); + copy_counts_lasso.unshadow += parseInt(copy_counts[i].unshadow); + copy_counts_lasso.available += parseInt(copy_counts[i].available); + } + + copy_counts = [ copy_counts_lasso ]; + } + + var i = 0; + while(copy_counts[i] != null) { + var cell = $("copy_count_cell_" + i +"_" + pagePosition); + if (cell) { + var cts = copy_counts[i]; + cell.appendChild(text(cts.available + " / " + cts.count)); + + if (!enableHoldsOnAvailable && (i == (copy_counts.length - 1))) { + var resultTBody = findParentByNodeName(cell, 'TBODY'); + if (cts.available == 0 && cts.count > 0 && !metarecords) { + dojo.query('[name="place_hold_span"]', resultTBody).removeClass('hide_me'); + } else { + dojo.query('[name="place_hold_span"]', resultTBody).addClass('hide_me'); + } + } + + if(isXUL()) { + /* here we style opac-invisible records for xul */ + + if( cts.depth == 0 ) { + if(cts.transcendant == null && cts.unshadow == 0) { + _debug("found an opac-shadowed record: " + rec.doc_id()); + var row = cell.parentNode.parentNode.parentNode.parentNode.parentNode; + if( cts.count == 0 ) + addCSSClass( row, 'no_copies' ); + else + addCSSClass( row, 'shadowed' ); + } + } + } + } + i++; + } +} + + diff --git a/Open-ILS/web/opac/skin/algoma/xml/common/css_common.xml b/Open-ILS/web/opac/skin/algoma/xml/common/css_common.xml new file mode 100644 index 0000000000..8ab107dc09 --- /dev/null +++ b/Open-ILS/web/opac/skin/algoma/xml/common/css_common.xml @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + diff --git a/Open-ILS/web/opac/skin/algoma/xml/common/logo.xml b/Open-ILS/web/opac/skin/algoma/xml/common/logo.xml new file mode 100644 index 0000000000..3c841efec2 --- /dev/null +++ b/Open-ILS/web/opac/skin/algoma/xml/common/logo.xml @@ -0,0 +1,4 @@ +
+ + +
diff --git a/Open-ILS/web/opac/skin/algoma/xml/footer.xml b/Open-ILS/web/opac/skin/algoma/xml/footer.xml new file mode 100644 index 0000000000..fe20f94cd9 --- /dev/null +++ b/Open-ILS/web/opac/skin/algoma/xml/footer.xml @@ -0,0 +1,48 @@ + diff --git a/Open-ILS/web/opac/skin/algoma/xml/home/homesearch.xml b/Open-ILS/web/opac/skin/algoma/xml/home/homesearch.xml new file mode 100644 index 0000000000..5f6f1aeeb9 --- /dev/null +++ b/Open-ILS/web/opac/skin/algoma/xml/home/homesearch.xml @@ -0,0 +1,135 @@ + + + + + + + + diff --git a/Open-ILS/web/opac/skin/algoma/xml/rdetail/rdetail_summary.xml b/Open-ILS/web/opac/skin/algoma/xml/rdetail/rdetail_summary.xml new file mode 100644 index 0000000000..dc618fb815 --- /dev/null +++ b/Open-ILS/web/opac/skin/algoma/xml/rdetail/rdetail_summary.xml @@ -0,0 +1,530 @@ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+
&opac.image_provided;
+ +
+
&common.title; + +
&common.alternate.title; + +
&common.former.title; + +
&common.author; + +
&common.author; + +
&common.corporate.author; + +
&common.meeting.name; + +
&common.isbn; + +
&common.issn; + +
&common.edition; + +
&common.pubdate;
&common.publisher; + +
&common.physical;
&common.format; + + +
&rdetail.detailMain.abstract; + +
&common.subject.600; + +
&common.subject.610; + +
&common.subject.611; + +
&common.subject.630; + +
&common.subject.648; + +
&common.subjects; + +
&common.subject.651; + +
&common.subject.653; + +
&common.subject.654; + +
&common.subject.655; + +
&common.subject.656; + +
&common.subject.657; + +
&common.subject.658; + +
&common.subject.662; + +
&common.general.note; + +
&common.contents.note; + +
&common.usage.restrictions; + +
&common.performer.note; + +
&common.additional.authors; + +
&common.preceding.entry; + +
&common.succeeding.entry; + +
&rdetail.summary.online; + +
&rdetail.summary.issues_held; + ${holdingsStatement} + +
+ + + +
+ diff --git a/Open-ILS/web/opac/skin/algoma/xml/result/result_table.xml b/Open-ILS/web/opac/skin/algoma/xml/result/result_table.xml new file mode 100644 index 0000000000..84acae1bc3 --- /dev/null +++ b/Open-ILS/web/opac/skin/algoma/xml/result/result_table.xml @@ -0,0 +1,415 @@ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
+ + + +
+ + + | + | + + + +
+
+ + + +
+ + + + + + + 0) { + try { + var ses = new OpenSRF.ClientSession('open-ils.resolver'); + var req = ses.request('open-ils.resolver.resolve_holdings.raw', 'issn', issn, 'http://sfx.scholarsportal.info/algoma'); + req.oncomplete = function(r) { + var resolverInfo = ""; + dojo.forEach(r.recv().content(), function(entry) { + resolverInfo = entry.public_name + "_" + entry.target_coverage; + if (title_list.indexOf(this_title_id) == -1) { + url_list = ""; + } + if (url_list.indexOf(resolverInfo) == -1) { + var resolverNode = null; + dojo.query('.recid').forEach(function(recinfo) { + if (parseFloat(dojo.trim(BT.textContent(recinfo))) == parseFloat(this_title_id)) { + resolverNode = recinfo; + } + }); + url_list += resolverInfo; + var output = null; + if (resolverNode != null) { + var parent = resolverNode.parentNode; + if (parent) { + parent = parent.parentNode; + } + if (parent) { + dojo.removeClass(parent,'hide_me'); + } + output = dojo.create('div',{"style":"background-color:#EEFFEE;"},resolverNode,"last"); + dojo.addClass(output,"result_table_sfx_cell"); + title_list += this_title_id; + var link = dojo.create('a', {"style": "margin-left: 1em;", "class":"search_link", "href": entry.target_url}); + var link_text = dojo.doc.createTextNode( entry.public_name); + link.appendChild(link_text); + output.appendChild(link); + var coverage_text = dojo.doc.createTextNode(' - ' + entry.target_coverage + + (entry.target_embargo ? (' / ' + entry.target_embargo) : '')); + output.appendChild(coverage_text); + resolved[this_title_id] = true; + } + } + }); + }; + req.send(); + } catch (err) { alert(err.message);} + } + ]]> + + + + = max_items) { + return output.innerHTML; + } + dojo.query('copy', vol).forEach(function (cp) { + if (cp.getAttribute('deleted') == 't') { + return; + } + var cp_entry = dojo.create('div'); + var loc_id; + var vol_appended = false; + dojo.query('location', cp).forEach(function (location) { + loc_id = parseInt(location.getAttribute('ident')); + if (loc_id != 8 && loc_id != 20 && loc_id != 185 && loc_id != 156) { + if (!vol_appended) { + var cn = dojo.create('span', { style: "font-weight: bold;" }, cp_entry); + var cn_txt = dojo.doc.createTextNode(vol.getAttribute('label')); + cn.appendChild(cn_txt); + vol_appended = true; + } + var loc = dojo.create('span', { "style": "font-weight: bold;"}, cp_entry); + var loc_txt = dojo.doc.createTextNode(' - ' + BT.textContent(location)); + loc.appendChild(loc_txt); + } + }); + if (loc_id == 8 || loc_id == 20 || loc_id == 185 || loc_id == 156) { + return; + } + dojo.query('circ_lib', cp).forEach(function (circ_lib) { + var cp_lib = dojo.create('span', { "style": "font-weight: bold;" }, cp_entry, "first"); + var cp_lib_txt = dojo.doc.createTextNode(circ_lib.getAttribute('name') + ' - '); + cp_lib.appendChild(cp_lib_txt); + }); + dojo.query('status', cp).forEach(function (status) { + var cp_status = dojo.create('span', { "style": "font-weight: bold;" }, cp_entry); + var cp_status_txt = dojo.doc.createTextNode(' (' + BT.textContent(status) + ')'); + cp_status.appendChild(cp_status_txt); + }); + + item_cnt++; + if (item_cnt >= max_items) { + dojo.create('br', null, cp_entry); + cp_entry.appendChild(dojo.doc.createTextNode('... more print items listed in full record')); + } + output.appendChild(cp_entry); + }); + }); + + return output.innerHTML; + ]]> + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + &common.relevancy; + + + + &opac.holds.placeHold; + + + + + + + + + + &result.googleBooks.browse; + + + +
+
+ + + + + + + + + + + + + +
+ + + &common.results; + + - + + &common.ofAtLeast; + + (page + + &common.of; + + + + + &rdetail.start;&rdetail.page.previous.symbol; + + + &rdetail.page.next.symbol; + + + + + +
+ + + + + + + + + + + + + + + +
+ diff --git a/Open-ILS/web/opac/skin/default/js/copy_details.js b/Open-ILS/web/opac/skin/default/js/copy_details.js index e5c50c0939..9d3b4070f2 100644 --- a/Open-ILS/web/opac/skin/default/js/copy_details.js +++ b/Open-ILS/web/opac/skin/default/js/copy_details.js @@ -255,6 +255,7 @@ function cpdDrawCopy(r) { } } + if( copy.age_protect() ) appendClear($n(row, 'age_protect_value'), text(copy.age_protect().name())); @@ -279,7 +280,7 @@ function cpdDrawCopy(r) { if( copy.circulations() ) { circ = copy.circulations()[0]; if( circ ) { - var due_time = dojo.date.stamp.fromISOString(circ.due_date()); + var due_time = dojo.date.stamp.fromISOString(circ.due_date().replace(/(T\d\d:\d\d:\d\d)([+-]\d\d)(\d)/, "$1$2:$3")); if( showDueTime ) { $n(row, 'copy_due_date').appendChild(text(dojo.date.locale.format(due_time, {"formatLength": "medium"}))); } else { diff --git a/Open-ILS/web/opac/skin/default/js/myopac.js b/Open-ILS/web/opac/skin/default/js/myopac.js index 692a5f4cfd..16645407f6 100644 --- a/Open-ILS/web/opac/skin/default/js/myopac.js +++ b/Open-ILS/web/opac/skin/default/js/myopac.js @@ -13,7 +13,7 @@ var holdStatusCache = {}; var showHoldQueuePosition = false; var allowPendingAddr = false; var myopacEnableRefWorks = false; -var myopacRefWorksHost = 'http://www.refworks.com'; +var myopacRefWorksHost = 'http://refworks.scholarsportal.info'; function clearNodes( node, keepArray ) { if(!node) return; @@ -1628,7 +1628,7 @@ function myopacProcessHolds(action, thawDate) { switch(action) { case 'cancel': - req = new Request(CANCEL_HOLD, G.user.session, hold.id(), /* Patron via OPAC */ 6); + req = new Request(CANCEL_HOLD, G.user.session, hold.id(), /* Patron via OPAC */ 6); break; case 'thaw': diff --git a/Open-ILS/web/opac/skin/default/js/rdetail.js b/Open-ILS/web/opac/skin/default/js/rdetail.js index 4b2ceb1ca9..facce536f3 100644 --- a/Open-ILS/web/opac/skin/default/js/rdetail.js +++ b/Open-ILS/web/opac/skin/default/js/rdetail.js @@ -13,8 +13,9 @@ var rdetailShowLocal = true; var rdetailShowCopyLocation = true; var rdetailGoogleBookPreview = true; var rdetailDisplaySerialHoldings = true; -var rdetailEnableRefWorks = false; -var rdetailRefWorksHost = 'http://www.refworks.com'; +var rdetailEnableRefWorks = true; +var rdetailRefWorksHost = 'http://refworks.scholarsportal.info'; +var enableHoldsOnAvailable = false; /* vars vars vars */ var record = null; @@ -386,9 +387,13 @@ function _rdetailDraw(r) { runEvt('rdetail', 'recordRetrieved', record.doc_id()); + var currentISBN = cleanISBN(record.isbn()); + G.ui.rdetail.title.appendChild(text(record.title())); buildSearchLink(STYPE_AUTHOR, record.author(), G.ui.rdetail.author); - G.ui.rdetail.isbn.appendChild(text(cleanISBN(record.isbn()))); + if (currentISBN) { + G.ui.rdetail.isbn.appendChild(text(currentISBN)); + } G.ui.rdetail.edition.appendChild(text(record.edition())); G.ui.rdetail.pubdate.appendChild(text(record.pubdate())); G.ui.rdetail.publisher.appendChild(text(record.publisher())); @@ -400,11 +405,18 @@ function _rdetailDraw(r) { } G.ui.rdetail.abstr.appendChild(text(record.synopsis())); + if (enableHoldsOnAvailable) { + unHideMe($('rdetail_place_hold')); + } else { + hideMe($('rdetail_place_hold')); + rdetailCheckAvailable(); + } + try{ if(record.isbn()) { if(ENABLE_ADDED_CONTENT_ATTRIB_LINKS) { unHideMe($('rdetail.jacket_attrib_div')); - var href = $('rdetail.jacket_attrib_link').getAttribute('href') +cleanISBN(record.isbn()); + var href = $('rdetail.jacket_attrib_link').getAttribute('href') +currentISBN; $('rdetail.jacket_attrib_link').setAttribute('href', href); } rdetailCheckForGBPreview(); @@ -485,8 +497,11 @@ function _rdetailDraw(r) { unHideMe($('rdetail_exp_refworks_span')); } - $('rdetail_img_link').setAttribute('href', buildISBNSrc(cleanISBN(record.isbn()), 'large')); - G.ui.rdetail.image.setAttribute("src", buildISBNSrc(cleanISBN(record.isbn()))); + + if (currentISBN) { + $('rdetail_img_link').setAttribute('href', buildISBNSrc(currentISBN, 'large')); + G.ui.rdetail.image.setAttribute("src", buildISBNSrc(currentISBN, 'medium')); + } runEvt("rdetail", "recordDrawn"); recordsCache.push(record); @@ -502,10 +517,11 @@ function _rdetailDraw(r) { // grab added content - // Proxied through Evergreen AddedContent module - acCollectData(cleanISBN(record.isbn()), rdetailhandleAC); - var currentISBN = cleanISBN(record.isbn()); + // Proxied through Evergreen AddedContent module + if (currentISBN) { + acCollectData(currentISBN, rdetailhandleAC); + } // Not proxied, cross-site javascript @@ -530,7 +546,30 @@ function _rdetailDraw(r) { } } +function rdetailCheckAvailable() { + var loc = getLocation(); + var rid = getRid(); + var req = new Request( 'open-ils.search:open-ils.search.biblio.record.copy_count', loc, rid ); + req.callback(rdetailEnableHold); + req.send(); +} +/* + * Display the "Place Hold" link if: + * * the current location holds at least one copy and + * * none of those copies are available + */ +function rdetailEnableHold(r) { + var ccDepths = r.getResultObject(); + if ( + ((ccDepths[(ccDepths.length - 1)].available) > 0) || + ((ccDepths[(ccDepths.length - 1)].count) == 0) + ) { + hideMe($('rdetail_place_hold')); + } else { + unHideMe($('rdetail_place_hold')); + } +} function rdetailCheckDeleted(r) { var br = r.getResultObject()[0]; diff --git a/Open-ILS/web/opac/skin/default/js/result_common.js b/Open-ILS/web/opac/skin/default/js/result_common.js index 7ac3f64329..11bb9208c2 100644 --- a/Open-ILS/web/opac/skin/default/js/result_common.js +++ b/Open-ILS/web/opac/skin/default/js/result_common.js @@ -7,6 +7,29 @@ var recordsCache = []; var lowHitCount = 4; var isbnList = ''; var googleBooksLink = true; +var enableHoldsOnAvailable = false; +var enableExtraSearchesLowHits = false; +var localProxyPrefix = ''; + +/* an array of the extra services to which we want to direct people, in order of priority: +Properties: + url: will be proxied via localProxyPrefix + description: will be used in the OPAC display + termTransform: a function name that transforms Evergreen compiled searches to the target search format +*/ +var externalSearchServices = [ + { + "url": "http://books.scholarsportal.info/search.html?searchField=All+Fields&limit=full_text&sortBy=relevance&collection=all&searchTerm=", + "description": "Search ScholarsPortal ebooks", + "termTransform": "allKeywords" + }, + { + "url": "http://scholar.google.com/scholar?q=", + "description": "Search Google Scholar", + "termTransform": "allKeywords" + } +]; + var resultFetchAllRecords = false; var resultCompiledSearch = null; @@ -219,6 +242,10 @@ function resultLowHits() { resultSuggestSearchClass(); + if (enableExtraSearchesLowHits) { + resultSuggestExtraSearches(); + } + if(getTerm()) resultExpandSearch(); /* advanced search */ } @@ -263,7 +290,9 @@ function resultZeroHits() { function resultExpandSearch() { var top = findOrgDepth(globalOrgTree); - if(getDepth() == top) return; + + /* We don't want to expand the scope to Everywhere in Conifer, that's just confusing */ + if(getDepth() == top || getDepth() - 1 == top) return; unHideMe($('low_hits_expand_range')); var par = $('low_hits_expand_link').parentNode; var template = par.removeChild($('low_hits_expand_link')); @@ -280,6 +309,33 @@ function resultExpandSearch() { } } +/* Generate links to our extra search services */ +function resultSuggestExtraSearches() { + dojo.forEach(externalSearchServices, function(esItem) { + var extraSearchStuff = this[esItem.termTransform].apply(this, [esItem.url]); + dojo.place("
" + + esItem.description + ": " + extraSearchStuff.displayTerms + "
", "result_low_hits", "child" + ); + }); +} + +/* Transform everything in the Evergreen search to plain old keywords */ +function allKeywords(esUrl) { + var ebook_search = localProxyPrefix + esUrl; + var ebook_terms = ''; + for (var key in resultCompiledSearch.searches) { + ebook_search += resultCompiledSearch.searches[key].term + '+'; + ebook_terms += resultCompiledSearch.searches[key].term + ' '; + } + ebook_search = ebook_search.replace(/ /g, '+'); + ebook_search = ebook_search.replace(/\%20/g, '+'); + ebook_search = ebook_search.replace(/\+$/g, ''); + ebook_terms = ebook_terms.replace(/ $/g, ''); + var extraSuggestion = {"displayTerms": ebook_terms, "searchTerms": ebook_search}; + return extraSuggestion; +} + function resultSuggestSearchClass() { var stype = getStype(); if(stype == STYPE_KEYWORD) return; @@ -541,7 +597,10 @@ function resultDisplayRecord(rec, pos, is_mr) { args[PARAM_RID] = rec.doc_id(); pic.parentNode.setAttribute("href", buildOPACLink(args)); - unHideMe($n(r,'place_hold_span')); + if (enableHoldsOnAvailable) { + unHideMe($n(r,'place_hold_span')); + } + $n(r,'place_hold_link').setAttribute( 'href','javascript:holdsDrawEditor({record:"'+rec.doc_id()+'",type:"T"});'); @@ -803,12 +862,23 @@ function resultDisplayCopyCounts(rec, pagePosition, copy_counts) { } var i = 0; + var metarecords = (findCurrentPage() == MRESULT); + while(copy_counts[i] != null) { var cell = $("copy_count_cell_" + i +"_" + pagePosition); if (cell) { var cts = copy_counts[i]; cell.appendChild(text(cts.available + " / " + cts.count)); + if (!enableHoldsOnAvailable && (i == (copy_counts.length - 1))) { + var resultTBody = findParentByNodeName(cell, 'TBODY'); + if (cts.available == 0 && cts.count > 0 && !metarecords) { + dojo.query('[name="place_hold_span"]', resultTBody).removeClass('hide_me'); + } else { + dojo.query('[name="place_hold_span"]', resultTBody).addClass('hide_me'); + } + } + if(isXUL()) { /* here we style opac-invisible records for xul */ diff --git a/Open-ILS/web/opac/skin/default/xml/common/sidebar.xml b/Open-ILS/web/opac/skin/default/xml/common/sidebar.xml index 39c0a94d9d..eb0833aae2 100644 --- a/Open-ILS/web/opac/skin/default/xml/common/sidebar.xml +++ b/Open-ILS/web/opac/skin/default/xml/common/sidebar.xml @@ -88,10 +88,10 @@ @@ -99,7 +99,18 @@
- &sidebar.copy.not.found; + + + &sidebar.copy.not.found; diff --git a/Open-ILS/web/opac/skin/default/xml/rdetail/rdetail_summary.xml b/Open-ILS/web/opac/skin/default/xml/rdetail/rdetail_summary.xml index e8a186edd2..68b74fc7b5 100644 --- a/Open-ILS/web/opac/skin/default/xml/rdetail/rdetail_summary.xml +++ b/Open-ILS/web/opac/skin/default/xml/rdetail/rdetail_summary.xml @@ -1,15 +1,18 @@ - +
- + + + + + - - - + - + + + + + + + + + + - - + + + + + + + + + + + + + - + + + + + - - - - + + + + + + - + - + @@ -79,50 +156,225 @@ - + - + + - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -186,11 +438,6 @@
+ &common.title; - - + +
&common.alternate.title; + +
&common.former.title; + +
&common.author;
&common.author; + +
&common.corporate.author; + +
&common.meeting.name; + +
&common.isbn; + +
&common.issn; + +
&common.edition;
&common.edition; + +
&common.pubdate;
&common.publisher; + +
&rdetail.detailMain.abstract; + +
&rdetail.summary.subjects; - -
&rdetail.summary.online; - -
&common.subject.600; + +
&common.subject.610; + +
&common.subject.611; + +
&common.subject.630; + +
&common.subject.648; + +
&common.subjects; + +
&common.subject.651; + +
&common.subject.653; + +
&common.subject.654; + +
&common.subject.655; + +
&common.subject.656; + +
&common.subject.657; + +
&common.subject.658; + +
&common.subject.662; + +
&common.general.note; + +
&common.contents.note; + +
&common.usage.restrictions; + +
&common.performer.note; + +
&common.additional.authors; + +
&common.preceding.entry; + +
&common.succeeding.entry; + +
&rdetail.summary.online; + +
&rdetail.summary.issues_held;
- - - - - + +
diff --git a/Open-ILS/web/opac/skin/hrsrh/xml/footer.xml b/Open-ILS/web/opac/skin/hrsrh/xml/footer.xml new file mode 100644 index 0000000000..8a26368c07 --- /dev/null +++ b/Open-ILS/web/opac/skin/hrsrh/xml/footer.xml @@ -0,0 +1,29 @@ + diff --git a/Open-ILS/web/opac/skin/hrsrh/xml/home/homesearch.xml b/Open-ILS/web/opac/skin/hrsrh/xml/home/homesearch.xml new file mode 100644 index 0000000000..14d2b8bab0 --- /dev/null +++ b/Open-ILS/web/opac/skin/hrsrh/xml/home/homesearch.xml @@ -0,0 +1,135 @@ + + + + + + + + diff --git a/Open-ILS/web/opac/skin/lul/css/layout.css b/Open-ILS/web/opac/skin/lul/css/layout.css new file mode 100644 index 0000000000..3297622911 --- /dev/null +++ b/Open-ILS/web/opac/skin/lul/css/layout.css @@ -0,0 +1,253 @@ +body { margin: 6px; } +body { background-color: white; } + +.main_header { width: 100%; } +.space { padding-right:5px; } +.vert_space { padding-top: 82px; width: 100%;} +.right { position:absolute; right: 0px; } +.hide_me { display:none; visibility: hidden; } + +table { border-collapse: collapse; } + +/* generic CSS for a table with data */ +.data_grid { font-weight: 500; border-collapse: collapse;} +.data_grid thead tr { } +.data_grid thead td { padding-right: 5px; padding-left: 5px;} +.data_grid tbody td { padding: 5px; } +.data_grid_center { text-align: center; } + +.data_grid_nb { font-weight: 500; border-collapse: collapse;} +.data_grid_nb thead tr { color: #000000; } +.data_grid_nb thead td { padding-right: 5px; padding-left: 5px;} +.data_grid_nb tbody td { padding: 5px; } + + +.classic_link { text-decoration: underline; color: #003399;} +.classic_link:visited { text-decoration: underline; color: black;} +.classic_link_col { text-decoration: underline; color: red;} + +.encircled { border: 1px solid black; } + + +.adv_quick_search { padding: 3px;} +.adv_quick_search_submit { padding: 3px;} + +.overdue { color: red; font-weight: bold;} + +#main_table { border-collapse: collapse; width: 100%; } +#main_left_cell { width: 20%; vertical-align: top;margin: 0px; padding: 0px;} +#main_right_cell { width: 80%; vertical-align: top; margin: 0px; padding:0px;} + + +#content { min-height: 300px; } + +.canvas { min-height: 300px; padding-left: 4px; -moz-border-radius: 6px;} +#canvas_main { padding-bottom: 4px; } + +#loading_div { width: 100%;} + + + +.shadowed { background: #F0F0E0; } +.no_copies { background: #E0E0E0; } +.overdue_circ { border: 2px dashed #F0D0E0; } + +.org_tree { padding-left: 2px; padding-right: 2px; } +.org_link { padding-right: 15px; } +#org_link_container { margin-bottom: 5px; padding-left: 4px; padding-bottom: 3px; padding-top: 3px; width: 100%; } +#left_div { float:left; width: 20%; } +#statusbar {} + +#frontsearch_table { } +#frontsearch_table tr { margin: 6px; } + +/* ---------------------------------------------------------------------- */ +.sidebar_div { width: 100%; font-size: 9pt; margin-top: 12px; } +.sidebar_header { margin-top: 10px; padding-left: 3px; margin-right: 6px; } + +.sidebar_extra_item { padding: 0px; margin-right: 8px;} +.side_bar_item { padding-left: 8px; padding-right: 8px; padding-top: 4px; padding-bottom: 4px; margin-right: 8px; } + +.sidebar_item_active { margin-right: 0px; } + +.sidebar_chunk { width: 100%; } + +/* ---------------------------------------------------------------------- */ + +#searchbar { margin-top: 22px; width: 100%; } +#searchbar table tr td {font-weight: bold; font-size: 8pt; } +#searchbar select, input { border-collapse: collapse; font-size: 9pt; } +.searchbar_item { margin: 3px; font-size: 9pt; } +.searchbar_label_span { font-size: 9pt; } +#searchbar_table { border-collapse: collapse; } + +.search_box_container { width: 240px; padding: 3px; }/* border: 1px solid #A0A0A0;' class='color_2'>*/ +#search_box { width: 260px; } + + +/* ---------------------------------------------------------------------- */ +#login_box { width: 70%; padding: 5px;} +.login_text { margin-left: 8px; } + +/* ---------------------------------------------------------------------- */ +#result_table_div { text-align: left; width: 100%; } + +#search_nav_links { width: 100%; } +#result_info_box { text-align: left; } +#next_prev_links { padding-left: 2px; padding-right: 2px; text-align: left;} +#goto_page_links { text-align: left; padding-left: 2px; padding-right: 2px;} + +#next_prev_links_dead {padding-left: 5px; padding-right: 5px;} + +#res_table { width: 100%; } + +.result_table_pic_cell { width: 43px;} +.result_table_pic { height: 50px; width: 40px; border: none;} +.result_table_pic_header { width: 43px; } + +.result_table_row { text-align: left; width: 100%;} +.result_table_subtable { width: 100%; border-collapse: collapse; vertical-align: top;} +.result_table_subtbody { height: 100%; width: 100%; } +.result_table_title_cell { text-align: left; } + +.copy_count_cell { width: 12%; vertical-align: middle; text-align: center; } +.copy_count_div { width: 4em; height: 99%; vertical-align: middle; text-align: center; } + +.search_page_nav_link { margin-right: 5px; } + +.np_nav_link { margin-right: 5px; } + +/* ---------------------------------------------------------------------- */ + +#rdetail_detail_main { width: 100%; } +#rdetail_details_table { padding-top: 10px; width: 100%; padding: 30px; border-collapse: collapse;} +.rdetail_header { padding: 3px; padding-left: 10px;} +.rdetail_desc { padding: 2px; padding-left: 2px; padding-right: 2px;} +.rdetail_item { width: 75%; padding-left: 10px; } +#rdetail_image { padding-right: 10px; } +#rdetail_copy_info_table { padding: 4px; width: 100%; border-collapse: collapse; font-size: 8pt; } +#rdetail_copy_info_table td { padding: 3px; } +.rdetail_copy_info_header_cell { padding: 2px; } +.rdetail_copy_count_cell { text-align: center; } + + +.tor_pic { width: 17px; height: 17px; border: none;} + +.dim2_border { border: 1px solid #F06000; -moz-border-radius: 3px;} + +.dim2 { + filter:alpha(opacity=50); + -moz-opacity:0.5; + opacity: 0.5; + text-decoration: none; } + +.dim { + filter:alpha(opacity=10); + -moz-opacity:0.1; + opacity: 0.1; + text-decoration: none; } + +/* ---------------------------------------------------------------------- */ + +.myopac_link { width: 12%; margin: 3px; padding: 3px; text-align: center; vertical-align: middle; } +.myopac_link_active { font-weight: 700;} +.myopac_table thead tr td { padding: 2px; font-weight: 500; border: 1px solid #808080;} +.myopac_table td { padding: 3px; } +.myopac_form_pic { width: 20px; height: 20px; } + +.tips { padding: 2px; text-align: center; border: solid #E0E0E0 3px; -moz-border-radius: 3px; width: 99%; } + +.holds_cell { border: 1px solid #E0E0E0; padding: 5px; width: 50%;} +.myopac_update_cell { border: 3px solid #E0E0E0; width:100%; padding-top: 4px; padding-bottom: 4px;} +.myopac_update_span { padding: 5px;} + +.lowhits_div { width: 100%; border-top: 1px solid #E0E0E0; text-align: center; + padding-top: 8px; padding-bottom: 8px; } + +.rdetail_extras_div { + border-top: 3px solid #E0E0E0;margin-top: 3px; padding-top: 5px; width: 100%;} + +.copy_info_region_row { + padding: 6px; + border: 2px solid #E0E0E0; + font-weight: 600; +} + +.rdetail_extras_td { padding-right: 15px; padding-left: 15px; border-right: 1px solid #888; } +.rdetails_extra_links { border: 1px solid #808080; padding-right: 5px; padding-left: 5px; } + + +.cn_browse_item { height: 190px; } +.cn_browse_info { padding: 4px; border-bottom: 1px dashed #E0E0E0;} + +.bookshelf { + /*background-image: url(http://10.4.0.10/woodgrain.jpeg);*/ + /* + background-image: url(http://dev.gapines.org/opac/images/woodgrain.jpg); + background-repeat: repeat; + */ + border-bottom: 1px solid black; +} + +.cn_browse_loading { width: 95%; padding: 15px; text-align: center; background: #E0F0E0; } + +.cn_browse_home_cn { border: 2px solid #E0F0E0; background: green; font-weight: 700;} + +.rdetail_context_row { background: #F0E0E0; } + +.unadorned_link { text-decoration: none; vertical-align: bottom; } + + +/* ie does not support disabling