Get the Conifer skins into git in bulk
authorDan Scott <dan@coffeecode.net>
Mon, 6 Jun 2011 15:00:12 +0000 (11:00 -0400)
committerDan Scott <dan@coffeecode.net>
Mon, 6 Jun 2011 15:00:12 +0000 (11:00 -0400)
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 <dscott@laurentian.ca>
70 files changed:
Open-ILS/web/opac/images/algoma_logo.png [new file with mode: 0644]
Open-ILS/web/opac/images/algoma_logo_small.png [new file with mode: 0644]
Open-ILS/web/opac/images/conifer_tiny_logo.jpg [new file with mode: 0644]
Open-ILS/web/opac/images/hrsrh_logo.png [new file with mode: 0644]
Open-ILS/web/opac/images/hrsrh_logo_small.png [new file with mode: 0644]
Open-ILS/web/opac/images/lul_logo.png [new file with mode: 0644]
Open-ILS/web/opac/images/lul_logo_small.png [new file with mode: 0644]
Open-ILS/web/opac/images/nosm_logo.png [new file with mode: 0644]
Open-ILS/web/opac/images/nosm_logo_small.png [new file with mode: 0644]
Open-ILS/web/opac/images/sfxinfo.jpg [new file with mode: 0644]
Open-ILS/web/opac/images/sjcg_logo.png [new file with mode: 0644]
Open-ILS/web/opac/images/sjcg_logo_small.png [new file with mode: 0644]
Open-ILS/web/opac/images/uhearst_logo.png [new file with mode: 0644]
Open-ILS/web/opac/images/uhearst_logo_small.png [new file with mode: 0644]
Open-ILS/web/opac/images/uwin_main_logo.png [new file with mode: 0644]
Open-ILS/web/opac/images/uwin_small_logo.png [new file with mode: 0644]
Open-ILS/web/opac/skin/algoma/js/result_common.js [new file with mode: 0644]
Open-ILS/web/opac/skin/algoma/xml/common/css_common.xml [new file with mode: 0644]
Open-ILS/web/opac/skin/algoma/xml/common/logo.xml [new file with mode: 0644]
Open-ILS/web/opac/skin/algoma/xml/footer.xml [new file with mode: 0644]
Open-ILS/web/opac/skin/algoma/xml/home/homesearch.xml [new file with mode: 0644]
Open-ILS/web/opac/skin/algoma/xml/rdetail/rdetail_summary.xml [new file with mode: 0644]
Open-ILS/web/opac/skin/algoma/xml/result/result_table.xml [new file with mode: 0644]
Open-ILS/web/opac/skin/default/js/copy_details.js
Open-ILS/web/opac/skin/default/js/myopac.js
Open-ILS/web/opac/skin/default/js/rdetail.js
Open-ILS/web/opac/skin/default/js/result_common.js
Open-ILS/web/opac/skin/default/xml/common/sidebar.xml
Open-ILS/web/opac/skin/default/xml/rdetail/rdetail_summary.xml
Open-ILS/web/opac/skin/hrsrh/xml/common/css_common.xml [new file with mode: 0644]
Open-ILS/web/opac/skin/hrsrh/xml/common/logo.xml [new file with mode: 0644]
Open-ILS/web/opac/skin/hrsrh/xml/footer.xml [new file with mode: 0644]
Open-ILS/web/opac/skin/hrsrh/xml/home/homesearch.xml [new file with mode: 0644]
Open-ILS/web/opac/skin/lul/css/layout.css [new file with mode: 0644]
Open-ILS/web/opac/skin/lul/js/result_common.js [new file with mode: 0644]
Open-ILS/web/opac/skin/lul/xml/common/css_common.xml [new file with mode: 0644]
Open-ILS/web/opac/skin/lul/xml/common/logo.xml [new file with mode: 0644]
Open-ILS/web/opac/skin/lul/xml/footer.xml [new file with mode: 0644]
Open-ILS/web/opac/skin/lul/xml/home/homesearch.xml [new file with mode: 0644]
Open-ILS/web/opac/skin/lul/xml/rdetail/rdetail_summary.xml [new file with mode: 0644]
Open-ILS/web/opac/skin/lul/xml/result/result_table.xml [new file with mode: 0644]
Open-ILS/web/opac/skin/nosm/xml/common/css_common.xml [new file with mode: 0644]
Open-ILS/web/opac/skin/nosm/xml/common/logo.xml [new file with mode: 0644]
Open-ILS/web/opac/skin/nosm/xml/home/homesearch.xml [new file with mode: 0644]
Open-ILS/web/opac/skin/sjcg/xml/common/css_common.xml [new file with mode: 0644]
Open-ILS/web/opac/skin/sjcg/xml/common/logo.xml [new file with mode: 0644]
Open-ILS/web/opac/skin/sjcg/xml/home/homesearch.xml [new file with mode: 0644]
Open-ILS/web/opac/skin/uhearst/xml/common/css_common.xml [new file with mode: 0644]
Open-ILS/web/opac/skin/uhearst/xml/common/logo.xml [new file with mode: 0644]
Open-ILS/web/opac/skin/uhearst/xml/footer.xml [new file with mode: 0644]
Open-ILS/web/opac/skin/uhearst/xml/home/homesearch.xml [new file with mode: 0644]
Open-ILS/web/opac/skin/uwin/css/layout.css [new file with mode: 0644]
Open-ILS/web/opac/skin/uwin/js/rdetail.js [new file with mode: 0644]
Open-ILS/web/opac/skin/uwin/js/result_common.js [new file with mode: 0644]
Open-ILS/web/opac/skin/uwin/xml/common/css_common.xml [new file with mode: 0644]
Open-ILS/web/opac/skin/uwin/xml/common/libselect.xml [new file with mode: 0644]
Open-ILS/web/opac/skin/uwin/xml/common/login.xml [new file with mode: 0644]
Open-ILS/web/opac/skin/uwin/xml/common/logo.xml [new file with mode: 0644]
Open-ILS/web/opac/skin/uwin/xml/footer.xml [new file with mode: 0644]
Open-ILS/web/opac/skin/uwin/xml/home/homesearch.xml [new file with mode: 0644]
Open-ILS/web/opac/skin/uwin/xml/rdetail/rdetail_summary.xml [new file with mode: 0644]
Open-ILS/web/opac/skin/uwin/xml/result/result_info.xml [new file with mode: 0644]
Open-ILS/web/opac/skin/uwin/xml/result/result_table.xml [new file with mode: 0644]
Open-ILS/web/opac/theme/algoma/css/colors.css [new file with mode: 0644]
Open-ILS/web/opac/theme/hrsrh/css/colors.css [new file with mode: 0644]
Open-ILS/web/opac/theme/lul/css/colors.css [new file with mode: 0644]
Open-ILS/web/opac/theme/nosm/css/colors.css [new file with mode: 0644]
Open-ILS/web/opac/theme/sjcg/css/colors.css [new file with mode: 0644]
Open-ILS/web/opac/theme/uhearst/css/colors.css [new file with mode: 0644]
Open-ILS/web/opac/theme/uwin/css/colors.css [new file with mode: 0644]

diff --git a/Open-ILS/web/opac/images/algoma_logo.png b/Open-ILS/web/opac/images/algoma_logo.png
new file mode 100644 (file)
index 0000000..87e4d0f
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 (file)
index 0000000..36bb304
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 (file)
index 0000000..e81c2a1
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 (file)
index 0000000..31e211c
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 (file)
index 0000000..59de781
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 (file)
index 0000000..867951c
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 (file)
index 0000000..db617a8
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 (file)
index 0000000..df4223e
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 (file)
index 0000000..4851f95
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 (file)
index 0000000..d554589
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 (file)
index 0000000..79ab4e4
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 (file)
index 0000000..1676076
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 (file)
index 0000000..e423bb5
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 (file)
index 0000000..2539e07
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 (file)
index 0000000..abf09a1
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 (file)
index 0000000..25df42f
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 (file)
index 0000000..b2d727a
--- /dev/null
@@ -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("<div style='text-align: center; width: 100%; margin-left: auto; margin-right: auto;'><strong>" +
+            esItem.description + "</strong>: <a class='classic_link' href='" +
+            extraSearchStuff.searchTerms + "'>" + extraSearchStuff.displayTerms + "</a><div>", "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_<depth>_<pagePosition>'  */
+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 (file)
index 0000000..8ab107d
--- /dev/null
@@ -0,0 +1,23 @@
+<!-- CSS shared across pages goes here --> 
+
+<link type='text/css' rel='stylesheet' href="<!--#echo var='OILS_SKIN_BASE'-->/default/css/layout.css"/>
+
+<!-- Our font CSS's -->
+<link type='text/css' rel='stylesheet' href='<!--#echo var="OILS_CSS_BASE"-->/mediumfont.css' />
+
+<!-- Our colors -->
+<link type='text/css' rel="stylesheet" href="<!--#echo var='OILS_THEME_BASE'-->/algoma/css/colors.css" />
+
+<!-- An alternate stylesheet -->
+<link type='text/css' rel="alternate stylesheet" title='&opac.style.reddish;' href="<!--#echo var='OILS_THEME_BASE'-->/reddish/css/colors.css" />
+
+<!-- OpenSearch auto discovery -->
+<link type="application/opensearchdescription+xml"
+       rel='search' title="Algoma University Library"
+       href="http://<!--#echo var='SERVER_NAME'-->/opac/extras/opensearch/1.1/OSTMA/OSTMA/osd.xml" />
+
+<!-- enable Dojo date picker -->
+<style type="text/css">
+       @import '/js/dojo/dojo/resources/dojo.css';
+       @import '/js/dojo/dijit/themes/tundra/tundra.css';
+</style>
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 (file)
index 0000000..3c841ef
--- /dev/null
@@ -0,0 +1,4 @@
+<div id='logo_div'>
+       <script language='javascript' type='text/javascript'>config.ids.common.top_logo = "top_left_logo";</script>
+       <img style='margin-right: 4px; margin-top: 20px;' src='<!--#echo var="OILS_BASE"-->/images/algoma_logo_small.png' id='top_left_logo' border='0' class='logo' />
+</div>
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 (file)
index 0000000..fe20f94
--- /dev/null
@@ -0,0 +1,48 @@
+<div id='copyright_block'>
+               <div id='footer_links'>
+                               <span class='footer_link'>
+                                       <a class='classic_link'
+                                               href='/opac/<!--#echo var="locale"-->/extras/slimpac/start.html'>&opac.basic;</a>
+                               </span> 
+                               <span> | </span>
+                               <span class='footer_link'>
+                                       <a target='_blank' class='classic_link'
+                                               href='&au.footer.databases.url;'>&au.footer.databases;</a>
+                               </span> 
+                               <span> | </span>
+                               <span class='footer_link'>
+                                       <a target='_blank' class='classic_link'
+                                               href='&au.footer.archives.url;'>&au.footer.archives;</a>
+                               </span>
+                               <span> | </span>
+                               <span class='footer_link'>
+                                       <a target='_blank' class='classic_link'
+                                               href='&au.footer.contact.url;'>&au.footer.contact;</a>
+                               </span>
+                               <span> | </span>
+                               <span class='footer_link'>
+                                       <a target='_blank' class='classic_link' 
+                                               href='&au.footer.library.about.url;'>&au.footer.library.about;</a>
+                               </span>
+                               <span> | </span>
+                               <span class='footer_link'>
+                                       <a target='_blank' class='classic_link' 
+                                               href='&au.footer.library.home.url;'>&au.footer.library.home;</a>
+                               </span>
+                               <span> | </span>
+                               <span class='footer_link'>
+                                       <a target='_blank' class='classic_link' 
+                                               href='&au.footer.library.reserves.url;'>&au.footer.library.reserves;</a>
+                               </span>
+
+
+
+
+               </div>
+        <div id='copyright_text'>
+            <span>&footer.copyright;</span>
+        </div>
+        <div id='footer_logo'>&footer.logo;
+            <a href='http://open-ils.org'><img style='border:none;' src='../../../../images/eg_tiny_logo.jpg'/></a>
+        </div>
+</div>
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 (file)
index 0000000..5f6f1ae
--- /dev/null
@@ -0,0 +1,135 @@
+
+<div id='canvas_main' class='home_search canvas'
+       style='-moz-border-radius: 6px; padding: 6px; margin-top: 65px;' 
+       xmlns="http://www.w3.org/1999/xhtml" xmlns:xi="http://www.w3.org/2001/XInclude">
+
+       <!-- load my js -->
+       <script language='javascript' type='text/javascript'
+               src="<!--#echo var="OILS_OPAC_JS_HOST"-->/skin/default/js/depth_selector.js"> </script>
+       <script language='javascript' type='text/javascript'
+               src="<!--#echo var="OILS_OPAC_JS_HOST"-->/skin/default/js/search_bar.js"> </script>
+
+       <script language='javascript' type='text/javascript'>
+               config.ids.searchbar = {};
+               config.css.searchbar = {};
+               config.ids.searchbar.text                               = 'search_box'; 
+               config.ids.searchbar.submit                     = 'search_submit';      
+               config.ids.searchbar.type_selector      = 'search_type_selector';
+               config.ids.searchbar.depth_selector     = 'depth_selector';
+               config.ids.searchbar.form_selector      = 'form_selector';
+               config.ids.searchbar.extra_row          = 'searchbar_extra';
+               config.ids.searchbar.main_row                   = 'searchbar_main_row';
+               config.ids.searchbar.table                              = 'searchbar_table';
+               config.ids.searchbar.location_tag       = 'search_location_tag_link';
+               config.ids.searchbar.lib_sel_span       = 'lib_selector_span';
+               config.ids.searchbar.lib_sel_link       = 'lib_selector_link';
+               config.ids.searchbar.depth_sel_span     = 'depth_selector_span';
+       </script>
+
+
+       <div style='width: 100%; text-align: center'>
+               <img src='<!--#echo var="OILS_BASE"-->/images/algoma_logo.png' />
+       </div>
+
+       <style>.rowpad { height: 20px; }</style>
+
+       <table id='frontsearch_table' height='100%' width='100%' 
+               style='margin-top: 10px; border-collapse: collapse;'>
+
+               <tbody>
+
+                       <tr class='color_3'>
+
+                               <script language='javascript' type='text/javascript'>
+                                       config.ids.common.now_searching = 'now_searching_location';
+                               </script>
+
+                               <td style='padding: 6px;' class='border_5' align='center'>
+                                       <span>&opac.search.nowSearching;</span>
+                                       <span style='padding: 1px;' id='now_searching_location'>  </span>
+                               </td>
+                       </tr>
+
+
+                       <tr class='rowpad'><td></td></tr>
+
+                       <tr>
+                               <td nowrap='nowrap' align='center' class='color_1 border_5'>
+                                       <input id='search_box' style='width: 300px;' type='text' />
+                                       <span style='padding-left: 6px;'>
+                                               <input type='button' style='width: 40px;' id='search_submit' value='Go!' />
+                                       </span>
+                               </td>
+                       </tr>
+
+                       <tr class='rowpad'><td></td></tr>
+
+                       <tr class='color_3 border_5'>
+
+                               <td nowrap='nowrap' align='center' style='padding: 4px;'>
+
+                                       <span style='padding-right:40px;'>
+                                               <!--#include virtual="../common/stypes_selector.xml"-->
+                                       </span>
+
+                                       <span>
+                                               <!--
+                                               <span>&common.format;: </span>
+                                               -->
+                                               <!--#set var='FORM_SEL_ID' value='form_selector'-->
+                                               <!--#include virtual="../common/format_selector.xml"-->
+                                       </span>
+
+                               </td>
+                       </tr>
+
+                       <tr class='rowpad'><td></td></tr>
+
+                       <tr class='color_1 border_5'>
+                               <td align='center' style='padding: 4px; padding-bottom: 6px;'>
+                                       <span style='padding-right: 15px;'>
+                                               <a id='home_adv_search_link' href='javascript:void(0);'>&opac.navigate.advanced;</a></span>
+                                       <span>
+                                               <span class='hide_me' id='depth_selector_span'>
+                                                       <select id='depth_selector' >
+                                                               <option value='new'>&opac.navigate.selectNewOrg;...</option>
+                                                       </select>
+                                               </span>
+                                               <span class='hide_me' id='lib_selector_span'>
+                                                       <a id='lib_selector_link' href='javascript:void(0)'>&opac.navigate.selectOrg;</a>
+                                               </span>
+                                       </span>
+                                       <span style='padding-left: 15px;'>
+                                               <a id='home_myopac_link' href='javascript:void(0);'>&opac.navigate.myopac;</a>
+                                       </span>
+                               </td>
+                       </tr>
+
+            <!-- locale picker -->
+            <tr><td align='center' valign='bottom' style='padding-top:10px;'>
+                       <span style='vertical-align: top;'>&common.language;</span>
+                       <span dojoType="dijit.form.FilteringSelect" store="openils.I18N.localeStore" 
+                    searchAttr="label" required="false" jsId='opacLocaleSelector'>
+                    <script>
+                        dojo.addOnLoad(function() {
+                            opacLocaleSelector.setValue(locale);
+                            dojo.connect(opacLocaleSelector, 'onChange', 
+                                function () {
+                                                       location.href = location.href.replace(/opac\/[^\/]+\/skin/, 'opac/' + this.getValue() + '/skin');
+                                }
+                            );
+                        });
+                    </script>
+                       </span>
+            </td></tr>
+
+               </tbody>
+       </table>
+
+</div>
+
+
+
+
+
+
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 (file)
index 0000000..dc618fb
--- /dev/null
@@ -0,0 +1,530 @@
+
+<abbr name="unapi" class="unapi-id" title='tag:<!--#echo var="HTTP_HOST"-->,<!--#echo var="OILS_TIME_YEAR"-->:biblio-record_entry/<!--#echo var="OILS_OPAC_RID"-->'></abbr>
+<!-- This holds the record summary information -->
+<div>
+       <!-- Hack to give IE somewhere to put these things; should just rip out from rdetail.js -->
+       <span class='hide_me' id='rdetail_title'></span>
+       <span class='hide_me' id='rdetail_isbn'></span>
+       <span class='hide_me' id='rdetail_publisher'></span>
+       <span class='hide_me' id='rdetail_abstract'></span>
+       <span class='hide_me' id='rdetail_edition'></span>
+       <table id='rdetail_details_table'>
+               <tbody id='rdetail_details_tbody'>
+
+                       <tr>
+                               <td id='rdetail_image_cell' rowspan='40'>
+                                       <a id='rdetail_img_link'>
+                                               <img style='border: none;' id='rdetail_image' 
+                            onerror='
+                                hideMe($("rdetail.jacket_attrib_div"));
+                                hideMe($("rdetail_img_link"));'/>
+                                       </a>
+                    <!-- vendor attribution link -->
+                    <div class='jacket_attrib hide_me' id='rdetail.jacket_attrib_div'>
+                        <div>&opac.image_provided;</div>
+                        <div><a target='_blank' href='&vendor.base_link;' 
+                            class='classic_link' id='rdetail.jacket_attrib_link'>&vendor.name;</a></div>
+                    </div>
+                               </td>
+                               <td nowrap='nowrap' class='rdetail_desc'>&common.title;</td>            
+                                <td type='opac/slot-data' query='datafield[tag=245]' class='rdetail_item'>
+                                         <script type='opac/slot-format'><![CDATA[
+                                               var rdetail_bib_title = BT.textContent(item);
+                                               var title_node = dojo.query('head title');
+                                               dojo.addOnLoad(function() {dojo.place('<title>' + rdetail_bib_title + '</title>', title_node[0], 'replace');});
+                                                return '<span>' + rdetail_bib_title + '</span><br/>';
+                                        ]]></script>
+                                </td>
+                       </tr>
+
+                       <tr class='hide_me' id='tag246'>
+                               <td nowrap='nowrap' class='rdetail_desc'>&common.alternate.title;</td>
+                               <td type='opac/slot-data' query='datafield[tag=246] subfield[code=a]' class='rdetail_item'>
+                                       <script type='opac/slot-format'><![CDATA[
+                                               dojo.query('#tag246').removeClass('hide_me');
+                                               return '<span>' + BT.textContent(item) + '</span><br/>';
+                                       ]]></script>
+                               </td>
+                       </tr>
+                       <tr class='hide_me' id='tag247'>
+                               <td nowrap='nowrap' class='rdetail_desc'>&common.former.title;</td>
+                               <td type='opac/slot-data' query='datafield[tag="247"]' class='rdetail_item'>
+                                       <script type='opac/slot-format'><![CDATA[
+                                               dojo.query('#tag247').removeClass('hide_me');
+                                               return '<span>' + BT.textContent(item) + '</span><br/>';
+                                       ]]></script>
+                               </td>
+                       </tr>
+
+                       <tr class='hide_me'>
+                               <td nowrap='nowrap' class='rdetail_desc'>&common.author;</td>           
+                               <td class='rdetail_item'>
+                                       <a title='&rdetail.author.search;' id='rdetail_author'> </a>
+                               </td>
+                       </tr>
+                       <tr class='hide_me' id='tag100'>
+                               <td nowrap='nowrap' class='rdetail_desc'>&common.author;</td>
+                               <td type='opac/slot-data' query='datafield[tag=100]' class='rdetail_item'>
+                                       <script type='opac/slot-format'><![CDATA[
+                                               dojo.query('#tag100').removeClass('hide_me');
+                                               return '<span>' + BT.textContent(item) + '</span><br/>';
+                                       ]]></script>
+                               </td>
+                       </tr>
+                       <tr class='hide_me' id='tag110'>
+                               <td nowrap='nowrap' class='rdetail_desc'>&common.corporate.author;</td>
+                               <td type='opac/slot-data' query='datafield[tag=110]' class='rdetail_item'>
+                                       <script type='opac/slot-format'><![CDATA[
+                                               dojo.query('#tag110').removeClass('hide_me');
+                                               return '<span>' + BT.textContent(item) + '</span><br/>';
+                                       ]]></script>
+                               </td>
+                       </tr>
+                       <tr class='hide_me' id='tag111'>
+                               <td nowrap='nowrap' class='rdetail_desc'>&common.meeting.name;</td>
+                               <td type='opac/slot-data' query='datafield[tag=111]' class='rdetail_item'>
+                                       <script type='opac/slot-format'><![CDATA[
+                                               dojo.query('#tag111').removeClass('hide_me');
+                                               return '<span>' + BT.textContent(item) + '</span><br/>';
+                                       ]]></script>
+                               </td>
+                       </tr>
+                       <tr class='hide_me' id='tag020'>
+                               <td nowrap='nowrap' class='rdetail_desc'>&common.isbn;</td>                     
+                               <td type='opac/slot-data' query='datafield[tag=020]' class='rdetail_item'>
+                                   <script type='opac/slot-format'><![CDATA[
+                                       dojo.query('#tag020').removeClass('hide_me');
+                                       return '<span>' + BT.textContent(item) + '</span><br/>';
+                                   ]]></script>
+                               </td>
+
+                       </tr>
+                       <tr class='hide_me' id='tag022'>
+                               <td nowrap='nowrap' class='rdetail_desc' id='issn_title'>&common.issn;</td>                     
+                               <td type='opac/slot-data' query='datafield[tag=022]' class='rdetail_item' id='rdetail_issn'>
+                                   <script type='opac/slot-format'><![CDATA[
+                                       dojo.query('#tag022').removeClass('hide_me');
+                                       var issn_raw = dojo.trim(BT.textContent(item));
+
+                                       // textContent returns multiple subfields concatenated with linefeeds,
+                                       // so our regex needs to match against linefeeds. "." does not match
+                                       // linefeeds, so get \s into the mix
+                                        var issn = issn_raw.replace(/^(\s|.)*?(\d{4}).(\d{3,4}[xX]?)(\s|.)*/, "$2-$3");
+
+                                       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 msg;
+                                               dojo.forEach(r.recv().content(), function(entry) {
+                                                       if (first_issn) {
+                                                               dojo.query('#rdetail_online *').orphan();
+                                                               first_issn = false;
+                                                       }
+                                                       dojo.place('<div style="width: 100%">'
+                                                               + ' <a class="search_link" href="' + entry.target_url
+                                                               + '">' + entry.public_name + '</a> - '
+                                                               + entry.target_coverage
+                                                               + (entry.target_embargo ? (' / ' + entry.target_embargo) : '') 
+                                                               + '</div>', 'rdetail_online');
+                                                       dojo.query('#rdetail_online_row').removeClass('hide_me');
+                                               });
+                                       }
+                                       req.send();
+
+                                       return '<span>' + issn + '</span><br/>';
+                                   ]]></script>
+                               </td>
+
+                       </tr>
+
+                       <tr class='hide_me' id='tag250'>
+                               <td nowrap='nowrap' class='rdetail_desc'>&common.edition;</td>
+                               <td type='opac/slot-data' query='datafield[tag=250]' class='rdetail_item'>
+                                   <script type='opac/slot-format'><![CDATA[
+                                       dojo.query('#tag250').removeClass('hide_me');
+                                       return '<span>' + BT.textContent(item) + '</span><br/>';
+                                   ]]></script>
+                           </td>
+                       </tr>
+
+                       <tr class='hide_me'>
+                               <td nowrap='nowrap' class='rdetail_desc'>&common.pubdate;</td>          
+                               <td class='rdetail_item' id='rdetail_pubdate'> </td>
+                       </tr>
+
+                       <tr class='hide_me' id='tag260'>
+                               <td nowrap='nowrap' class='rdetail_desc'>&common.publisher;</td>                
+                               <td type='opac/slot-data' query='datafield[tag=260]' class='rdetail_item'>
+                                   <script type='opac/slot-format'><![CDATA[
+                                       dojo.query('#tag260').removeClass('hide_me');
+                                       return '<span>' + BT.textContent(item) + '</span><br/>';
+                                   ]]></script>
+                           </td> 
+                       </tr>
+
+
+                       <tr>
+                               <td nowrap='nowrap' class='rdetail_desc'>&common.physical;</td>         
+                               <td class='rdetail_item' id='rdetail_physical_desc'> </td>
+                       </tr>
+
+                       <tr>
+                               <td nowrap='nowrap' class='rdetail_desc'>&common.format;</td>                   
+                               <td class='rdetail_item'>
+                                       <img id='rdetail_tor_pic' class='tor_pic' />
+                                       <span id='rdetail_tor' style='padding-left: 5px;'> </span>
+                               </td>
+                       </tr>
+
+                       <tr class='hide_me' id='tag520'>
+                               <td nowrap='nowrap' class='rdetail_desc'>&rdetail.detailMain.abstract;</td>     
+                               <td type='opac/slot-data' query='datafield[tag=520]' class='rdetail_item'>
+                                   <script type='opac/slot-format'><![CDATA[
+                                       dojo.query('#tag520').removeClass('hide_me');
+                                       return '<span>' + BT.textContent(item) + '</span><br/>';
+                                   ]]></script>
+                               </td>
+
+                       </tr>
+
+            <!-- *** Example of how to use the openils.BibTemplate infrastructure to augment the stock
+                 *** summary screen with complex information, such as new search links on subjects. -->
+                <tr class='hide_me' id='tag600'>
+                        <td nowrap='nowrap' class='rdetail_desc'>&common.subject.600;</td>
+                        <td type='opac/slot-data' query='datafield[tag^=600]' class='rdetail_item'>
+                        <script type='opac/slot-format'><![CDATA[
+                               return subjectMe('#tag600', item);
+                       ]]></script>
+                       </td>
+               </tr>
+               <tr class='hide_me' id='tag610'>
+                        <td nowrap='nowrap' class='rdetail_desc'>&common.subject.610;</td>
+                        <td type='opac/slot-data' query='datafield[tag^=610]' class='rdetail_item'>
+                        <script type='opac/slot-format'><![CDATA[
+                               return subjectMe('#tag610', item);
+                       ]]></script>
+                       </td>
+               </tr>
+               <tr class='hide_me' id='tag611'>
+                        <td nowrap='nowrap' class='rdetail_desc'>&common.subject.611;</td>
+                        <td type='opac/slot-data' query='datafield[tag^=611]' class='rdetail_item'>
+                        <script type='opac/slot-format'><![CDATA[
+                               return subjectMe('#tag611', item);
+                       ]]></script>
+                       </td>
+               </tr>
+               <tr class='hide_me' id='tag630'>
+                        <td nowrap='nowrap' class='rdetail_desc'>&common.subject.630;</td>
+                        <td type='opac/slot-data' query='datafield[tag^=630]' class='rdetail_item'>
+                        <script type='opac/slot-format'><![CDATA[
+                               return subjectMe('#tag630', item);
+                       ]]></script>
+                       </td>
+               </tr>
+               <tr class='hide_me' id='tag648'>
+                        <td nowrap='nowrap' class='rdetail_desc'>&common.subject.648;</td>
+                        <td type='opac/slot-data' query='datafield[tag^=648]' class='rdetail_item'>
+                        <script type='opac/slot-format'><![CDATA[
+                               return subjectMe('#tag648', item);
+                       ]]></script>
+                       </td>
+               </tr>
+               <tr class='hide_me' id='tag650'>
+                        <td nowrap='nowrap' class='rdetail_desc'>&common.subjects;</td>
+                        <td type='opac/slot-data' query='datafield[tag^=650]' class='rdetail_item'>
+                        <script type='opac/slot-format'><![CDATA[
+                               return subjectMe('#tag650', item);
+                       ]]></script>
+                       </td>
+               </tr>
+               <tr class='hide_me' id='tag651'>
+                        <td nowrap='nowrap' class='rdetail_desc'>&common.subject.651;</td>
+                        <td type='opac/slot-data' query='datafield[tag^=651]' class='rdetail_item'>
+                        <script type='opac/slot-format'><![CDATA[
+                               return subjectMe('#tag651', item);
+                       ]]></script>
+                       </td>
+               </tr>
+               <tr class='hide_me' id='tag653'>
+                        <td nowrap='nowrap' class='rdetail_desc'>&common.subject.653;</td>
+                        <td type='opac/slot-data' query='datafield[tag^=653]' class='rdetail_item'>
+                        <script type='opac/slot-format'><![CDATA[
+                               return subjectMe('#tag653', item);
+                       ]]></script>
+                       </td>
+               </tr>
+               <tr class='hide_me' id='tag654'>
+                        <td nowrap='nowrap' class='rdetail_desc'>&common.subject.654;</td>
+                        <td type='opac/slot-data' query='datafield[tag^=654]' class='rdetail_item'>
+                        <script type='opac/slot-format'><![CDATA[
+                               return subjectMe('#tag654', item);
+                       ]]></script>
+                       </td>
+               </tr>
+               <tr class='hide_me' id='tag655'>
+                        <td nowrap='nowrap' class='rdetail_desc'>&common.subject.655;</td>
+                        <td type='opac/slot-data' query='datafield[tag^=655]' class='rdetail_item'>
+                        <script type='opac/slot-format'><![CDATA[
+                               return subjectMe('#tag655', item);
+                       ]]></script>
+                       </td>
+               </tr>
+               <tr class='hide_me' id='tag656'>
+                        <td nowrap='nowrap' class='rdetail_desc'>&common.subject.656;</td>
+                        <td type='opac/slot-data' query='datafield[tag^=656]' class='rdetail_item'>
+                        <script type='opac/slot-format'><![CDATA[
+                               return subjectMe('#tag656', item);
+                       ]]></script>
+                       </td>
+               </tr>
+               <tr class='hide_me' id='tag657'>
+                        <td nowrap='nowrap' class='rdetail_desc'>&common.subject.657;</td>
+                        <td type='opac/slot-data' query='datafield[tag^=657]' class='rdetail_item'>
+                        <script type='opac/slot-format'><![CDATA[
+                               return subjectMe('#tag657', item);
+                       ]]></script>
+                       </td>
+               </tr>
+               <tr class='hide_me' id='tag658'>
+                        <td nowrap='nowrap' class='rdetail_desc'>&common.subject.658;</td>
+                        <td type='opac/slot-data' query='datafield[tag^=658]' class='rdetail_item'>
+                        <script type='opac/slot-format'><![CDATA[
+                               return subjectMe('#tag658', item);
+                       ]]></script>
+                       </td>
+               </tr>
+               <tr class='hide_me' id='tag662'>
+                        <td nowrap='nowrap' class='rdetail_desc'>&common.subject.662;</td>
+                        <td type='opac/slot-data' query='datafield[tag^=662]' class='rdetail_item'>
+                        <script type='opac/slot-format'><![CDATA[
+                               return subjectMe('#tag662', item);
+                       ]]></script>
+                       </td>
+               </tr>
+
+               <tr class='hide_me' id='tag500'>
+                       <td nowrap='nowrap' class='rdetail_desc'>&common.general.note;</td>
+                       <td type='opac/slot-data' query='datafield[tag=500]' class='rdetail_item'>
+                               <script type='opac/slot-format'><![CDATA[
+                               dojo.query('#tag500').removeClass('hide_me');
+                               return '<span>' + BT.textContent(item) + '</span><br/>';
+                               ]]></script>
+                       </td>
+               </tr>
+               <tr class='hide_me' id='tag505'>
+                       <td nowrap='nowrap' class='rdetail_desc'>&common.contents.note;</td>
+                       <td type='opac/slot-data' query='datafield[tag=505]' class='rdetail_item'>
+                               <script type='opac/slot-format'><![CDATA[
+                               dojo.query('#tag505').removeClass('hide_me');
+                               return '<span>' + BT.textContent(item) + '</span><br/>';
+                               ]]></script>
+                       </td>
+               </tr>
+               <tr class='hide_me' id='tag506'>
+                       <td nowrap='nowrap' class='rdetail_desc'>&common.usage.restrictions;</td>
+                       <td type='opac/slot-data' query='datafield[tag=506] subfield[code=a]' class='rdetail_item'>
+                               <script type='opac/slot-format'><![CDATA[
+                               dojo.query('#tag506').removeClass('hide_me');
+                               return '<span>' + BT.textContent(item) + '</span> ';
+                               ]]></script>
+                       </td>
+               </tr>
+               <tr class='hide_me' id='tag511'>
+                       <td nowrap='nowrap' class='rdetail_desc'>&common.performer.note;</td>
+                       <td type='opac/slot-data' query='datafield[tag=511]' class='rdetail_item'>
+                               <script type='opac/slot-format'><![CDATA[
+                               dojo.query('#tag511').removeClass('hide_me');
+                               return '<span>' + BT.textContent(item) + '</span><br/>';
+                               ]]></script>
+                       </td>
+               </tr>
+               <tr class='hide_me' id='tag700'>
+                       <td nowrap='nowrap' class='rdetail_desc'>&common.additional.authors;</td>
+                       <td type='opac/slot-data' query='datafield[tag=700]' class='rdetail_item'>
+                               <script type='opac/slot-format'><![CDATA[
+                               dojo.query('#tag700').removeClass('hide_me');
+                               var text = '';
+                               var list = dojo.query( 'subfield:not([code=4])', item );
+                               for (var i =0; i < list.length; i++) {
+                                       text += BT.textContent(list[i]) + ' ';
+                               }
+                               return '<span>' + text + '</span><br/>';
+                               ]]></script>
+                       </td>
+               </tr>
+               <tr class='hide_me' id='tag780'>
+                       <td nowrap='nowrap' class='rdetail_desc'>&common.preceding.entry;</td>
+                       <td type='opac/slot-data' query='datafield[tag=780]' class='rdetail_item'>
+                               <script type='opac/slot-format'><![CDATA[
+                               dojo.query('#tag780').removeClass('hide_me');
+                               return '<span>' + BT.textContent(item) + '</span><br/>';
+                               ]]></script>
+                       </td>
+               </tr>
+               <tr class='hide_me' id='tag785'>
+                       <td nowrap='nowrap' class='rdetail_desc'>&common.succeeding.entry;</td>
+                       <td type='opac/slot-data' query='datafield[tag=785]' class='rdetail_item'>
+                               <script type='opac/slot-format'><![CDATA[
+                               dojo.query('#tag785').removeClass('hide_me');
+                               return '<span>' + BT.textContent(item) + '</span><br/>';
+                               ]]></script>
+                       </td>
+               </tr>
+               <tr class='hide_me' id='rdetail_online_row'>
+                       <!-- *** Example of how to use the openils.BibTemplate infrastructure to augment the stock
+                            *** summary screen with complex information, such as location-specific URIs (856$9). -->
+                       <td nowrap='nowrap' class='rdetail_desc'>&rdetail.summary.online;</td>
+                       <td class='rdetail_item' id='rdetail_online' type='opac/slot-data' query='volumes volume uris uri'>
+                               <script type='opac/slot-format'><![CDATA[
+                                       dojo.query('*:not([type^=opac])', 'rdetail_online').orphan();
+                                       var uri = new Object;
+                                       uri.href = item.getAttribute('href');
+                                       uri.label = item.getAttribute('label');
+                                       uri.use = item.getAttribute('use_restriction');
+                                       if (uri.href == uri.label) {
+                                               if (uri.use && uri.use != uri.label) {
+                                                       uri.label = uri.use;
+                                                       uri.use = null;
+                                               }
+                                       }
+                                       var link = '<a class="search_link" href="' + uri.href + '">' + uri.label + '</a>';
+                                       if (uri.use) {
+                                               link += ' (' + uri.use + ')';
+                                       }
+                                       return '<span>' + link + '</span><br/>';
+                               ]]></script>
+                       </td>
+               </tr>
+                       <tr name="serial_holdings_label"
+                               class="result_table_title_cell hide_me">
+                <td class="rdetail_desc">&rdetail.summary.issues_held;</td>
+                <td templated="true" type="opac/slot-data"
+                    query="datafield[tag='901'] subfield[code='c']"
+                    class="rdetail_item">
+                    ${holdingsStatement}
+                                       <span class="hide_me" name="holdingsStatement" type="opac/template-value"><![CDATA[
+                        if (fetchOrgSettingDefault(
+                            getLocation(),
+                            "opac.fully_compressed_serial_holdings"
+                        )) {
+                            var bibid = BT.textContent(item_list[0]);
+                            var blob = fieldmapper.standardRequest(
+                                ["open-ils.serial",
+                                    "open-ils.serial.bib.summary_statements"],
+                                [bibid, {
+                                    "orgid": getLocation(), "depth": getDepth()
+                                }]
+                            );
+
+                            var fake = dojo.create("td");
+                            var something = false;
+
+                            for (var i in blob) {
+                                if (!blob[i].length) continue;
+                                if (something) dojo.create("br", null, fake);
+                                something = true;
+
+                                var a = dojo.create(
+                                    "a", {
+                                        "innerHTML": "[+]",
+                                        "href": "javascript:void(0);",
+                                        "onclick":
+                                            "rdetailDrawExpandedHoldings(this,"+
+                                            bibid + ",'" + i + "');",
+                                        "style": {"marginRight": "1.5em"}
+                                    }, fake
+                                );
+                                dojo.create(
+                                    "span", {
+                                        "innerHTML": blob[i].join(", ")
+                                    }, fake
+                                );
+                                dojo.create(
+                                    "span", {"id": "holding_type_" + i}, fake
+                                );
+                            }
+
+                            if (something)
+                                unHideMe(slot.parentNode);
+
+                            return fake.innerHTML;
+                        } else {
+                            return "";
+                        }
+                                       ]]></span>
+                               </td>
+                       </tr>
+
+               </tbody>
+       </table>
+
+       <script language='javascript' type='text/javascript'><![CDATA[
+
+               config.ids.rdetail.details_body         = 'rdetail_details_body'; 
+               config.ids.rdetail.title                                = 'rdetail_title';
+               config.ids.rdetail.author                               = 'rdetail_author';
+               config.ids.rdetail.isbn                                 = 'rdetail_isbn';
+               config.ids.rdetail.edition                              = 'rdetail_edition';
+               config.ids.rdetail.pubdate                              = 'rdetail_pubdate';
+               config.ids.rdetail.publisher                    = 'rdetail_publisher';
+               config.ids.rdetail.tor                                  = 'rdetail_tor';
+               config.ids.rdetail.abstr                                = 'rdetail_abstract';
+               config.ids.rdetail.image                                = 'rdetail_image';
+               config.ids.rdetail.tor_pic                              = 'rdetail_tor_pic';
+
+        /* Only clear the resources box once */
+        var first_issn = true;
+
+        function subjectMe(tag, item) {
+            dojo.query(tag).removeClass('hide_me');
+            var cgi = new CGI();
+            var other_params = [ 'd', 'l', 'r', 'av', 's', 'sd' ];
+            var total = '';
+            var output = [];
+            dojo.query( 'subfield', item ).forEach( function (onesub) {
+                var subtext = '';
+                var sub_code = onesub.getAttribute('code');
+                try {   
+                    if (dojo.isIE) {
+                        subtext = onesub.firstChild.nodeValue;
+                    } else {
+                        subtext = onesub.textContent;
+                    }
+                    if ( sub_code.match(/[a-z]/i) ) {
+                        var current = '';
+                        if ( sub_code.match(/[vxyz]/ ) ) {
+                            current += '&#x2d;&#x2d; ';
+                        }
+                        total += subtext + ' ';
+                        current += '<a class="search_link" href="rresult.xml?rt=subject&tp=subject&t=' + total.replace(/\s+$/, '');
+                        for (var p in other_params) {
+                            if (cgi.param(other_params[p])) {
+                                current += '&' + other_params[p] + '=' + cgi.param(other_params[p]);
+                            }
+                        }
+                        current += '">' + subtext + '</a>'
+                        output.push(current);
+                    }
+                } catch (e) {
+                    return;
+                }
+            });
+            return '<span>' + output.join(' ') + '</span><br/>';
+        }
+
+        dojo.addOnLoad( function () {
+            setTimeout( function () {
+                var here = findOrgUnit(getLocation());
+                if (getDepth() > 0 || getDepth === 0 ) {
+                    while (getDepth() < findOrgDepth(here))
+                        here = findOrgUnit( here.parent_ou() );
+                }
+
+                dojo.require('openils.BibTemplate');
+                new openils.BibTemplate({ record : new CGI().param('r'), org_unit : here.shortname() }).render();
+            }, 0);
+        });
+       ]]></script>
+
+</div> <!-- details_body -->
+
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 (file)
index 0000000..84acae1
--- /dev/null
@@ -0,0 +1,415 @@
+<!-- Search results are spit into this table -->
+
+<div id='result_table_div' xmlns:xi="http://www.w3.org/2001/XInclude">
+
+    <table id='res_table'> 
+
+        <!-- for some reason, this is the only way i can force the cell widths -->
+        <thead id='result_thead'>
+            <tr>
+                <td class='result_table_pic_header'></td>
+                <td> </td>
+            </tr>
+        </thead>
+
+        <tbody id='result_table'>
+            <tr>
+
+                <td class='result_table_row'>
+                    <!--#include virtual="result_info.xml"-->
+                </td>
+            </tr>
+
+            <!-- Template for displaying a search result.  This row template is cloned and inserted
+                    for each result returned -->
+
+            <tr id='result_table_template' class='hide_me'>
+
+                <!-- Jacket image goes here -->
+
+                <td class='result_table_row' align='left'>
+                    <table class='result_table_subtable'>
+                        <tbody class='result_table_subtbody'>
+
+                            <tr style='height: 1em' name='counts_row'>
+
+                                <td  rowspan='6' class='result_table_pic_header'>
+                                    <a><img name='item_jacket' class='result_table_pic'/></a>
+                                </td>
+
+                                <td class='result_table_title_cell' name='result_table_title_cell'>
+                                    <!-- Title goes here -->
+                                    <a title="&result.table.keyword;" name='item_title' class='search_link'> 
+                                        <!-- Title goes here -->
+                                    </a>
+                                </td>
+
+                                <!-- Copy this td for each copy count appended -->
+                                <td  rowspan='5' nowrap='nowrap' name="copy_count_cell" class='copy_count_cell'> 
+                                </td>
+
+                            </tr>
+        
+                            <tr style='height: 1em' >
+                                <td class='result_table_author_cell'>
+                                    <a title="&result.table.author;" name='item_author' class='search_link'> 
+                                        <!-- Author goes here -->
+                                    </a>
+                                    <div>
+                                    <span name='result_table_extra_span' class='hide_me'>
+                                        <span name='result_table_pub_box' style='padding-left: 10px;'> 
+                                            <span name='result_table_edition_span' style='padding-left: 10px;'></span> |
+                                            <span name='result_table_pub_span'> </span> |
+                                            <span name='result_table_phys_span'> </span>
+                                        </span>
+                                    </span>
+                                    </div>
+                                </td>
+                            </tr>
+
+
+                            <!--
+                                there is probably a more elegant way to achieve this but what
+                                happens here is that the record id is used to place resolver
+                                info in the correct place in the results list - the id is
+                                placed here from the js layer
+                            -->
+                            <tr id='result_table_recid' class='result_table_title_cell hide_me'>
+                                <td class='sfx_display'> 
+                                    <span name='result_table_recid_span' class='recid'>
+                                        <span name='recid_holder' class='hide_me'></span>
+                                    </span>
+                                </td>
+                                <td></td>
+                            </tr>
+
+                            <tr name="local_callnumber_list" class="result_table_title_cell">
+                                <td>
+                                <!--
+                                    we snag the record id from the 901 field, and then use it
+                                    for lining up the resolver content
+                                -->
+                                <span 
+                                    type='opac/slot-data' query='datafield[tag="901"] subfield[code="c"]' class='hide_me'>
+                                <span class='hide_me' debug='true' type='opac/slot-format'><![CDATA[
+                                    curr_title_id = dojo.trim(BT.textContent(item));
+                                ]]></span>
+                                </span>
+                                <!--
+                                    this is very close to the layout in rdetail, we need to find the
+                                    record id in order to place the resolver info in the right spot
+                                -->
+                                <span 
+                                    type='opac/slot-data' query='datafield[tag="022"] subfield' class='hide_me'>
+                                <span class='hide_me' debug='true' type='opac/slot-format'><![CDATA[
+                                    var this_title_id = curr_title_id;
+                                    var issn = '';
+                                    issn = BT.textContent(item) + '';
+                                    issn = issn.replace(/^(\s|.)*?(\d{4}).(\d{3,4}[xX]?)(\s|.)*/, "$2-$3");
+                                    if (issn.length > 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);}
+                                    }
+                                ]]></span>
+                                </span>
+                                <!-- Prevent records with dozens of items attached from filling the screen -->
+                                <span type='opac/slot-data+marcxml-full' query='volumes'>
+                                <span class='hide_me' debug='true' type='opac/slot-format'><![CDATA[
+                                    var output = dojo.create('span'); 
+
+                                    var item_cnt = 0;
+                                    var max_items = 4;
+
+
+                                    dojo.query('volume', item).forEach(function(vol) {
+                                        if (item_cnt >= 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;
+                                ]]></span>
+                                </span>
+
+                                <!-- Be lenient in what we accept; disabled until we figure out how to prevent both URIs and SFX -->
+                                <span type='opac/slot-data+marcxml-full' query='record'>
+                                    <span class='hide_me' type='opac/slot-format'><![CDATA[
+                                        var found_issn = false;
+                                        dojo.query('datafield[tag="022"]', item).forEach(function(issn) {
+                                            found_issn = true;
+                                        });
+                                        if (found_issn) { return; }
+
+                                        var output = dojo.create('span'); 
+                                        dojo.query('volumes volume uris uri', item).forEach(function(xitem) {
+                                            var this_title_id = curr_title_id;
+                                            if (resolved[this_title_id]) { return; }
+                                            var uri = new Object;
+                                            uri.href = xitem.getAttribute('href');
+                                            uri.label = xitem.getAttribute('label');
+                                            uri.use = xitem.getAttribute('use_restriction');
+                                            if (uri.href == uri.label) {
+                                                if (uri.use && uri.use != uri.label) {
+                                                    uri.label = uri.use;
+                                                    uri.use = null;
+                                                }
+                                            }
+                                            var link = dojo.create('a', {"class":"search_link", "href": uri.href});
+                                            var link_text = dojo.doc.createTextNode(uri.label);
+                                            link.appendChild(link_text);
+                                            output.appendChild(link);
+                            
+                                            if (uri.use) {
+                                                var use_text = dojo.doc.createTextNode(' (' + uri.use + ')');
+                                                output.appendChild(use_text);
+                                            }
+                                            dojo.create('br', null, output);
+                                        });
+                                        return output.innerHTML;
+                                    ]]></span>
+                                </span>
+                                </td>
+                            </tr>
+
+                            <tr style='height:1em;' >
+                                <td name='result_table_format_cell' class='result_table_format_cell'>
+
+                                    <a name='text_link' class='search_link'> 
+                                        <img src='../../../../images/tor/text.jpg' class='dim tor_pic' />
+                                    </a>
+
+                                    <a name='sound recording-nonmusical_link' class='search_link'> 
+                                        <img src='../../../../images/tor/sound recording-nonmusical.jpg' class='dim tor_pic' />
+                                    </a>
+
+                                    <a name='moving image_link' class='search_link'> 
+                                        <img src='../../../../images/tor/moving image.jpg' class='dim tor_pic' />
+                                    </a>
+
+                                    <a name='software, multimedia_link' class='search_link'> 
+                                        <img src='../../../../images/tor/software, multimedia.jpg' class='dim tor_pic' />
+                                    </a>
+
+                                    <a name='sound recording-musical_link' class='search_link'> 
+                                        <img src='../../../../images/tor/sound recording-musical.jpg' class='dim tor_pic' />
+                                    </a>
+
+                                    <a name='cartographic_link' class='search_link'> 
+                                        <img src='../../../../images/tor/cartographic.jpg' class='dim tor_pic' />
+                                    </a>
+
+                                    <a name='mixed material_link' class='search_link'> 
+                                        <img src='../../../../images/tor/mixed material.jpg' class='dim tor_pic' />
+                                    </a>
+
+                                    <a name='notated music_link' class='search_link'> 
+                                        <img src='../../../../images/tor/notated music.jpg' class='dim tor_pic' />
+                                    </a>
+
+                                    <a name='sound recording_link' class='search_link'> 
+                                        <img src='../../../../images/tor/sound recording.jpg' class='dim tor_pic' />
+                                    </a>
+
+                                    <a name='still image_link' class='search_link'> 
+                                        <img src='../../../../images/tor/still images.jpg' class='dim tor_pic' />
+                                    </a>
+
+                                    <a name='three dimensional object_link' class='search_link'> 
+                                        <img src='../../../../images/tor/three dimensional object.jpg' class='dim tor_pic' />
+                                    </a>
+
+                                    <span class='hide_me' 
+                                        style='color: #9999FF; padding-left: 10px; font-size: 7pt; font-weight: 300;'> 
+                                        <span>&common.relevancy; </span><span name='relevancy_span'> </span>
+                                    </span>
+
+                                    <span class='hide_me' name='place_hold_span'>
+                                        <a style='padding-left: 8px;' href='javascript:void(0);' 
+                                            class='classic_link' name='place_hold_link'>&opac.holds.placeHold;</a>
+                                    </span>
+
+                                    <!-- Empty span used for creating unAPI links -->
+                                    <abbr style='padding-left: 8px;' name="unapi" class="unapi-id">
+                                        <!-- unAPI URI goes here -->
+                                    </abbr>
+
+                                    <!-- Empty span used for creating Google Book Search-->
+                                    <span name="googleBooksLink" class="hide_me">
+                                        <a style='padding-left: 8px;' class='classic_link' name="googleBooks-link">&result.googleBooks.browse;</a>
+                                    </span>
+
+
+                                </td>
+                            </tr>
+
+                        </tbody>
+                    </table>
+                </td>
+            </tr>
+        </tbody>
+    </table>
+
+
+   <!-- ====================== -->
+   <table style='width: 100%; margin-top: 12px;' id='result_info_2' class='hide_me'>
+      <tbody>
+               
+          <tr class='color_4' style='height: 1em;'>
+                     
+             <td style='vertical-align: top;'  id='next_prev_links2'>
+                        
+                <span class='hide_me' id='result_info_div2' style='font-size: 9pt;'>
+                   <span> &common.results; </span> 
+                   <b id='offset_start2'> </b>
+                   <span> - </span>
+                   <b id='offset_end2'> </b>
+                   <span> &common.ofAtLeast; </span>
+                   <b id='result_count2'> </b>
+                   <span style='padding-left: 6px;'> (page </span>
+                   <span id='current_page2'> </span>
+                   <span> &common.of; </span>
+                   <span id='num_pages2'> </span>
+                </span>
+                           
+                <span id='start_end_links_span2' class='hide_me' 
+                   style='padding-left: 40px;' >
+                <a class='search_page_nav_link' id='search_home_link2' 
+                   title="&rdetail.page.results;">&rdetail.start;</a><a class='search_page_nav_link' 
+                   id='prev_link2' title='&rdetail.page.previous;'>&rdetail.page.previous.symbol;</a>
+            
+                <span class='search_page_nav_link' id='page_numbers2'> </span>
+                   <a  class='search_page_nav_link' id='next_link2' 
+                      title='&rdetail.page.next;'>&rdetail.page.next.symbol;</a>
+                      <!--
+                      <a class='search_page_nav_link' 
+                      id='end_link2' title="&rdetail.page.last;">&rdetail.end;</a>
+                      -->
+                </span>
+                        
+             </td>
+                        
+             <td  colspan='5' 
+                style='padding-bottom: 4px; text-align:center; vertical-align: top; border-bottom: 1px solid #E0E0E0;'>
+               <!--
+                <span id='search_info_table2' style='font-size: 8pt;'>
+                <b>Available copies / Total copies </b>
+                </span>
+               -->
+             </td>
+          </tr>
+      </tbody>
+   </table>
+   <!-- ====================== -->
+
+
+    <script language='javascript' type='text/javascript'>
+        config.names.result.format_cell = 'result_table_format_cell';
+        config.names.result.format_link = 'resource_link'
+        config.names.result.format_pic = 'format_pic'
+        var url_list = "";
+        var title_list = "";
+        var curr_title_id = "";
+        var resolved = {};
+    </script>
+
+    <!-- ChiliFresh setup -->
+    <script language='javascript' type='text/javascript'>
+        var chilifresh = '<!--#echo var="OILS_CHILIFRESH_ACCOUNT"-->';
+        if (chilifresh=='(none)') { chilifresh = false; }
+    </script>
+    <!--if expr="${OILS_CHILIFRESH_ACCOUNT} && ${OILS_CHILIFRESH_ACCOUNT}!='(none)'"-->
+        <input type="hidden" id="chilifresh_account" name="chilifresh_account"
+            value="<!--#echo var='OILS_CHILIFRESH_ACCOUNT'-->" />
+        <input type="hidden" id="chilifresh_profile" name="chilifresh_profile"
+            value="<!--#echo var='OILS_CHILIFRESH_PROFILE'-->" />
+        <input type="hidden" id="chilifresh_version" name="chilifresh_version" value="onsite_v1" />
+        <input type="hidden" id="chilifresh_type" name="chilifresh_type" value="search" />
+        <script language="javascript" type="text/javascript" src="<!--#echo var='OILS_CHILIFRESH_URL'-->"></script>
+    <!--endif-->
+
+</div>
+
index e5c50c0..9d3b407 100644 (file)
@@ -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 {
index 692a5f4..1664540 100644 (file)
@@ -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':
index 4b2ceb1..facce53 100644 (file)
@@ -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];
index 7ac3f64..11bb920 100644 (file)
@@ -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("<div style='text-align: center; width: 100%; margin-left: auto; margin-right: auto;'><strong>" +
+            esItem.description + "</strong>: <a class='classic_link' href='" +
+            extraSearchStuff.searchTerms + "'>" + extraSearchStuff.displayTerms + "</a><div>", "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 */
 
index 39c0a94..eb0833a 100644 (file)
                                                <select id='adv_quick_type' style='width: 6em;'>
                                                        <option value='isbn'>&opac.advanced.quick.isbn;</option>
                                                        <option value='issn'>&opac.advanced.quick.issn;</option>
-                                                       <option value='cn'>&opac.advanced.quick.cn;</option>
+                                                       <option id='adv_quick_type_cn' value='cn'>&opac.advanced.quick.cn;</option>
                                                        <option value='lccn'>&opac.advanced.quick.lccn;</option>
                                                        <option value='tcn'>&opac.advanced.quick.tcn;</option>
-                                                       <option value='barcode'>&opac.advanced.quick.barcode;</option>
+                                                       <option id='adv_quick_type_barcode' value='barcode'>&opac.advanced.quick.barcode;</option>
                                                </select>
                                        </td><td>
                                                <input type='text' id='adv_quick_text' size='16' />
                                </tr></tbody></table>
                        </div>
 
-            <span class='hide_me' id='myopac.copy.not.found'>&sidebar.copy.not.found;</span>
+                       <script language='javascript' type='text/javascript'><![CDATA[
+                       dojo.addOnLoad(function() {
+                               if (isXUL()) {
+                                       dojo.query('#adv_quick_type_barcode').attr('selected', 'selected');
+                               } else {
+                                       dojo.query('#adv_quick_type_cn').attr('selected', 'selected');
+                               }
+                       });
+                       ]]>
+                       </script>
+
+                       <span class='hide_me' id='myopac.copy.not.found'>&sidebar.copy.not.found;</span>
                        <div style='margin-top: 8px;' class='adv_quick_search_submit'>
                                <a id='adv_quick_submit' href='javascript:advGenericSearch();' class='classic_link'>&common.submit;</a>
                        </div>
index e8a186e..68b74fc 100644 (file)
@@ -1,15 +1,18 @@
 
-<abbr class="unapi-id" title='tag:<!--#echo var="HTTP_HOST"-->,<!--#echo var="OILS_TIME_YEAR"-->:biblio-record_entry/<!--#echo var="OILS_OPAC_RID"-->'></abbr>
+<abbr name="unapi" class="unapi-id" title='tag:<!--#echo var="HTTP_HOST"-->,<!--#echo var="OILS_TIME_YEAR"-->:biblio-record_entry/<!--#echo var="OILS_OPAC_RID"-->'></abbr>
 <!-- This holds the record summary information -->
 <div>
-       <!-- temporary hack to give IE somewhere to put these things; should just rip out from rdetail.js 
-               See https://bugs.launchpad.net/evergreen/+bug/532217 -->
+       <!-- Hack to give IE somewhere to put these things; should just rip out from rdetail.js -->
        <span class='hide_me' id='rdetail_title'></span>
+       <span class='hide_me' id='rdetail_isbn'></span>
+       <span class='hide_me' id='rdetail_publisher'></span>
+       <span class='hide_me' id='rdetail_abstract'></span>
+       <span class='hide_me' id='rdetail_edition'></span>
        <table id='rdetail_details_table'>
                <tbody id='rdetail_details_tbody'>
 
                        <tr>
-                               <td id='rdetail_image_cell' rowspan='30'>
+                               <td id='rdetail_image_cell' rowspan='40'>
                                        <a id='rdetail_img_link'>
                                                <img style='border: none;' id='rdetail_image' 
                             onerror='
                     </div>
                                </td>
                                <td nowrap='nowrap' class='rdetail_desc'>&common.title;</td>            
-                <!-- *** Example of how to use the openils.BibTemplate infrastructure to augment the stock
-                     *** summary screen with more and/or different information.  In this case, the raw MARC 245. -->
-                <td type='opac/slot-data' query='datafield[tag="245"]' class='rdetail_item'>
-                    <script type='opac/slot-format'><![CDATA[
-                        var out = '';
-                        var list = dojo.query( 'subfield', item );
-                        for (var i = 0; i < list.length; i++) {
-                            out += BT.textContent(list[i]) + ' ';
-                        }
-                        return out;
-                    ]]></script>
-                </td>
+                                <td type='opac/slot-data' query='datafield[tag=245]' class='rdetail_item'>
+                                         <script type='opac/slot-format'><![CDATA[
+                                               var rdetail_bib_title = BT.textContent(item);
+                                               var title_node = dojo.query('head title');
+                                               dojo.addOnLoad(function() {dojo.place('<title>' + rdetail_bib_title + '</title>', title_node[0], 'replace');});
+                                                return '<span>' + rdetail_bib_title + '</span><br/>';
+                                        ]]></script>
+                                </td>
                        </tr>
 
-                       <tr>
+                       <tr class='hide_me' id='tag246'>
+                               <td nowrap='nowrap' class='rdetail_desc'>&common.alternate.title;</td>
+                               <td type='opac/slot-data' query='datafield[tag=246] subfield[code=a]' class='rdetail_item'>
+                                       <script type='opac/slot-format'><![CDATA[
+                                               dojo.query('#tag246').removeClass('hide_me');
+                                               return '<span>' + BT.textContent(item) + '</span><br/>';
+                                       ]]></script>
+                               </td>
+                       </tr>
+                       <tr class='hide_me' id='tag247'>
+                               <td nowrap='nowrap' class='rdetail_desc'>&common.former.title;</td>
+                               <td type='opac/slot-data' query='datafield[tag="247"]' class='rdetail_item'>
+                                       <script type='opac/slot-format'><![CDATA[
+                                               dojo.query('#tag247').removeClass('hide_me');
+                                               return '<span>' + BT.textContent(item) + '</span><br/>';
+                                       ]]></script>
+                               </td>
+                       </tr>
+
+                       <tr class='hide_me'>
                                <td nowrap='nowrap' class='rdetail_desc'>&common.author;</td>           
                                <td class='rdetail_item'>
                                        <a title='&rdetail.author.search;' id='rdetail_author'> </a>
                                </td>
                        </tr>
-
-                       <tr>
+                       <tr class='hide_me' id='tag100'>
+                               <td nowrap='nowrap' class='rdetail_desc'>&common.author;</td>
+                               <td type='opac/slot-data' query='datafield[tag=100]' class='rdetail_item'>
+                                       <script type='opac/slot-format'><![CDATA[
+                                               dojo.query('#tag100').removeClass('hide_me');
+                                               return '<span>' + BT.textContent(item) + '</span><br/>';
+                                       ]]></script>
+                               </td>
+                       </tr>
+                       <tr class='hide_me' id='tag110'>
+                               <td nowrap='nowrap' class='rdetail_desc'>&common.corporate.author;</td>
+                               <td type='opac/slot-data' query='datafield[tag=110]' class='rdetail_item'>
+                                       <script type='opac/slot-format'><![CDATA[
+                                               dojo.query('#tag110').removeClass('hide_me');
+                                               return '<span>' + BT.textContent(item) + '</span><br/>';
+                                       ]]></script>
+                               </td>
+                       </tr>
+                       <tr class='hide_me' id='tag111'>
+                               <td nowrap='nowrap' class='rdetail_desc'>&common.meeting.name;</td>
+                               <td type='opac/slot-data' query='datafield[tag=111]' class='rdetail_item'>
+                                       <script type='opac/slot-format'><![CDATA[
+                                               dojo.query('#tag111').removeClass('hide_me');
+                                               return '<span>' + BT.textContent(item) + '</span><br/>';
+                                       ]]></script>
+                               </td>
+                       </tr>
+                       <tr class='hide_me' id='tag020'>
                                <td nowrap='nowrap' class='rdetail_desc'>&common.isbn;</td>                     
-                               <td class='rdetail_item' id='rdetail_isbn'> </td>
+                               <td type='opac/slot-data' query='datafield[tag=020]' class='rdetail_item'>
+                                   <script type='opac/slot-format'><![CDATA[
+                                       dojo.query('#tag020').removeClass('hide_me');
+                                       return '<span>' + BT.textContent(item) + '</span><br/>';
+                                   ]]></script>
+                               </td>
+
                        </tr>
+                       <tr class='hide_me' id='tag022'>
+                               <td nowrap='nowrap' class='rdetail_desc' id='issn_title'>&common.issn;</td>                     
+                               <td type='opac/slot-data' query='datafield[tag=022]' class='rdetail_item' id='rdetail_issn'>
+                                   <script type='opac/slot-format'><![CDATA[
+                                       dojo.query('#tag022').removeClass('hide_me');
+                                       var issn_raw = dojo.trim(BT.textContent(item));
+
+                                       // textContent returns multiple subfields concatenated with linefeeds,
+                                       // so our regex needs to match against linefeeds. "." does not match
+                                       // linefeeds, so get \s into the mix
+                                       var issn = issn_raw.replace(/^(\s|.)*?(\d{4}).(\d{3,4}[xX]?)(\s|.)*/, "$2-$3");
+
+                                       return '<span>' + issn + '</span><br/>';
+                                   ]]></script>
+                               </td>
 
-                       <tr>
-                               <td nowrap='nowrap' class='rdetail_desc'>&common.edition;</td>          
-                               <td class='rdetail_item' id='rdetail_edition'> </td>
                        </tr>
 
-                       <tr>
+                       <tr class='hide_me' id='tag250'>
+                               <td nowrap='nowrap' class='rdetail_desc'>&common.edition;</td>
+                               <td type='opac/slot-data' query='datafield[tag=250]' class='rdetail_item'>
+                                   <script type='opac/slot-format'><![CDATA[
+                                       dojo.query('#tag250').removeClass('hide_me');
+                                       return '<span>' + BT.textContent(item) + '</span><br/>';
+                                   ]]></script>
+                           </td>
+                       </tr>
+
+                       <tr class='hide_me'>
                                <td nowrap='nowrap' class='rdetail_desc'>&common.pubdate;</td>          
                                <td class='rdetail_item' id='rdetail_pubdate'> </td>
                        </tr>
 
-                       <tr>
+                       <tr class='hide_me' id='tag260'>
                                <td nowrap='nowrap' class='rdetail_desc'>&common.publisher;</td>                
-                               <td class='rdetail_item' id='rdetail_publisher'> </td>
+                               <td type='opac/slot-data' query='datafield[tag=260]' class='rdetail_item'>
+                                   <script type='opac/slot-format'><![CDATA[
+                                       dojo.query('#tag260').removeClass('hide_me');
+                                       return '<span>' + BT.textContent(item) + '</span><br/>';
+                                   ]]></script>
+                           </td> 
                        </tr>
 
 
                                </td>
                        </tr>
 
-                       <tr>
+                       <tr class='hide_me' id='tag520'>
                                <td nowrap='nowrap' class='rdetail_desc'>&rdetail.detailMain.abstract;</td>     
-                               <td class='rdetail_item' id='rdetail_abstract'> </td>
+                               <td type='opac/slot-data' query='datafield[tag=520]' class='rdetail_item'>
+                                   <script type='opac/slot-format'><![CDATA[
+                                       dojo.query('#tag520').removeClass('hide_me');
+                                       return '<span>' + BT.textContent(item) + '</span><br/>';
+                                   ]]></script>
+                               </td>
+
                        </tr>
 
             <!-- *** Example of how to use the openils.BibTemplate infrastructure to augment the stock
                  *** summary screen with complex information, such as new search links on subjects. -->
-            <tr>
-                <td nowrap='nowrap' class='rdetail_desc'>&rdetail.summary.subjects;</td>
-                <td type='opac/slot-data' query='datafield[tag="650"]' class='rdetail_item'>
-                    <script type='opac/slot-format'><![CDATA[
-                        var cgi = new CGI();
-                        var other_params = [ 'd', 'l', 'r', 'av', 's', 'sd', 'ol' ];
-                        var total = '';
-                        var output = [];
-                        var list = dojo.query( 'subfield', item );
-                        for (var i =0; i < list.length; i++) {
-                            total += BT.textContent(list[i]) + ' ';
-                            var current = '<a href="rresult.xml?rt=subject&tp=subject&t=' + total;
-                            for (var p in other_params) {
-                                if (cgi.param(other_params[p]))
-                                    current += '&' + other_params[p] + '=' + cgi.param(other_params[p]);
-                            }
-                            current += '">' + BT.textContent(list[i]) + '</a>'
-                            output.push(current);
-                        }
-                        return '<span>' + output.join(' &#x2d;&#x2d; ') + '</span><br/>';
-                    ]]></script>
-                </td>
-            </tr>
-
-                       <tr class='hide_me' id='rdetail_online_row'>
-                               <!-- *** Example of how to use the openils.BibTemplate infrastructure to augment the stock
-                                    *** summary screen with complex information, such as location-specific URIs (856$9). -->
-                               <td nowrap='nowrap' class='rdetail_desc'>&rdetail.summary.online;</td>
-                               <td class='rdetail_item' id='rdetail_online' type='opac/slot-data' query='volumes volume uris uri' join=", ">
-                                       <script type='opac/slot-format'><![CDATA[
-                                               var link = '<a href="' + item.getAttribute('href') + '">' + item.getAttribute('label') + '</a>';
-                                               if (item.getAttribute('use_restriction'))
-                                                       link += ' (Use restriction: ' + item.getAttribute('use_restriction') + ')';
-                                               return link;
-                                       ]]></script>
-                               </td>
-                       </tr>
+                <tr class='hide_me' id='tag600'>
+                        <td nowrap='nowrap' class='rdetail_desc'>&common.subject.600;</td>
+                        <td type='opac/slot-data' query='datafield[tag^=600]' class='rdetail_item'>
+                        <script type='opac/slot-format'><![CDATA[
+                               return subjectMe('#tag600', item);
+                       ]]></script>
+                       </td>
+               </tr>
+               <tr class='hide_me' id='tag610'>
+                        <td nowrap='nowrap' class='rdetail_desc'>&common.subject.610;</td>
+                        <td type='opac/slot-data' query='datafield[tag^=610]' class='rdetail_item'>
+                        <script type='opac/slot-format'><![CDATA[
+                               return subjectMe('#tag610', item);
+                       ]]></script>
+                       </td>
+               </tr>
+               <tr class='hide_me' id='tag611'>
+                        <td nowrap='nowrap' class='rdetail_desc'>&common.subject.611;</td>
+                        <td type='opac/slot-data' query='datafield[tag^=611]' class='rdetail_item'>
+                        <script type='opac/slot-format'><![CDATA[
+                               return subjectMe('#tag611', item);
+                       ]]></script>
+                       </td>
+               </tr>
+               <tr class='hide_me' id='tag630'>
+                        <td nowrap='nowrap' class='rdetail_desc'>&common.subject.630;</td>
+                        <td type='opac/slot-data' query='datafield[tag^=630]' class='rdetail_item'>
+                        <script type='opac/slot-format'><![CDATA[
+                               return subjectMe('#tag630', item);
+                       ]]></script>
+                       </td>
+               </tr>
+               <tr class='hide_me' id='tag648'>
+                        <td nowrap='nowrap' class='rdetail_desc'>&common.subject.648;</td>
+                        <td type='opac/slot-data' query='datafield[tag^=648]' class='rdetail_item'>
+                        <script type='opac/slot-format'><![CDATA[
+                               return subjectMe('#tag648', item);
+                       ]]></script>
+                       </td>
+               </tr>
+               <tr class='hide_me' id='tag650'>
+                        <td nowrap='nowrap' class='rdetail_desc'>&common.subjects;</td>
+                        <td type='opac/slot-data' query='datafield[tag^=650]' class='rdetail_item'>
+                        <script type='opac/slot-format'><![CDATA[
+                               return subjectMe('#tag650', item);
+                       ]]></script>
+                       </td>
+               </tr>
+               <tr class='hide_me' id='tag651'>
+                        <td nowrap='nowrap' class='rdetail_desc'>&common.subject.651;</td>
+                        <td type='opac/slot-data' query='datafield[tag^=651]' class='rdetail_item'>
+                        <script type='opac/slot-format'><![CDATA[
+                               return subjectMe('#tag651', item);
+                       ]]></script>
+                       </td>
+               </tr>
+               <tr class='hide_me' id='tag653'>
+                        <td nowrap='nowrap' class='rdetail_desc'>&common.subject.653;</td>
+                        <td type='opac/slot-data' query='datafield[tag^=653]' class='rdetail_item'>
+                        <script type='opac/slot-format'><![CDATA[
+                               return subjectMe('#tag653', item);
+                       ]]></script>
+                       </td>
+               </tr>
+               <tr class='hide_me' id='tag654'>
+                        <td nowrap='nowrap' class='rdetail_desc'>&common.subject.654;</td>
+                        <td type='opac/slot-data' query='datafield[tag^=654]' class='rdetail_item'>
+                        <script type='opac/slot-format'><![CDATA[
+                               return subjectMe('#tag654', item);
+                       ]]></script>
+                       </td>
+               </tr>
+               <tr class='hide_me' id='tag655'>
+                        <td nowrap='nowrap' class='rdetail_desc'>&common.subject.655;</td>
+                        <td type='opac/slot-data' query='datafield[tag^=655]' class='rdetail_item'>
+                        <script type='opac/slot-format'><![CDATA[
+                               return subjectMe('#tag655', item);
+                       ]]></script>
+                       </td>
+               </tr>
+               <tr class='hide_me' id='tag656'>
+                        <td nowrap='nowrap' class='rdetail_desc'>&common.subject.656;</td>
+                        <td type='opac/slot-data' query='datafield[tag^=656]' class='rdetail_item'>
+                        <script type='opac/slot-format'><![CDATA[
+                               return subjectMe('#tag656', item);
+                       ]]></script>
+                       </td>
+               </tr>
+               <tr class='hide_me' id='tag657'>
+                        <td nowrap='nowrap' class='rdetail_desc'>&common.subject.657;</td>
+                        <td type='opac/slot-data' query='datafield[tag^=657]' class='rdetail_item'>
+                        <script type='opac/slot-format'><![CDATA[
+                               return subjectMe('#tag657', item);
+                       ]]></script>
+                       </td>
+               </tr>
+               <tr class='hide_me' id='tag658'>
+                        <td nowrap='nowrap' class='rdetail_desc'>&common.subject.658;</td>
+                        <td type='opac/slot-data' query='datafield[tag^=658]' class='rdetail_item'>
+                        <script type='opac/slot-format'><![CDATA[
+                               return subjectMe('#tag658', item);
+                       ]]></script>
+                       </td>
+               </tr>
+               <tr class='hide_me' id='tag662'>
+                        <td nowrap='nowrap' class='rdetail_desc'>&common.subject.662;</td>
+                        <td type='opac/slot-data' query='datafield[tag^=662]' class='rdetail_item'>
+                        <script type='opac/slot-format'><![CDATA[
+                               return subjectMe('#tag662', item);
+                       ]]></script>
+                       </td>
+               </tr>
+
+               <tr class='hide_me' id='tag500'>
+                       <td nowrap='nowrap' class='rdetail_desc'>&common.general.note;</td>
+                       <td type='opac/slot-data' query='datafield[tag=500]' class='rdetail_item'>
+                               <script type='opac/slot-format'><![CDATA[
+                               dojo.query('#tag500').removeClass('hide_me');
+                               return '<span>' + BT.textContent(item) + '</span><br/>';
+                               ]]></script>
+                       </td>
+               </tr>
+               <tr class='hide_me' id='tag505'>
+                       <td nowrap='nowrap' class='rdetail_desc'>&common.contents.note;</td>
+                       <td type='opac/slot-data' query='datafield[tag=505]' class='rdetail_item'>
+                               <script type='opac/slot-format'><![CDATA[
+                               dojo.query('#tag505').removeClass('hide_me');
+                               return '<span>' + BT.textContent(item) + '</span><br/>';
+                               ]]></script>
+                       </td>
+               </tr>
+               <tr class='hide_me' id='tag506'>
+                       <td nowrap='nowrap' class='rdetail_desc'>&common.usage.restrictions;</td>
+                       <td type='opac/slot-data' query='datafield[tag=506] subfield[code=a]' class='rdetail_item'>
+                               <script type='opac/slot-format'><![CDATA[
+                               dojo.query('#tag506').removeClass('hide_me');
+                               return '<span>' + BT.textContent(item) + '</span> ';
+                               ]]></script>
+                       </td>
+               </tr>
+               <tr class='hide_me' id='tag511'>
+                       <td nowrap='nowrap' class='rdetail_desc'>&common.performer.note;</td>
+                       <td type='opac/slot-data' query='datafield[tag=511]' class='rdetail_item'>
+                               <script type='opac/slot-format'><![CDATA[
+                               dojo.query('#tag511').removeClass('hide_me');
+                               return '<span>' + BT.textContent(item) + '</span><br/>';
+                               ]]></script>
+                       </td>
+               </tr>
+               <tr class='hide_me' id='tag700'>
+                       <td nowrap='nowrap' class='rdetail_desc'>&common.additional.authors;</td>
+                       <td type='opac/slot-data' query='datafield[tag=700]' class='rdetail_item'>
+                               <script type='opac/slot-format'><![CDATA[
+                               dojo.query('#tag700').removeClass('hide_me');
+                               var text = '';
+                               var list = dojo.query( 'subfield:not([code=4])', item );
+                               for (var i =0; i < list.length; i++) {
+                                       text += BT.textContent(list[i]) + ' ';
+                               }
+                               return '<span>' + text + '</span><br/>';
+                               ]]></script>
+                       </td>
+               </tr>
+               <tr class='hide_me' id='tag780'>
+                       <td nowrap='nowrap' class='rdetail_desc'>&common.preceding.entry;</td>
+                       <td type='opac/slot-data' query='datafield[tag=780]' class='rdetail_item'>
+                               <script type='opac/slot-format'><![CDATA[
+                               dojo.query('#tag780').removeClass('hide_me');
+                               return '<span>' + BT.textContent(item) + '</span><br/>';
+                               ]]></script>
+                       </td>
+               </tr>
+               <tr class='hide_me' id='tag785'>
+                       <td nowrap='nowrap' class='rdetail_desc'>&common.succeeding.entry;</td>
+                       <td type='opac/slot-data' query='datafield[tag=785]' class='rdetail_item'>
+                               <script type='opac/slot-format'><![CDATA[
+                               dojo.query('#tag785').removeClass('hide_me');
+                               return '<span>' + BT.textContent(item) + '</span><br/>';
+                               ]]></script>
+                       </td>
+               </tr>
+               <tr class='hide_me' id='rdetail_online_row'>
+                       <!-- *** Example of how to use the openils.BibTemplate infrastructure to augment the stock
+                            *** summary screen with complex information, such as location-specific URIs (856$9). -->
+                       <td nowrap='nowrap' class='rdetail_desc'>&rdetail.summary.online;</td>
+                       <td class='rdetail_item' id='rdetail_online' type='opac/slot-data' query='volumes volume uris uri'>
+                               <script type='opac/slot-format'><![CDATA[
+                                       dojo.query('*:not([type^=opac])', 'rdetail_online').orphan();
+                                       var uri = new Object;
+                                       uri.href = item.getAttribute('href');
+                                       uri.label = item.getAttribute('label');
+                                       uri.use = item.getAttribute('use_restriction');
+                                       if (uri.href == uri.label) {
+                                               if (uri.use && uri.use != uri.label) {
+                                                       uri.label = uri.use;
+                                                       uri.use = null;
+                                               }
+                                       }
+                                       var link = '<a class="search_link" href="' + uri.href + '">' + uri.label + '</a>';
+                                       if (uri.use) {
+                                               link += ' (' + uri.use + ')';
+                                       }
+                                       return '<span>' + link + '</span><br/>';
+                               ]]></script>
+                       </td>
+               </tr>
                        <tr name="serial_holdings_label"
                                class="result_table_title_cell hide_me">
                 <td class="rdetail_desc">&rdetail.summary.issues_held;</td>
                </tbody>
        </table>
 
-       <!-- Empty span used for creating unAPI links -->
-       <abbr name="unapi" class="unapi-id">
-               <!-- unAPI URI goes here -->
-       </abbr>
-
        <script language='javascript' type='text/javascript'><![CDATA[
 
                config.ids.rdetail.details_body         = 'rdetail_details_body'; 
                config.ids.rdetail.image                                = 'rdetail_image';
                config.ids.rdetail.tor_pic                              = 'rdetail_tor_pic';
 
-        dojo.addOnLoad(function() {
+        /* Only clear the resources box once */
+        var first_issn = true;
+
+        function subjectMe(tag, item) {
+            dojo.query(tag).removeClass('hide_me');
+            var cgi = new CGI();
+            var other_params = [ 'd', 'l', 'r', 'av', 's', 'sd' ];
+            var total = '';
+            var output = [];
+            dojo.query( 'subfield', item ).forEach( function (onesub) {
+                var subtext = '';
+                var sub_code = onesub.getAttribute('code');
+                try {   
+                    if (dojo.isIE) {
+                        subtext = onesub.firstChild.nodeValue;
+                    } else {
+                        subtext = onesub.textContent;
+                    }
+                    if ( sub_code.match(/[a-z]/i) ) {
+                        var current = '';
+                        if ( sub_code.match(/[vxyz]/ ) ) {
+                            current += '&#x2d;&#x2d; ';
+                        }
+                        total += subtext + ' ';
+                        current += '<a class="search_link" href="rresult.xml?rt=subject&tp=subject&t=' + total.replace(/\s+$/, '');
+                        for (var p in other_params) {
+                            if (cgi.param(other_params[p])) {
+                                current += '&' + other_params[p] + '=' + cgi.param(other_params[p]);
+                            }
+                        }
+                        current += '">' + subtext + '</a>'
+                        output.push(current);
+                    }
+                } catch (e) {
+                    return;
+                }
+            });
+            return '<span>' + output.join(' ') + '</span><br/>';
+        }
+
+        dojo.addOnLoad( function () {
             setTimeout( function () {
                 var here = findOrgUnit(getLocation());
                 if (getDepth() > 0 || getDepth === 0 ) {
                     while (getDepth() < findOrgDepth(here))
                         here = findOrgUnit( here.parent_ou() );
                 }
-    
+
                 dojo.require('openils.BibTemplate');
                 new openils.BibTemplate({ record : new CGI().param('r'), org_unit : here.shortname() }).render();
             }, 0);
diff --git a/Open-ILS/web/opac/skin/hrsrh/xml/common/css_common.xml b/Open-ILS/web/opac/skin/hrsrh/xml/common/css_common.xml
new file mode 100644 (file)
index 0000000..126e0f3
--- /dev/null
@@ -0,0 +1,24 @@
+<!-- CSS shared across pages goes here --> 
+
+<link type='text/css' rel='stylesheet' href="<!--#echo var='OILS_SKIN_BASE'-->/hrsrh/css/layout.css"/>
+
+<!-- Our font CSS's -->
+<link type='text/css' rel='stylesheet' href='<!--#echo var="OILS_CSS_BASE"-->/mediumfont.css' />
+
+<!-- Our colors -->
+<link type='text/css' rel="stylesheet" href="<!--#echo var='OILS_THEME_BASE'-->/hrsrh/css/colors.css" />
+
+<!-- An alternate stylesheet -->
+<link type='text/css' rel="alternate stylesheet" title='&opac.style.reddish;' href="<!--#echo var='OILS_THEME_BASE'-->/reddish/css/colors.css" />
+
+<!-- OpenSearch auto discovery -->
+<link type="application/opensearchdescription+xml"
+       rel='search' title="HRSRH Library Catalogue"
+       href="http://<!--#echo var='SERVER_NAME'-->/opac/extras/opensearch/1.1/OSM/OSM/osd.xml" />
+
+<!-- enable Dojo date picker -->
+<style type="text/css">
+       @import '/js/dojo/dojo/resources/dojo.css';
+       @import '/js/dojo/dijit/themes/tundra/tundra.css';
+       @import '/js/dojo/dijit/themes/tundra/tundra_rtl.css';
+</style>
diff --git a/Open-ILS/web/opac/skin/hrsrh/xml/common/logo.xml b/Open-ILS/web/opac/skin/hrsrh/xml/common/logo.xml
new file mode 100644 (file)
index 0000000..da03395
--- /dev/null
@@ -0,0 +1,4 @@
+<div id='logo_div'>
+       <script language='javascript' type='text/javascript'>config.ids.common.top_logo = "top_left_logo";</script>
+       <img style='margin-right: 4px;' src='<!--#echo var="OILS_BASE"-->/images/hrsrh_logo_small.png' id='top_left_logo' border='0' class='logo' />
+</div>
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 (file)
index 0000000..8a26368
--- /dev/null
@@ -0,0 +1,29 @@
+<div id='copyright_block'>
+               <div id='footer_links'>
+                               <span class='footer_link'>
+                                       <a class='classic_link'
+                                               href='/opac/<!--#echo var="locale"-->/extras/slimpac/start.html'>&opac.basic;</a>
+                               </span> 
+                               <span> | </span>
+                                <span class='footer_link'>
+                                        <a target='_blank' class='classic_link'
+                                                href='&hrsrh.footer.pubmed.url;'>&hrsrh.footer.pubmed;</a>
+                                </span>
+                               <span> | </span>
+                               <span class='footer_link'>
+                                       <a target='_blank' class='classic_link'
+                                               href='&hrsrh.footer.atoz.url;'>&hrsrh.footer.atoz;</a>
+                               </span> 
+                               <span> | </span>
+                               <span class='footer_link'>
+                                       <a target='_blank' class='classic_link'
+                                               href='&hrsrh.footer.library.home.url;'>&hrsrh.footer.library.home;</a>
+                               </span>
+               </div>
+        <div id='copyright_text'>
+            <span>&footer.copyright;</span>
+        </div>
+        <div id='footer_logo'>&footer.logo;
+            <a href='http://open-ils.org'><img style='border:none;' src='../../../../images/eg_tiny_logo.jpg'/></a>
+        </div>
+</div>
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 (file)
index 0000000..14d2b8b
--- /dev/null
@@ -0,0 +1,135 @@
+
+<div id='canvas_main' class='home_search canvas'
+       style='-moz-border-radius: 6px; padding: 6px; margin-top: 65px;' 
+       xmlns="http://www.w3.org/1999/xhtml" xmlns:xi="http://www.w3.org/2001/XInclude">
+
+       <!-- load my js -->
+       <script language='javascript' type='text/javascript'
+               src="<!--#echo var="OILS_OPAC_JS_HOST"-->/skin/default/js/depth_selector.js"> </script>
+       <script language='javascript' type='text/javascript'
+               src="<!--#echo var="OILS_OPAC_JS_HOST"-->/skin/default/js/search_bar.js"> </script>
+
+       <script language='javascript' type='text/javascript'>
+               config.ids.searchbar = {};
+               config.css.searchbar = {};
+               config.ids.searchbar.text                               = 'search_box'; 
+               config.ids.searchbar.submit                     = 'search_submit';      
+               config.ids.searchbar.type_selector      = 'search_type_selector';
+               config.ids.searchbar.depth_selector     = 'depth_selector';
+               config.ids.searchbar.form_selector      = 'form_selector';
+               config.ids.searchbar.extra_row          = 'searchbar_extra';
+               config.ids.searchbar.main_row                   = 'searchbar_main_row';
+               config.ids.searchbar.table                              = 'searchbar_table';
+               config.ids.searchbar.location_tag       = 'search_location_tag_link';
+               config.ids.searchbar.lib_sel_span       = 'lib_selector_span';
+               config.ids.searchbar.lib_sel_link       = 'lib_selector_link';
+               config.ids.searchbar.depth_sel_span     = 'depth_selector_span';
+       </script>
+
+
+       <div style='width: 100%; text-align: center'>
+               <img src='<!--#echo var="OILS_BASE"-->/images/hrsrh_logo.png' />
+       </div>
+
+       <style>.rowpad { height: 20px; }</style>
+
+       <table id='frontsearch_table' height='100%' width='100%' 
+               style='margin-top: 10px; border-collapse: collapse;'>
+
+               <tbody>
+
+                       <tr class='color_3'>
+
+                               <script language='javascript' type='text/javascript'>
+                                       config.ids.common.now_searching = 'now_searching_location';
+                               </script>
+
+                               <td style='padding: 6px;' class='border_5' align='center'>
+                                       <span>&opac.search.nowSearching;</span>
+                                       <span style='padding: 1px;' id='now_searching_location'>  </span>
+                               </td>
+                       </tr>
+
+
+                       <tr class='rowpad'><td></td></tr>
+
+                       <tr>
+                               <td nowrap='nowrap' align='center' class='color_1 border_5'>
+                                       <input id='search_box' style='width: 300px;' type='text' />
+                                       <span style='padding-left: 6px;'>
+                                               <input type='button' style='width: 40px;' id='search_submit' value='Go!' />
+                                       </span>
+                               </td>
+                       </tr>
+
+                       <tr class='rowpad'><td></td></tr>
+
+                       <tr class='color_3 border_5'>
+
+                               <td nowrap='nowrap' align='center' style='padding: 4px;'>
+
+                                       <span style='padding-right:40px;'>
+                                               <!--#include virtual="../common/stypes_selector.xml"-->
+                                       </span>
+
+                                       <span>
+                                               <!--
+                                               <span>&common.format;: </span>
+                                               -->
+                                               <!--#set var='FORM_SEL_ID' value='form_selector'-->
+                                               <!--#include virtual="../common/format_selector.xml"-->
+                                       </span>
+
+                               </td>
+                       </tr>
+
+                       <tr class='rowpad'><td></td></tr>
+
+                       <tr class='color_1 border_5'>
+                               <td align='center' style='padding: 4px; padding-bottom: 6px;'>
+                                       <span style='padding-right: 15px;'>
+                                               <a id='home_adv_search_link' href='javascript:void(0);'>&opac.navigate.advanced;</a></span>
+                                       <span>
+                                               <span class='hide_me' id='depth_selector_span'>
+                                                       <select id='depth_selector' >
+                                                               <option value='new'>&opac.navigate.selectNewOrg;...</option>
+                                                       </select>
+                                               </span>
+                                               <span class='hide_me' id='lib_selector_span'>
+                                                       <a id='lib_selector_link' href='javascript:void(0)'>&opac.navigate.selectOrg;</a>
+                                               </span>
+                                       </span>
+                                       <span style='padding-left: 15px;'>
+                                               <a id='home_myopac_link' href='javascript:void(0);'>&opac.navigate.myopac;</a>
+                                       </span>
+                               </td>
+                       </tr>
+
+            <!-- locale picker -->
+            <tr><td align='center' valign='bottom' style='padding-top:10px;'>
+                       <span style='vertical-align: top;'>&common.language;</span>
+                       <span dojoType="dijit.form.FilteringSelect" store="openils.I18N.localeStore" 
+                    searchAttr="label" required="false" jsId='opacLocaleSelector'>
+                    <script>
+                        dojo.addOnLoad(function() {
+                            opacLocaleSelector.setValue(locale);
+                            dojo.connect(opacLocaleSelector, 'onChange', 
+                                function () {
+                                                       location.href = location.href.replace(/opac\/[^\/]+\/skin/, 'opac/' + this.getValue() + '/skin');
+                                }
+                            );
+                        });
+                    </script>
+                       </span>
+            </td></tr>
+
+               </tbody>
+       </table>
+
+</div>
+
+
+
+
+
+
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 (file)
index 0000000..3297622
--- /dev/null
@@ -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 <option> elements */
+.disabled_option { color: #808080; }
+
+.copy_more_info { padding-left: 6px; color: #804070; }
+
+.invalid_hold { background: #F0F0D0; }
+.myopac_summary_table td { padding : 3px; }
+
+.jacket_attrib { font-size: 7pt; }
+
+/* block that contains footer links and copyright */
+#copyright_block { 
+    width: 100%; 
+    text-align: center; 
+    vertical-align: bottom; 
+    margin-top: 10px;
+}
+
+/* block that contains the footer links */
+#footer_links {
+    width: 80%;
+    text-align: center;
+    padding: 10px;
+    margin: auto;
+}
+
+/* span for each link in the footer */
+.footer-link {
+    margin-left: 10px;
+    margin-right: 10px;
+}
+
+/* block that contains the copyright text */
+#copyright_text {
+    margin-top: 4px;
+}
+
+/* block that contains the logo */
+#footer_logo {
+    text-align: center;
+    margin: auto;
+}
+
+#opac.result.sort { margin-left: 5px; }
+
+#xul_recipient_me { margin-left: 25px; }
+#myopac_holds_thaw_date_form {padding: 10px; text-align: center;}
+#myopac_holds_freeze_select_thaw {margin-right: 100px; margin-left: 100px; }
+
+tr[name="myopac_invalid_addr_row"] td {
+    background:#e0e0e0;
+    color:red;
+}
diff --git a/Open-ILS/web/opac/skin/lul/js/result_common.js b/Open-ILS/web/opac/skin/lul/js/result_common.js
new file mode 100644 (file)
index 0000000..b2d727a
--- /dev/null
@@ -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("<div style='text-align: center; width: 100%; margin-left: auto; margin-right: auto;'><strong>" +
+            esItem.description + "</strong>: <a class='classic_link' href='" +
+            extraSearchStuff.searchTerms + "'>" + extraSearchStuff.displayTerms + "</a><div>", "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_<depth>_<pagePosition>'  */
+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/lul/xml/common/css_common.xml b/Open-ILS/web/opac/skin/lul/xml/common/css_common.xml
new file mode 100644 (file)
index 0000000..1800eee
--- /dev/null
@@ -0,0 +1,23 @@
+<!-- CSS shared across pages goes here --> 
+
+<link type='text/css' rel='stylesheet' href="<!--#echo var='OILS_SKIN_BASE'-->/lul/css/layout.css"/>
+
+<!-- Our font CSS's -->
+<link type='text/css' rel='stylesheet' href='<!--#echo var="OILS_CSS_BASE"-->/mediumfont.css' />
+
+<!-- Our colors -->
+<link type='text/css' rel="stylesheet" href="<!--#echo var='OILS_THEME_BASE'-->/lul/css/colors.css" />
+
+<!-- An alternate stylesheet -->
+<link type='text/css' rel="alternate stylesheet" title='&opac.style.reddish;' href="<!--#echo var='OILS_THEME_BASE'-->/reddish/css/colors.css" />
+
+<!-- OpenSearch auto discovery -->
+<link type="application/opensearchdescription+xml"
+       rel='search' title="Laurentian Library Catalogue"
+       href="http://<!--#echo var='SERVER_NAME'-->/opac/extras/opensearch/1.1/LUSYS/LUSYS/osd.xml" />
+
+<!-- enable Dojo date picker -->
+<style type="text/css">
+       @import '/js/dojo/dojo/resources/dojo.css';
+       @import '/js/dojo/dijit/themes/tundra/tundra.css';
+</style>
diff --git a/Open-ILS/web/opac/skin/lul/xml/common/logo.xml b/Open-ILS/web/opac/skin/lul/xml/common/logo.xml
new file mode 100644 (file)
index 0000000..7793a6a
--- /dev/null
@@ -0,0 +1,4 @@
+<div id='logo_div'>
+       <script language='javascript' type='text/javascript'>config.ids.common.top_logo = "top_left_logo";</script>
+       <img style='margin-right: 4px; height: 73px; width: 260px;' src='<!--#echo var="OILS_BASE"-->/images/lul_logo_small.png' id='top_left_logo' border='0' class='logo' />
+</div>
diff --git a/Open-ILS/web/opac/skin/lul/xml/footer.xml b/Open-ILS/web/opac/skin/lul/xml/footer.xml
new file mode 100644 (file)
index 0000000..0d2e973
--- /dev/null
@@ -0,0 +1,50 @@
+<div id='copyright_block'>
+               <div id='footer_links'>
+                               <span class='footer_link'>
+                                       <a class='classic_link'
+                                               href='/opac/<!--#echo var="locale"-->/extras/slimpac/start.html'>&opac.basic;</a>
+                               </span> 
+                               <span> | </span>
+                               <span class='footer_link'>
+                                       <a target='_blank' class='classic_link'
+                                               href='&lu.footer.help.url;'>&footer.help;</a>
+                               </span>
+                               <span> | </span>
+                               <span class='footer_link'>
+                                       <a target='_blank' class='classic_link'
+                                               href='&lu.footer.ejournals.url;'>&lu.footer.ejournals;</a>
+                               </span> 
+                               <span> | </span>
+                               <span class='footer_link'>
+                                       <a target='_blank' class='classic_link'
+                                               href='&lu.footer.databases.url;'>&lu.footer.databases;</a>
+                               </span> 
+                               <span> | </span>
+                               <span class='footer_link'>
+                                       <a target='_blank' class='classic_link'
+                                               href='&lu.footer.library.url;'>&lu.footer.library.about;</a>
+                               </span>
+                               <span> | </span>
+                               <span class='footer_link'>
+                                       <a target='_blank' class='classic_link'
+                                               href='&lu.footer.archives.url;'>&lu.footer.archives;</a>
+                               </span>
+                               <span> | </span>
+                <span class='footer_link'>
+                    <a target='_blank' class='classic_link'
+                        href='&lu.footer.reserves.url;'>&lu.footer.reserves;</a>
+                </span>
+                               <span> | </span>
+                               <span class='footer_link'>
+                                       <a target='_blank' class='classic_link'
+                                               href='&lu.footer.feedback.url;'>&lu.footer.feedback;</a>
+                               </span>
+
+               </div>
+        <div id='copyright_text'>
+            <span>&footer.copyright;</span>
+        </div>
+        <div id='footer_logo'>&footer.logo;
+            <a href='http://open-ils.org'><img style='border:none;' src='../../../../images/eg_tiny_logo.jpg'/></a>
+        </div>
+</div>
diff --git a/Open-ILS/web/opac/skin/lul/xml/home/homesearch.xml b/Open-ILS/web/opac/skin/lul/xml/home/homesearch.xml
new file mode 100644 (file)
index 0000000..97ca3f5
--- /dev/null
@@ -0,0 +1,135 @@
+
+<div id='canvas_main' class='home_search canvas'
+       style='-moz-border-radius: 6px; padding: 6px; margin-top: 65px;' 
+       xmlns="http://www.w3.org/1999/xhtml" xmlns:xi="http://www.w3.org/2001/XInclude">
+
+       <!-- load my js -->
+       <script language='javascript' type='text/javascript'
+               src="<!--#echo var="OILS_OPAC_JS_HOST"-->/skin/default/js/depth_selector.js"> </script>
+       <script language='javascript' type='text/javascript'
+               src="<!--#echo var="OILS_OPAC_JS_HOST"-->/skin/default/js/search_bar.js"> </script>
+
+       <script language='javascript' type='text/javascript'>
+               config.ids.searchbar = {};
+               config.css.searchbar = {};
+               config.ids.searchbar.text                               = 'search_box'; 
+               config.ids.searchbar.submit                     = 'search_submit';      
+               config.ids.searchbar.type_selector      = 'search_type_selector';
+               config.ids.searchbar.depth_selector     = 'depth_selector';
+               config.ids.searchbar.form_selector      = 'form_selector';
+               config.ids.searchbar.extra_row          = 'searchbar_extra';
+               config.ids.searchbar.main_row                   = 'searchbar_main_row';
+               config.ids.searchbar.table                              = 'searchbar_table';
+               config.ids.searchbar.location_tag       = 'search_location_tag_link';
+               config.ids.searchbar.lib_sel_span       = 'lib_selector_span';
+               config.ids.searchbar.lib_sel_link       = 'lib_selector_link';
+               config.ids.searchbar.depth_sel_span     = 'depth_selector_span';
+       </script>
+
+
+       <div style='width: 100%; text-align: center'>
+               <img style='height: 118px; width: 586px;' src='<!--#echo var="OILS_BASE"-->/images/lul_logo.png' />
+       </div>
+
+       <style type="text/css">.rowpad { height: 20px; }</style>
+
+       <table id='frontsearch_table' height='100%' width='100%' 
+               style='margin-top: 10px; border-collapse: collapse;'>
+
+               <tbody>
+
+                       <tr class='color_3'>
+
+                               <script language='javascript' type='text/javascript'>
+                                       config.ids.common.now_searching = 'now_searching_location';
+                               </script>
+
+                               <td style='padding: 6px;' class='border_5' align='center'>
+                                       <span>&opac.search.nowSearching;</span>
+                                       <span style='padding: 1px;' id='now_searching_location'>  </span>
+                               </td>
+                       </tr>
+
+
+                       <tr class='rowpad'><td></td></tr>
+
+                       <tr>
+                               <td nowrap='nowrap' align='center' class='color_1 border_5'>
+                                       <input id='search_box' style='width: 300px;' type='text' />
+                                       <span style='padding-left: 6px;'>
+                                               <input type='button' style='width: 40px;' id='search_submit' value='Go!' />
+                                       </span>
+                               </td>
+                       </tr>
+
+                       <tr class='rowpad'><td></td></tr>
+
+                       <tr class='color_3 border_5'>
+
+                               <td nowrap='nowrap' align='center' style='padding: 4px;'>
+
+                                       <span style='padding-right:40px;'>
+                                               <!--#include virtual="../common/stypes_selector.xml"-->
+                                       </span>
+
+                                       <span>
+                                               <!--
+                                               <span>&common.format;: </span>
+                                               -->
+                                               <!--#set var='FORM_SEL_ID' value='form_selector'-->
+                                               <!--#include virtual="../common/format_selector.xml"-->
+                                       </span>
+
+                               </td>
+                       </tr>
+
+                       <tr class='rowpad'><td></td></tr>
+
+                       <tr class='color_1 border_5'>
+                               <td align='center' style='padding: 4px; padding-bottom: 6px;'>
+                                       <span style='padding-right: 15px;'>
+                                               <a id='home_adv_search_link' href='javascript:void(0);'>&opac.navigate.advanced;</a></span>
+                                       <span>
+                                               <span class='hide_me' id='depth_selector_span'>
+                                                       <select id='depth_selector' >
+                                                               <option value='new'>&opac.navigate.selectNewOrg;...</option>
+                                                       </select>
+                                               </span>
+                                               <span class='hide_me' id='lib_selector_span'>
+                                                       <a id='lib_selector_link' href='javascript:void(0)'>&opac.navigate.selectOrg;</a>
+                                               </span>
+                                       </span>
+                                       <span style='padding-left: 15px;'>
+                                               <a id='home_myopac_link' href='javascript:void(0);'>&opac.navigate.myopac;</a>
+                                       </span>
+                               </td>
+                       </tr>
+
+            <!-- locale picker -->
+            <tr><td align='center' valign='bottom' style='padding-top:10px;'>
+                       <span style='vertical-align: top;'>&common.language;</span>
+                       <span dojoType="dijit.form.FilteringSelect" store="openils.I18N.localeStore" 
+                    searchAttr="label" required="false" jsId='opacLocaleSelector'>
+                    <script type="text/javascript">
+                        dojo.addOnLoad(function() {
+                            opacLocaleSelector.setValue(locale);
+                            dojo.connect(opacLocaleSelector, 'onChange', 
+                                function () {
+                                                       location.href = location.href.replace(/opac\/[^\/]+\/skin/, 'opac/' + this.getValue() + '/skin');
+                                }
+                            );
+                        });
+                    </script>
+                       </span>
+            </td></tr>
+
+               </tbody>
+       </table>
+
+</div>
+
+
+
+
+
+
diff --git a/Open-ILS/web/opac/skin/lul/xml/rdetail/rdetail_summary.xml b/Open-ILS/web/opac/skin/lul/xml/rdetail/rdetail_summary.xml
new file mode 100644 (file)
index 0000000..2ec3e81
--- /dev/null
@@ -0,0 +1,530 @@
+
+<abbr name="unapi" class="unapi-id" title='tag:<!--#echo var="HTTP_HOST"-->,<!--#echo var="OILS_TIME_YEAR"-->:biblio-record_entry/<!--#echo var="OILS_OPAC_RID"-->'></abbr>
+<!-- This holds the record summary information -->
+<div>
+       <!-- Hack to give IE somewhere to put these things; should just rip out from rdetail.js -->
+       <span class='hide_me' id='rdetail_title'></span>
+       <span class='hide_me' id='rdetail_isbn'></span>
+       <span class='hide_me' id='rdetail_publisher'></span>
+       <span class='hide_me' id='rdetail_abstract'></span>
+       <span class='hide_me' id='rdetail_edition'></span>
+       <table id='rdetail_details_table'>
+               <tbody id='rdetail_details_tbody'>
+
+                       <tr>
+                               <td id='rdetail_image_cell' rowspan='40'>
+                                       <a id='rdetail_img_link'>
+                                               <img style='border: none;' id='rdetail_image' 
+                            onerror='
+                                hideMe($("rdetail.jacket_attrib_div"));
+                                hideMe($("rdetail_img_link"));'/>
+                                       </a>
+                    <!-- vendor attribution link -->
+                    <div class='jacket_attrib hide_me' id='rdetail.jacket_attrib_div'>
+                        <div>&opac.image_provided;</div>
+                        <div><a target='_blank' href='&vendor.base_link;' 
+                            class='classic_link' id='rdetail.jacket_attrib_link'>&vendor.name;</a></div>
+                    </div>
+                               </td>
+                               <td nowrap='nowrap' class='rdetail_desc'>&common.title;</td>            
+                                <td type='opac/slot-data' query='datafield[tag=245]' class='rdetail_item'>
+                                         <script type='opac/slot-format'><![CDATA[
+                                               var rdetail_bib_title = BT.textContent(item);
+                                               var title_node = dojo.query('head title');
+                                               dojo.addOnLoad(function() {dojo.place('<title>' + rdetail_bib_title + '</title>', title_node[0], 'replace');});
+                                                return '<span>' + rdetail_bib_title + '</span><br/>';
+                                        ]]></script>
+                                </td>
+                       </tr>
+
+                       <tr class='hide_me' id='tag246'>
+                               <td nowrap='nowrap' class='rdetail_desc'>&common.alternate.title;</td>
+                               <td type='opac/slot-data' query='datafield[tag=246] subfield[code=a]' class='rdetail_item'>
+                                       <script type='opac/slot-format'><![CDATA[
+                                               dojo.query('#tag246').removeClass('hide_me');
+                                               return '<span>' + BT.textContent(item) + '</span><br/>';
+                                       ]]></script>
+                               </td>
+                       </tr>
+                       <tr class='hide_me' id='tag247'>
+                               <td nowrap='nowrap' class='rdetail_desc'>&common.former.title;</td>
+                               <td type='opac/slot-data' query='datafield[tag="247"]' class='rdetail_item'>
+                                       <script type='opac/slot-format'><![CDATA[
+                                               dojo.query('#tag247').removeClass('hide_me');
+                                               return '<span>' + BT.textContent(item) + '</span><br/>';
+                                       ]]></script>
+                               </td>
+                       </tr>
+
+                       <tr class='hide_me'>
+                               <td nowrap='nowrap' class='rdetail_desc'>&common.author;</td>           
+                               <td class='rdetail_item'>
+                                       <a title='&rdetail.author.search;' id='rdetail_author'> </a>
+                               </td>
+                       </tr>
+                       <tr class='hide_me' id='tag100'>
+                               <td nowrap='nowrap' class='rdetail_desc'>&common.author;</td>
+                               <td type='opac/slot-data' query='datafield[tag=100]' class='rdetail_item'>
+                                       <script type='opac/slot-format'><![CDATA[
+                                               dojo.query('#tag100').removeClass('hide_me');
+                                               return '<span>' + BT.textContent(item) + '</span><br/>';
+                                       ]]></script>
+                               </td>
+                       </tr>
+                       <tr class='hide_me' id='tag110'>
+                               <td nowrap='nowrap' class='rdetail_desc'>&common.corporate.author;</td>
+                               <td type='opac/slot-data' query='datafield[tag=110]' class='rdetail_item'>
+                                       <script type='opac/slot-format'><![CDATA[
+                                               dojo.query('#tag110').removeClass('hide_me');
+                                               return '<span>' + BT.textContent(item) + '</span><br/>';
+                                       ]]></script>
+                               </td>
+                       </tr>
+                       <tr class='hide_me' id='tag111'>
+                               <td nowrap='nowrap' class='rdetail_desc'>&common.meeting.name;</td>
+                               <td type='opac/slot-data' query='datafield[tag=111]' class='rdetail_item'>
+                                       <script type='opac/slot-format'><![CDATA[
+                                               dojo.query('#tag111').removeClass('hide_me');
+                                               return '<span>' + BT.textContent(item) + '</span><br/>';
+                                       ]]></script>
+                               </td>
+                       </tr>
+                       <tr class='hide_me' id='tag020'>
+                               <td nowrap='nowrap' class='rdetail_desc'>&common.isbn;</td>                     
+                               <td type='opac/slot-data' query='datafield[tag=020]' class='rdetail_item'>
+                                   <script type='opac/slot-format'><![CDATA[
+                                       dojo.query('#tag020').removeClass('hide_me');
+                                       return '<span>' + BT.textContent(item) + '</span><br/>';
+                                   ]]></script>
+                               </td>
+
+                       </tr>
+                       <tr class='hide_me' id='tag022'>
+                               <td nowrap='nowrap' class='rdetail_desc' id='issn_title'>&common.issn;</td>                     
+                               <td type='opac/slot-data' query='datafield[tag=022]' class='rdetail_item' id='rdetail_issn'>
+                                   <script type='opac/slot-format'><![CDATA[
+                                       dojo.query('#tag022').removeClass('hide_me');
+                                       var issn_raw = dojo.trim(BT.textContent(item));
+
+                                       // textContent returns multiple subfields concatenated with linefeeds,
+                                       // so our regex needs to match against linefeeds. "." does not match
+                                       // linefeeds, so get \s into the mix
+                                        var issn = issn_raw.replace(/^(\s|.)*?(\d{4}).(\d{3,4}[xX]?)(\s|.)*/, "$2-$3");
+
+                                       var ses = new OpenSRF.ClientSession('open-ils.resolver');       
+                                       var req = ses.request('open-ils.resolver.resolve_holdings.raw', 'issn', issn);  
+                                       req.oncomplete = function(r) {
+                                               var msg;
+                                               dojo.forEach(r.recv().content(), function(entry) {
+                                                       if (first_issn) {
+                                                               dojo.query('#rdetail_online *').orphan();
+                                                               first_issn = false;
+                                                       }
+                                                       dojo.place('<div style="width: 100%">'
+                                                               + ' <a class="search_link" href="' + entry.target_url
+                                                               + '">' + entry.public_name + '</a> - '
+                                                               + entry.target_coverage
+                                                               + (entry.target_embargo ? (' / ' + entry.target_embargo) : '') 
+                                                               + '</div>', 'rdetail_online');
+                                                       dojo.query('#rdetail_online_row').removeClass('hide_me');
+                                               });
+                                       }
+                                       req.send();
+
+                                       return '<span>' + issn + '</span><br/>';
+                                   ]]></script>
+                               </td>
+
+                       </tr>
+
+                       <tr class='hide_me' id='tag250'>
+                               <td nowrap='nowrap' class='rdetail_desc'>&common.edition;</td>
+                               <td type='opac/slot-data' query='datafield[tag=250]' class='rdetail_item'>
+                                   <script type='opac/slot-format'><![CDATA[
+                                       dojo.query('#tag250').removeClass('hide_me');
+                                       return '<span>' + BT.textContent(item) + '</span><br/>';
+                                   ]]></script>
+                           </td>
+                       </tr>
+
+                       <tr class='hide_me'>
+                               <td nowrap='nowrap' class='rdetail_desc'>&common.pubdate;</td>          
+                               <td class='rdetail_item' id='rdetail_pubdate'> </td>
+                       </tr>
+
+                       <tr class='hide_me' id='tag260'>
+                               <td nowrap='nowrap' class='rdetail_desc'>&common.publisher;</td>                
+                               <td type='opac/slot-data' query='datafield[tag=260]' class='rdetail_item'>
+                                   <script type='opac/slot-format'><![CDATA[
+                                       dojo.query('#tag260').removeClass('hide_me');
+                                       return '<span>' + BT.textContent(item) + '</span><br/>';
+                                   ]]></script>
+                           </td> 
+                       </tr>
+
+
+                       <tr>
+                               <td nowrap='nowrap' class='rdetail_desc'>&common.physical;</td>         
+                               <td class='rdetail_item' id='rdetail_physical_desc'> </td>
+                       </tr>
+
+                       <tr>
+                               <td nowrap='nowrap' class='rdetail_desc'>&common.format;</td>                   
+                               <td class='rdetail_item'>
+                                       <img id='rdetail_tor_pic' class='tor_pic' />
+                                       <span id='rdetail_tor' style='padding-left: 5px;'> </span>
+                               </td>
+                       </tr>
+
+                       <tr class='hide_me' id='tag520'>
+                               <td nowrap='nowrap' class='rdetail_desc'>&rdetail.detailMain.abstract;</td>     
+                               <td type='opac/slot-data' query='datafield[tag=520]' class='rdetail_item'>
+                                   <script type='opac/slot-format'><![CDATA[
+                                       dojo.query('#tag520').removeClass('hide_me');
+                                       return '<span>' + BT.textContent(item) + '</span><br/>';
+                                   ]]></script>
+                               </td>
+
+                       </tr>
+
+            <!-- *** Example of how to use the openils.BibTemplate infrastructure to augment the stock
+                 *** summary screen with complex information, such as new search links on subjects. -->
+                <tr class='hide_me' id='tag600'>
+                        <td nowrap='nowrap' class='rdetail_desc'>&common.subject.600;</td>
+                        <td type='opac/slot-data' query='datafield[tag^=600]' class='rdetail_item'>
+                        <script type='opac/slot-format'><![CDATA[
+                               return subjectMe('#tag600', item);
+                       ]]></script>
+                       </td>
+               </tr>
+               <tr class='hide_me' id='tag610'>
+                        <td nowrap='nowrap' class='rdetail_desc'>&common.subject.610;</td>
+                        <td type='opac/slot-data' query='datafield[tag^=610]' class='rdetail_item'>
+                        <script type='opac/slot-format'><![CDATA[
+                               return subjectMe('#tag610', item);
+                       ]]></script>
+                       </td>
+               </tr>
+               <tr class='hide_me' id='tag611'>
+                        <td nowrap='nowrap' class='rdetail_desc'>&common.subject.611;</td>
+                        <td type='opac/slot-data' query='datafield[tag^=611]' class='rdetail_item'>
+                        <script type='opac/slot-format'><![CDATA[
+                               return subjectMe('#tag611', item);
+                       ]]></script>
+                       </td>
+               </tr>
+               <tr class='hide_me' id='tag630'>
+                        <td nowrap='nowrap' class='rdetail_desc'>&common.subject.630;</td>
+                        <td type='opac/slot-data' query='datafield[tag^=630]' class='rdetail_item'>
+                        <script type='opac/slot-format'><![CDATA[
+                               return subjectMe('#tag630', item);
+                       ]]></script>
+                       </td>
+               </tr>
+               <tr class='hide_me' id='tag648'>
+                        <td nowrap='nowrap' class='rdetail_desc'>&common.subject.648;</td>
+                        <td type='opac/slot-data' query='datafield[tag^=648]' class='rdetail_item'>
+                        <script type='opac/slot-format'><![CDATA[
+                               return subjectMe('#tag648', item);
+                       ]]></script>
+                       </td>
+               </tr>
+               <tr class='hide_me' id='tag650'>
+                        <td nowrap='nowrap' class='rdetail_desc'>&common.subjects;</td>
+                        <td type='opac/slot-data' query='datafield[tag^=650]' class='rdetail_item'>
+                        <script type='opac/slot-format'><![CDATA[
+                               return subjectMe('#tag650', item);
+                       ]]></script>
+                       </td>
+               </tr>
+               <tr class='hide_me' id='tag651'>
+                        <td nowrap='nowrap' class='rdetail_desc'>&common.subject.651;</td>
+                        <td type='opac/slot-data' query='datafield[tag^=651]' class='rdetail_item'>
+                        <script type='opac/slot-format'><![CDATA[
+                               return subjectMe('#tag651', item);
+                       ]]></script>
+                       </td>
+               </tr>
+               <tr class='hide_me' id='tag653'>
+                        <td nowrap='nowrap' class='rdetail_desc'>&common.subject.653;</td>
+                        <td type='opac/slot-data' query='datafield[tag^=653]' class='rdetail_item'>
+                        <script type='opac/slot-format'><![CDATA[
+                               return subjectMe('#tag653', item);
+                       ]]></script>
+                       </td>
+               </tr>
+               <tr class='hide_me' id='tag654'>
+                        <td nowrap='nowrap' class='rdetail_desc'>&common.subject.654;</td>
+                        <td type='opac/slot-data' query='datafield[tag^=654]' class='rdetail_item'>
+                        <script type='opac/slot-format'><![CDATA[
+                               return subjectMe('#tag654', item);
+                       ]]></script>
+                       </td>
+               </tr>
+               <tr class='hide_me' id='tag655'>
+                        <td nowrap='nowrap' class='rdetail_desc'>&common.subject.655;</td>
+                        <td type='opac/slot-data' query='datafield[tag^=655]' class='rdetail_item'>
+                        <script type='opac/slot-format'><![CDATA[
+                               return subjectMe('#tag655', item);
+                       ]]></script>
+                       </td>
+               </tr>
+               <tr class='hide_me' id='tag656'>
+                        <td nowrap='nowrap' class='rdetail_desc'>&common.subject.656;</td>
+                        <td type='opac/slot-data' query='datafield[tag^=656]' class='rdetail_item'>
+                        <script type='opac/slot-format'><![CDATA[
+                               return subjectMe('#tag656', item);
+                       ]]></script>
+                       </td>
+               </tr>
+               <tr class='hide_me' id='tag657'>
+                        <td nowrap='nowrap' class='rdetail_desc'>&common.subject.657;</td>
+                        <td type='opac/slot-data' query='datafield[tag^=657]' class='rdetail_item'>
+                        <script type='opac/slot-format'><![CDATA[
+                               return subjectMe('#tag657', item);
+                       ]]></script>
+                       </td>
+               </tr>
+               <tr class='hide_me' id='tag658'>
+                        <td nowrap='nowrap' class='rdetail_desc'>&common.subject.658;</td>
+                        <td type='opac/slot-data' query='datafield[tag^=658]' class='rdetail_item'>
+                        <script type='opac/slot-format'><![CDATA[
+                               return subjectMe('#tag658', item);
+                       ]]></script>
+                       </td>
+               </tr>
+               <tr class='hide_me' id='tag662'>
+                        <td nowrap='nowrap' class='rdetail_desc'>&common.subject.662;</td>
+                        <td type='opac/slot-data' query='datafield[tag^=662]' class='rdetail_item'>
+                        <script type='opac/slot-format'><![CDATA[
+                               return subjectMe('#tag662', item);
+                       ]]></script>
+                       </td>
+               </tr>
+
+               <tr class='hide_me' id='tag500'>
+                       <td nowrap='nowrap' class='rdetail_desc'>&common.general.note;</td>
+                       <td type='opac/slot-data' query='datafield[tag=500]' class='rdetail_item'>
+                               <script type='opac/slot-format'><![CDATA[
+                               dojo.query('#tag500').removeClass('hide_me');
+                               return '<span>' + BT.textContent(item) + '</span><br/>';
+                               ]]></script>
+                       </td>
+               </tr>
+               <tr class='hide_me' id='tag505'>
+                       <td nowrap='nowrap' class='rdetail_desc'>&common.contents.note;</td>
+                       <td type='opac/slot-data' query='datafield[tag=505]' class='rdetail_item'>
+                               <script type='opac/slot-format'><![CDATA[
+                               dojo.query('#tag505').removeClass('hide_me');
+                               return '<span>' + BT.textContent(item) + '</span><br/>';
+                               ]]></script>
+                       </td>
+               </tr>
+               <tr class='hide_me' id='tag506'>
+                       <td nowrap='nowrap' class='rdetail_desc'>&common.usage.restrictions;</td>
+                       <td type='opac/slot-data' query='datafield[tag=506] subfield[code=a]' class='rdetail_item'>
+                               <script type='opac/slot-format'><![CDATA[
+                               dojo.query('#tag506').removeClass('hide_me');
+                               return '<span>' + BT.textContent(item) + '</span> ';
+                               ]]></script>
+                       </td>
+               </tr>
+               <tr class='hide_me' id='tag511'>
+                       <td nowrap='nowrap' class='rdetail_desc'>&common.performer.note;</td>
+                       <td type='opac/slot-data' query='datafield[tag=511]' class='rdetail_item'>
+                               <script type='opac/slot-format'><![CDATA[
+                               dojo.query('#tag511').removeClass('hide_me');
+                               return '<span>' + BT.textContent(item) + '</span><br/>';
+                               ]]></script>
+                       </td>
+               </tr>
+               <tr class='hide_me' id='tag700'>
+                       <td nowrap='nowrap' class='rdetail_desc'>&common.additional.authors;</td>
+                       <td type='opac/slot-data' query='datafield[tag=700]' class='rdetail_item'>
+                               <script type='opac/slot-format'><![CDATA[
+                               dojo.query('#tag700').removeClass('hide_me');
+                               var text = '';
+                               var list = dojo.query( 'subfield:not([code=4])', item );
+                               for (var i =0; i < list.length; i++) {
+                                       text += BT.textContent(list[i]) + ' ';
+                               }
+                               return '<span>' + text + '</span><br/>';
+                               ]]></script>
+                       </td>
+               </tr>
+               <tr class='hide_me' id='tag780'>
+                       <td nowrap='nowrap' class='rdetail_desc'>&common.preceding.entry;</td>
+                       <td type='opac/slot-data' query='datafield[tag=780]' class='rdetail_item'>
+                               <script type='opac/slot-format'><![CDATA[
+                               dojo.query('#tag780').removeClass('hide_me');
+                               return '<span>' + BT.textContent(item) + '</span><br/>';
+                               ]]></script>
+                       </td>
+               </tr>
+               <tr class='hide_me' id='tag785'>
+                       <td nowrap='nowrap' class='rdetail_desc'>&common.succeeding.entry;</td>
+                       <td type='opac/slot-data' query='datafield[tag=785]' class='rdetail_item'>
+                               <script type='opac/slot-format'><![CDATA[
+                               dojo.query('#tag785').removeClass('hide_me');
+                               return '<span>' + BT.textContent(item) + '</span><br/>';
+                               ]]></script>
+                       </td>
+               </tr>
+               <tr class='hide_me' id='rdetail_online_row'>
+                       <!-- *** Example of how to use the openils.BibTemplate infrastructure to augment the stock
+                            *** summary screen with complex information, such as location-specific URIs (856$9). -->
+                       <td nowrap='nowrap' class='rdetail_desc'>&rdetail.summary.online;</td>
+                       <td class='rdetail_item' id='rdetail_online' type='opac/slot-data' query='volumes volume uris uri'>
+                               <script type='opac/slot-format'><![CDATA[
+                                       dojo.query('*:not([type^=opac])', 'rdetail_online').orphan();
+                                       var uri = new Object;
+                                       uri.href = item.getAttribute('href');
+                                       uri.label = item.getAttribute('label');
+                                       uri.use = item.getAttribute('use_restriction');
+                                       if (uri.href == uri.label) {
+                                               if (uri.use && uri.use != uri.label) {
+                                                       uri.label = uri.use;
+                                                       uri.use = null;
+                                               }
+                                       }
+                                       var link = '<a class="search_link" href="' + uri.href + '">' + uri.label + '</a>';
+                                       if (uri.use) {
+                                               link += ' (' + uri.use + ')';
+                                       }
+                                       return '<span>' + link + '</span><br/>';
+                               ]]></script>
+                       </td>
+               </tr>
+                       <tr name="serial_holdings_label"
+                               class="result_table_title_cell hide_me">
+                <td class="rdetail_desc">&rdetail.summary.issues_held;</td>
+                <td templated="true" type="opac/slot-data"
+                    query="datafield[tag='901'] subfield[code='c']"
+                    class="rdetail_item">
+                    ${holdingsStatement}
+                                       <span class="hide_me" name="holdingsStatement" type="opac/template-value"><![CDATA[
+                        if (fetchOrgSettingDefault(
+                            getLocation(),
+                            "opac.fully_compressed_serial_holdings"
+                        )) {
+                            var bibid = BT.textContent(item_list[0]);
+                            var blob = fieldmapper.standardRequest(
+                                ["open-ils.serial",
+                                    "open-ils.serial.bib.summary_statements"],
+                                [bibid, {
+                                    "orgid": getLocation(), "depth": getDepth()
+                                }]
+                            );
+
+                            var fake = dojo.create("td");
+                            var something = false;
+
+                            for (var i in blob) {
+                                if (!blob[i].length) continue;
+                                if (something) dojo.create("br", null, fake);
+                                something = true;
+
+                                var a = dojo.create(
+                                    "a", {
+                                        "innerHTML": "[+]",
+                                        "href": "javascript:void(0);",
+                                        "onclick":
+                                            "rdetailDrawExpandedHoldings(this,"+
+                                            bibid + ",'" + i + "');",
+                                        "style": {"marginRight": "1.5em"}
+                                    }, fake
+                                );
+                                dojo.create(
+                                    "span", {
+                                        "innerHTML": blob[i].join(", ")
+                                    }, fake
+                                );
+                                dojo.create(
+                                    "span", {"id": "holding_type_" + i}, fake
+                                );
+                            }
+
+                            if (something)
+                                unHideMe(slot.parentNode);
+
+                            return fake.innerHTML;
+                        } else {
+                            return "";
+                        }
+                                       ]]></span>
+                               </td>
+                       </tr>
+
+               </tbody>
+       </table>
+
+       <script language='javascript' type='text/javascript'><![CDATA[
+
+               config.ids.rdetail.details_body         = 'rdetail_details_body'; 
+               config.ids.rdetail.title                                = 'rdetail_title';
+               config.ids.rdetail.author                               = 'rdetail_author';
+               config.ids.rdetail.isbn                                 = 'rdetail_isbn';
+               config.ids.rdetail.edition                              = 'rdetail_edition';
+               config.ids.rdetail.pubdate                              = 'rdetail_pubdate';
+               config.ids.rdetail.publisher                    = 'rdetail_publisher';
+               config.ids.rdetail.tor                                  = 'rdetail_tor';
+               config.ids.rdetail.abstr                                = 'rdetail_abstract';
+               config.ids.rdetail.image                                = 'rdetail_image';
+               config.ids.rdetail.tor_pic                              = 'rdetail_tor_pic';
+
+        /* Only clear the resources box once */
+        var first_issn = true;
+
+        function subjectMe(tag, item) {
+            dojo.query(tag).removeClass('hide_me');
+            var cgi = new CGI();
+            var other_params = [ 'd', 'l', 'r', 'av', 's', 'sd' ];
+            var total = '';
+            var output = [];
+            dojo.query( 'subfield', item ).forEach( function (onesub) {
+                var subtext = '';
+                var sub_code = onesub.getAttribute('code');
+                try {   
+                    if (dojo.isIE) {
+                        subtext = onesub.firstChild.nodeValue;
+                    } else {
+                        subtext = onesub.textContent;
+                    }
+                    if ( sub_code.match(/[a-z]/i) ) {
+                        var current = '';
+                        if ( sub_code.match(/[vxyz]/ ) ) {
+                            current += '&#x2d;&#x2d; ';
+                        }
+                        total += subtext + ' ';
+                        current += '<a class="search_link" href="rresult.xml?rt=subject&tp=subject&t=' + total.replace(/\s+$/, '');
+                        for (var p in other_params) {
+                            if (cgi.param(other_params[p])) {
+                                current += '&' + other_params[p] + '=' + cgi.param(other_params[p]);
+                            }
+                        }
+                        current += '">' + subtext + '</a>'
+                        output.push(current);
+                    }
+                } catch (e) {
+                    return;
+                }
+            });
+            return '<span>' + output.join(' ') + '</span><br/>';
+        }
+
+        dojo.addOnLoad( function () {
+            setTimeout( function () {
+                var here = findOrgUnit(getLocation());
+                if (getDepth() > 0 || getDepth === 0 ) {
+                    while (getDepth() < findOrgDepth(here))
+                        here = findOrgUnit( here.parent_ou() );
+                }
+
+                dojo.require('openils.BibTemplate');
+                new openils.BibTemplate({ record : new CGI().param('r'), org_unit : here.shortname() }).render();
+            }, 0);
+        });
+       ]]></script>
+
+</div> <!-- details_body -->
+
diff --git a/Open-ILS/web/opac/skin/lul/xml/result/result_table.xml b/Open-ILS/web/opac/skin/lul/xml/result/result_table.xml
new file mode 100644 (file)
index 0000000..4d65a34
--- /dev/null
@@ -0,0 +1,415 @@
+<!-- Search results are spit into this table -->
+
+<div id='result_table_div' xmlns:xi="http://www.w3.org/2001/XInclude">
+
+    <table id='res_table'> 
+
+        <!-- for some reason, this is the only way i can force the cell widths -->
+        <thead id='result_thead'>
+            <tr>
+                <td class='result_table_pic_header'></td>
+                <td> </td>
+            </tr>
+        </thead>
+
+        <tbody id='result_table'>
+            <tr>
+
+                <td class='result_table_row'>
+                    <!--#include virtual="result_info.xml"-->
+                </td>
+            </tr>
+
+            <!-- Template for displaying a search result.  This row template is cloned and inserted
+                    for each result returned -->
+
+            <tr id='result_table_template' class='hide_me'>
+
+                <!-- Jacket image goes here -->
+
+                <td class='result_table_row' align='left'>
+                    <table class='result_table_subtable'>
+                        <tbody class='result_table_subtbody'>
+
+                            <tr style='height: 1em' name='counts_row'>
+
+                                <td  rowspan='6' class='result_table_pic_header'>
+                                    <a><img name='item_jacket' class='result_table_pic'/></a>
+                                </td>
+
+                                <td class='result_table_title_cell' name='result_table_title_cell'>
+                                    <!-- Title goes here -->
+                                    <a title="&result.table.keyword;" name='item_title' class='search_link'> 
+                                        <!-- Title goes here -->
+                                    </a>
+                                </td>
+
+                                <!-- Copy this td for each copy count appended -->
+                                <td  rowspan='5' nowrap='nowrap' name="copy_count_cell" class='copy_count_cell'> 
+                                </td>
+
+                            </tr>
+        
+                            <tr style='height: 1em' >
+                                <td class='result_table_author_cell'>
+                                    <a title="&result.table.author;" name='item_author' class='search_link'> 
+                                        <!-- Author goes here -->
+                                    </a>
+                                    <div>
+                                    <span name='result_table_extra_span' class='hide_me'>
+                                        <span name='result_table_pub_box' style='padding-left: 10px;'> 
+                                            <span name='result_table_edition_span' style='padding-left: 10px;'></span> |
+                                            <span name='result_table_pub_span'> </span> |
+                                            <span name='result_table_phys_span'> </span>
+                                        </span>
+                                    </span>
+                                    </div>
+                                </td>
+                            </tr>
+
+
+                            <!--
+                                there is probably a more elegant way to achieve this but what
+                                happens here is that the record id is used to place resolver
+                                info in the correct place in the results list - the id is
+                                placed here from the js layer
+                            -->
+                            <tr id='result_table_recid' class='result_table_title_cell hide_me'>
+                                <td class='sfx_display'> 
+                                    <span name='result_table_recid_span' class='recid'>
+                                        <span name='recid_holder' class='hide_me'></span>
+                                    </span>
+                                </td>
+                                <td></td>
+                            </tr>
+
+                            <tr name="local_callnumber_list" class="result_table_title_cell">
+                                <td>
+                                <!--
+                                    we snag the record id from the 901 field, and then use it
+                                    for lining up the resolver content
+                                -->
+                                <span 
+                                    type='opac/slot-data' query='datafield[tag="901"] subfield[code="c"]' class='hide_me'>
+                                <span class='hide_me' debug='true' type='opac/slot-format'><![CDATA[
+                                    curr_title_id = dojo.trim(BT.textContent(item));
+                                ]]></span>
+                                </span>
+                                <!--
+                                    this is very close to the layout in rdetail, we need to find the
+                                    record id in order to place the resolver info in the right spot
+                                -->
+                                <span 
+                                    type='opac/slot-data' query='datafield[tag="022"] subfield' class='hide_me'>
+                                <span class='hide_me' debug='true' type='opac/slot-format'><![CDATA[
+                                    var this_title_id = curr_title_id;
+                                    var issn = '';
+                                    issn = BT.textContent(item) + '';
+                                    issn = issn.replace(/^(\s|.)*?(\d{4}).(\d{3,4}[xX]?)(\s|.)*/, "$2-$3");
+                                    if (issn.length > 0) {
+                                        try {
+                                            var ses = new OpenSRF.ClientSession('open-ils.resolver');
+                                            var req = ses.request('open-ils.resolver.resolve_holdings.raw', 'issn', issn);
+                                            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);}
+                                    }
+                                ]]></span>
+                                </span>
+                                <!-- Prevent records with dozens of items attached from filling the screen -->
+                                <span type='opac/slot-data+marcxml-full' query='volumes'>
+                                <span class='hide_me' debug='true' type='opac/slot-format'><![CDATA[
+                                    var output = dojo.create('span'); 
+
+                                    var item_cnt = 0;
+                                    var max_items = 4;
+
+
+                                    dojo.query('volume', item).forEach(function(vol) {
+                                        if (item_cnt >= 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;
+                                ]]></span>
+                                </span>
+
+                                <!-- Be lenient in what we accept; disabled until we figure out how to prevent both URIs and SFX -->
+                                <span type='opac/slot-data+marcxml-full' query='record'>
+                                    <span class='hide_me' type='opac/slot-format'><![CDATA[
+                                        var found_issn = false;
+                                        dojo.query('datafield[tag="022"]', item).forEach(function(issn) {
+                                            found_issn = true;
+                                        });
+                                        if (found_issn) { return; }
+
+                                        var output = dojo.create('span'); 
+                                        dojo.query('volumes volume uris uri', item).forEach(function(xitem) {
+                                            var this_title_id = curr_title_id;
+                                            if (resolved[this_title_id]) { return; }
+                                            var uri = new Object;
+                                            uri.href = xitem.getAttribute('href');
+                                            uri.label = xitem.getAttribute('label');
+                                            uri.use = xitem.getAttribute('use_restriction');
+                                            if (uri.href == uri.label) {
+                                                if (uri.use && uri.use != uri.label) {
+                                                    uri.label = uri.use;
+                                                    uri.use = null;
+                                                }
+                                            }
+                                            var link = dojo.create('a', {"class":"search_link", "href": uri.href});
+                                            var link_text = dojo.doc.createTextNode(uri.label);
+                                            link.appendChild(link_text);
+                                            output.appendChild(link);
+                            
+                                            if (uri.use) {
+                                                var use_text = dojo.doc.createTextNode(' (' + uri.use + ')');
+                                                output.appendChild(use_text);
+                                            }
+                                            dojo.create('br', null, output);
+                                        });
+                                        return output.innerHTML;
+                                    ]]></span>
+                                </span>
+                                </td>
+                            </tr>
+
+                            <tr style='height:1em;' >
+                                <td name='result_table_format_cell' class='result_table_format_cell'>
+
+                                    <a name='text_link' class='search_link'> 
+                                        <img src='../../../../images/tor/text.jpg' class='dim tor_pic' />
+                                    </a>
+
+                                    <a name='sound recording-nonmusical_link' class='search_link'> 
+                                        <img src='../../../../images/tor/sound recording-nonmusical.jpg' class='dim tor_pic' />
+                                    </a>
+
+                                    <a name='moving image_link' class='search_link'> 
+                                        <img src='../../../../images/tor/moving image.jpg' class='dim tor_pic' />
+                                    </a>
+
+                                    <a name='software, multimedia_link' class='search_link'> 
+                                        <img src='../../../../images/tor/software, multimedia.jpg' class='dim tor_pic' />
+                                    </a>
+
+                                    <a name='sound recording-musical_link' class='search_link'> 
+                                        <img src='../../../../images/tor/sound recording-musical.jpg' class='dim tor_pic' />
+                                    </a>
+
+                                    <a name='cartographic_link' class='search_link'> 
+                                        <img src='../../../../images/tor/cartographic.jpg' class='dim tor_pic' />
+                                    </a>
+
+                                    <a name='mixed material_link' class='search_link'> 
+                                        <img src='../../../../images/tor/mixed material.jpg' class='dim tor_pic' />
+                                    </a>
+
+                                    <a name='notated music_link' class='search_link'> 
+                                        <img src='../../../../images/tor/notated music.jpg' class='dim tor_pic' />
+                                    </a>
+
+                                    <a name='sound recording_link' class='search_link'> 
+                                        <img src='../../../../images/tor/sound recording.jpg' class='dim tor_pic' />
+                                    </a>
+
+                                    <a name='still image_link' class='search_link'> 
+                                        <img src='../../../../images/tor/still images.jpg' class='dim tor_pic' />
+                                    </a>
+
+                                    <a name='three dimensional object_link' class='search_link'> 
+                                        <img src='../../../../images/tor/three dimensional object.jpg' class='dim tor_pic' />
+                                    </a>
+
+                                    <span class='hide_me' 
+                                        style='color: #9999FF; padding-left: 10px; font-size: 7pt; font-weight: 300;'> 
+                                        <span>&common.relevancy; </span><span name='relevancy_span'> </span>
+                                    </span>
+
+                                    <span class='hide_me' name='place_hold_span'>
+                                        <a style='padding-left: 8px;' href='javascript:void(0);' 
+                                            class='classic_link' name='place_hold_link'>&opac.holds.placeHold;</a>
+                                    </span>
+
+                                    <!-- Empty span used for creating unAPI links -->
+                                    <abbr style='padding-left: 8px;' name="unapi" class="unapi-id">
+                                        <!-- unAPI URI goes here -->
+                                    </abbr>
+
+                                    <!-- Empty span used for creating Google Book Search-->
+                                    <span name="googleBooksLink" class="hide_me">
+                                        <a style='padding-left: 8px;' class='classic_link' name="googleBooks-link">&result.googleBooks.browse;</a>
+                                    </span>
+
+
+                                </td>
+                            </tr>
+
+                        </tbody>
+                    </table>
+                </td>
+            </tr>
+        </tbody>
+    </table>
+
+
+   <!-- ====================== -->
+   <table style='width: 100%; margin-top: 12px;' id='result_info_2' class='hide_me'>
+      <tbody>
+               
+          <tr class='color_4' style='height: 1em;'>
+                     
+             <td style='vertical-align: top;'  id='next_prev_links2'>
+                        
+                <span class='hide_me' id='result_info_div2' style='font-size: 9pt;'>
+                   <span> &common.results; </span> 
+                   <b id='offset_start2'> </b>
+                   <span> - </span>
+                   <b id='offset_end2'> </b>
+                   <span> &common.ofAtLeast; </span>
+                   <b id='result_count2'> </b>
+                   <span style='padding-left: 6px;'> (page </span>
+                   <span id='current_page2'> </span>
+                   <span> &common.of; </span>
+                   <span id='num_pages2'> </span>
+                </span>
+                           
+                <span id='start_end_links_span2' class='hide_me' 
+                   style='padding-left: 40px;' >
+                <a class='search_page_nav_link' id='search_home_link2' 
+                   title="&rdetail.page.results;">&rdetail.start;</a><a class='search_page_nav_link' 
+                   id='prev_link2' title='&rdetail.page.previous;'>&rdetail.page.previous.symbol;</a>
+            
+                <span class='search_page_nav_link' id='page_numbers2'> </span>
+                   <a  class='search_page_nav_link' id='next_link2' 
+                      title='&rdetail.page.next;'>&rdetail.page.next.symbol;</a>
+                      <!--
+                      <a class='search_page_nav_link' 
+                      id='end_link2' title="&rdetail.page.last;">&rdetail.end;</a>
+                      -->
+                </span>
+                        
+             </td>
+                        
+             <td  colspan='5' 
+                style='padding-bottom: 4px; text-align:center; vertical-align: top; border-bottom: 1px solid #E0E0E0;'>
+               <!--
+                <span id='search_info_table2' style='font-size: 8pt;'>
+                <b>Available copies / Total copies </b>
+                </span>
+               -->
+             </td>
+          </tr>
+      </tbody>
+   </table>
+   <!-- ====================== -->
+
+
+    <script language='javascript' type='text/javascript'>
+        config.names.result.format_cell = 'result_table_format_cell';
+        config.names.result.format_link = 'resource_link'
+        config.names.result.format_pic = 'format_pic'
+        var url_list = "";
+        var title_list = "";
+        var curr_title_id = "";
+        var resolved = {};
+    </script>
+
+    <!-- ChiliFresh setup -->
+    <script language='javascript' type='text/javascript'>
+        var chilifresh = '<!--#echo var="OILS_CHILIFRESH_ACCOUNT"-->';
+        if (chilifresh=='(none)') { chilifresh = false; }
+    </script>
+    <!--if expr="${OILS_CHILIFRESH_ACCOUNT} && ${OILS_CHILIFRESH_ACCOUNT}!='(none)'"-->
+        <input type="hidden" id="chilifresh_account" name="chilifresh_account"
+            value="<!--#echo var='OILS_CHILIFRESH_ACCOUNT'-->" />
+        <input type="hidden" id="chilifresh_profile" name="chilifresh_profile"
+            value="<!--#echo var='OILS_CHILIFRESH_PROFILE'-->" />
+        <input type="hidden" id="chilifresh_version" name="chilifresh_version" value="onsite_v1" />
+        <input type="hidden" id="chilifresh_type" name="chilifresh_type" value="search" />
+        <script language="javascript" type="text/javascript" src="<!--#echo var='OILS_CHILIFRESH_URL'-->"></script>
+    <!--endif-->
+
+</div>
+
diff --git a/Open-ILS/web/opac/skin/nosm/xml/common/css_common.xml b/Open-ILS/web/opac/skin/nosm/xml/common/css_common.xml
new file mode 100644 (file)
index 0000000..f46c1ce
--- /dev/null
@@ -0,0 +1,23 @@
+<!-- CSS shared across pages goes here --> 
+
+<link type='text/css' rel='stylesheet' href="<!--#echo var='OILS_SKIN_BASE'-->/nosm/css/layout.css"/>
+
+<!-- Our font CSS's -->
+<link type='text/css' rel='stylesheet' href='<!--#echo var="OILS_CSS_BASE"-->/mediumfont.css' />
+
+<!-- Our colors -->
+<link type='text/css' rel="stylesheet" href="<!--#echo var='OILS_THEME_BASE'-->/nosm/css/colors.css" />
+
+<!-- An alternate stylesheet -->
+<link type='text/css' rel="alternate stylesheet" title='&opac.style.reddish;' href="<!--#echo var='OILS_THEME_BASE'-->/reddish/css/colors.css" />
+
+<!-- OpenSearch auto discovery -->
+<link type="application/opensearchdescription+xml"
+       rel='search' title="NOSM Library Catalogue"
+       href="http://<!--#echo var='SERVER_NAME'-->/opac/extras/opensearch/1.1/OSM/OSM/osd.xml" />
+
+<!-- enable Dojo date picker -->
+<style type="text/css">
+       @import '/js/dojo/dojo/resources/dojo.css';
+       @import '/js/dojo/dijit/themes/tundra/tundra.css';
+</style>
diff --git a/Open-ILS/web/opac/skin/nosm/xml/common/logo.xml b/Open-ILS/web/opac/skin/nosm/xml/common/logo.xml
new file mode 100644 (file)
index 0000000..8350829
--- /dev/null
@@ -0,0 +1,4 @@
+<div id='logo_div'>
+       <script language='javascript' type='text/javascript'>config.ids.common.top_logo = "top_left_logo";</script>
+       <img style='margin-right: 4px; width: 234px; height: 95px;' src='<!--#echo var="OILS_BASE"-->/images/nosm_logo_small.png' id='top_left_logo' border='0' class='logo' />
+</div>
diff --git a/Open-ILS/web/opac/skin/nosm/xml/home/homesearch.xml b/Open-ILS/web/opac/skin/nosm/xml/home/homesearch.xml
new file mode 100644 (file)
index 0000000..695456b
--- /dev/null
@@ -0,0 +1,135 @@
+
+<div id='canvas_main' class='home_search canvas'
+       style='-moz-border-radius: 6px; padding: 6px; margin-top: 65px;' 
+       xmlns="http://www.w3.org/1999/xhtml" xmlns:xi="http://www.w3.org/2001/XInclude">
+
+       <!-- load my js -->
+       <script language='javascript' type='text/javascript'
+               src="<!--#echo var="OILS_OPAC_JS_HOST"-->/skin/default/js/depth_selector.js"> </script>
+       <script language='javascript' type='text/javascript'
+               src="<!--#echo var="OILS_OPAC_JS_HOST"-->/skin/default/js/search_bar.js"> </script>
+
+       <script language='javascript' type='text/javascript'>
+               config.ids.searchbar = {};
+               config.css.searchbar = {};
+               config.ids.searchbar.text                               = 'search_box'; 
+               config.ids.searchbar.submit                     = 'search_submit';      
+               config.ids.searchbar.type_selector      = 'search_type_selector';
+               config.ids.searchbar.depth_selector     = 'depth_selector';
+               config.ids.searchbar.form_selector      = 'form_selector';
+               config.ids.searchbar.extra_row          = 'searchbar_extra';
+               config.ids.searchbar.main_row                   = 'searchbar_main_row';
+               config.ids.searchbar.table                              = 'searchbar_table';
+               config.ids.searchbar.location_tag       = 'search_location_tag_link';
+               config.ids.searchbar.lib_sel_span       = 'lib_selector_span';
+               config.ids.searchbar.lib_sel_link       = 'lib_selector_link';
+               config.ids.searchbar.depth_sel_span     = 'depth_selector_span';
+       </script>
+
+
+       <div style='width: 100%; text-align: center'>
+               <img style='height: 82px; width: 560px;' src='<!--#echo var="OILS_BASE"-->/images/nosm_logo.png' />
+       </div>
+
+       <style type="text/css">.rowpad { height: 20px; }</style>
+
+       <table id='frontsearch_table' height='100%' width='100%' 
+               style='margin-top: 10px; border-collapse: collapse;'>
+
+               <tbody>
+
+                       <tr class='color_3'>
+
+                               <script language='javascript' type='text/javascript'>
+                                       config.ids.common.now_searching = 'now_searching_location';
+                               </script>
+
+                               <td style='padding: 6px;' class='border_5' align='center'>
+                                       <span>&opac.search.nowSearching;</span>
+                                       <span style='padding: 1px;' id='now_searching_location'>  </span>
+                               </td>
+                       </tr>
+
+
+                       <tr class='rowpad'><td></td></tr>
+
+                       <tr>
+                               <td nowrap='nowrap' align='center' class='color_1 border_5'>
+                                       <input id='search_box' style='width: 300px;' type='text' />
+                                       <span style='padding-left: 6px;'>
+                                               <input type='button' style='width: 40px;' id='search_submit' value='Go!' />
+                                       </span>
+                               </td>
+                       </tr>
+
+                       <tr class='rowpad'><td></td></tr>
+
+                       <tr class='color_3 border_5'>
+
+                               <td nowrap='nowrap' align='center' style='padding: 4px;'>
+
+                                       <span style='padding-right:40px;'>
+                                               <!--#include virtual="../common/stypes_selector.xml"-->
+                                       </span>
+
+                                       <span>
+                                               <!--
+                                               <span>&common.format;: </span>
+                                               -->
+                                               <!--#set var='FORM_SEL_ID' value='form_selector'-->
+                                               <!--#include virtual="../common/format_selector.xml"-->
+                                       </span>
+
+                               </td>
+                       </tr>
+
+                       <tr class='rowpad'><td></td></tr>
+
+                       <tr class='color_1 border_5'>
+                               <td align='center' style='padding: 4px; padding-bottom: 6px;'>
+                                       <span style='padding-right: 15px;'>
+                                               <a id='home_adv_search_link' href='javascript:void(0);'>&opac.navigate.advanced;</a></span>
+                                       <span>
+                                               <span class='hide_me' id='depth_selector_span'>
+                                                       <select id='depth_selector' >
+                                                               <option value='new'>&opac.navigate.selectNewOrg;...</option>
+                                                       </select>
+                                               </span>
+                                               <span class='hide_me' id='lib_selector_span'>
+                                                       <a id='lib_selector_link' href='javascript:void(0)'>&opac.navigate.selectOrg;</a>
+                                               </span>
+                                       </span>
+                                       <span style='padding-left: 15px;'>
+                                               <a id='home_myopac_link' href='javascript:void(0);'>&opac.navigate.myopac;</a>
+                                       </span>
+                               </td>
+                       </tr>
+
+            <!-- locale picker -->
+            <tr><td align='center' valign='bottom' style='padding-top:10px;'>
+                       <span style='vertical-align: top;'>&common.language;</span>
+                       <span dojoType="dijit.form.FilteringSelect" store="openils.I18N.localeStore" 
+                    searchAttr="label" required="false" jsId='opacLocaleSelector'>
+                    <script type="text/javascript">
+                        dojo.addOnLoad(function() {
+                            opacLocaleSelector.setValue(locale);
+                            dojo.connect(opacLocaleSelector, 'onChange', 
+                                function () {
+                                                       location.href = location.href.replace(/opac\/[^\/]+\/skin/, 'opac/' + this.getValue() + '/skin');
+                                }
+                            );
+                        });
+                    </script>
+                       </span>
+            </td></tr>
+
+               </tbody>
+       </table>
+
+</div>
+
+
+
+
+
+
diff --git a/Open-ILS/web/opac/skin/sjcg/xml/common/css_common.xml b/Open-ILS/web/opac/skin/sjcg/xml/common/css_common.xml
new file mode 100644 (file)
index 0000000..2a0e6ad
--- /dev/null
@@ -0,0 +1,24 @@
+<!-- CSS shared across pages goes here --> 
+
+<link type='text/css' rel='stylesheet' href="<!--#echo var='OILS_SKIN_BASE'-->/sjcg/css/layout.css"/>
+
+<!-- Our font CSS's -->
+<link type='text/css' rel='stylesheet' href='<!--#echo var="OILS_CSS_BASE"-->/mediumfont.css' />
+
+<!-- Our colors -->
+<link type='text/css' rel="stylesheet" href="<!--#echo var='OILS_THEME_BASE'-->/sjcg/css/colors.css" />
+
+<!-- An alternate stylesheet -->
+<link type='text/css' rel="alternate stylesheet" title='&opac.style.reddish;' href="<!--#echo var='OILS_THEME_BASE'-->/reddish/css/colors.css" />
+
+<!-- OpenSearch auto discovery -->
+<link type="application/opensearchdescription+xml"
+       rel='search' title="SJCG Library Catalogue"
+       href="http://<!--#echo var='SERVER_NAME'-->/opac/extras/opensearch/1.1/OSM/OSM/osd.xml" />
+
+<!-- enable Dojo date picker -->
+<style type="text/css">
+       @import '/js/dojo/dojo/resources/dojo.css';
+       @import '/js/dojo/dijit/themes/tundra/tundra.css';
+       @import '/js/dojo/dijit/themes/tundra/tundra_rtl.css';
+</style>
diff --git a/Open-ILS/web/opac/skin/sjcg/xml/common/logo.xml b/Open-ILS/web/opac/skin/sjcg/xml/common/logo.xml
new file mode 100644 (file)
index 0000000..d530e48
--- /dev/null
@@ -0,0 +1,4 @@
+<div id='logo_div'>
+       <script language='javascript' type='text/javascript'>config.ids.common.top_logo = "top_left_logo";</script>
+       <img style='margin-right: 4px;' src='<!--#echo var="OILS_BASE"-->/images/sjcg_logo_small.png' id='top_left_logo' border='0' class='logo' />
+</div>
diff --git a/Open-ILS/web/opac/skin/sjcg/xml/home/homesearch.xml b/Open-ILS/web/opac/skin/sjcg/xml/home/homesearch.xml
new file mode 100644 (file)
index 0000000..c33bc4a
--- /dev/null
@@ -0,0 +1,135 @@
+
+<div id='canvas_main' class='home_search canvas'
+       style='-moz-border-radius: 6px; padding: 6px; margin-top: 65px;' 
+       xmlns="http://www.w3.org/1999/xhtml" xmlns:xi="http://www.w3.org/2001/XInclude">
+
+       <!-- load my js -->
+       <script language='javascript' type='text/javascript'
+               src="<!--#echo var="OILS_OPAC_JS_HOST"-->/skin/default/js/depth_selector.js"> </script>
+       <script language='javascript' type='text/javascript'
+               src="<!--#echo var="OILS_OPAC_JS_HOST"-->/skin/default/js/search_bar.js"> </script>
+
+       <script language='javascript' type='text/javascript'>
+               config.ids.searchbar = {};
+               config.css.searchbar = {};
+               config.ids.searchbar.text                               = 'search_box'; 
+               config.ids.searchbar.submit                     = 'search_submit';      
+               config.ids.searchbar.type_selector      = 'search_type_selector';
+               config.ids.searchbar.depth_selector     = 'depth_selector';
+               config.ids.searchbar.form_selector      = 'form_selector';
+               config.ids.searchbar.extra_row          = 'searchbar_extra';
+               config.ids.searchbar.main_row                   = 'searchbar_main_row';
+               config.ids.searchbar.table                              = 'searchbar_table';
+               config.ids.searchbar.location_tag       = 'search_location_tag_link';
+               config.ids.searchbar.lib_sel_span       = 'lib_selector_span';
+               config.ids.searchbar.lib_sel_link       = 'lib_selector_link';
+               config.ids.searchbar.depth_sel_span     = 'depth_selector_span';
+       </script>
+
+
+       <div style='width: 100%; text-align: center'>
+               <img src='<!--#echo var="OILS_BASE"-->/images/sjcg_logo.png' />
+       </div>
+
+       <style>.rowpad { height: 20px; }</style>
+
+       <table id='frontsearch_table' height='100%' width='100%' 
+               style='margin-top: 10px; border-collapse: collapse;'>
+
+               <tbody>
+
+                       <tr class='color_3'>
+
+                               <script language='javascript' type='text/javascript'>
+                                       config.ids.common.now_searching = 'now_searching_location';
+                               </script>
+
+                               <td style='padding: 6px;' class='border_5' align='center'>
+                                       <span>&opac.search.nowSearching;</span>
+                                       <span style='padding: 1px;' id='now_searching_location'>  </span>
+                               </td>
+                       </tr>
+
+
+                       <tr class='rowpad'><td></td></tr>
+
+                       <tr>
+                               <td nowrap='nowrap' align='center' class='color_1 border_5'>
+                                       <input id='search_box' style='width: 300px;' type='text' />
+                                       <span style='padding-left: 6px;'>
+                                               <input type='button' style='width: 40px;' id='search_submit' value='Go!' />
+                                       </span>
+                               </td>
+                       </tr>
+
+                       <tr class='rowpad'><td></td></tr>
+
+                       <tr class='color_3 border_5'>
+
+                               <td nowrap='nowrap' align='center' style='padding: 4px;'>
+
+                                       <span style='padding-right:40px;'>
+                                               <!--#include virtual="../common/stypes_selector.xml"-->
+                                       </span>
+
+                                       <span>
+                                               <!--
+                                               <span>&common.format;: </span>
+                                               -->
+                                               <!--#set var='FORM_SEL_ID' value='form_selector'-->
+                                               <!--#include virtual="../common/format_selector.xml"-->
+                                       </span>
+
+                               </td>
+                       </tr>
+
+                       <tr class='rowpad'><td></td></tr>
+
+                       <tr class='color_1 border_5'>
+                               <td align='center' style='padding: 4px; padding-bottom: 6px;'>
+                                       <span style='padding-right: 15px;'>
+                                               <a id='home_adv_search_link' href='javascript:void(0);'>&opac.navigate.advanced;</a></span>
+                                       <span>
+                                               <span class='hide_me' id='depth_selector_span'>
+                                                       <select id='depth_selector' >
+                                                               <option value='new'>&opac.navigate.selectNewOrg;...</option>
+                                                       </select>
+                                               </span>
+                                               <span class='hide_me' id='lib_selector_span'>
+                                                       <a id='lib_selector_link' href='javascript:void(0)'>&opac.navigate.selectOrg;</a>
+                                               </span>
+                                       </span>
+                                       <span style='padding-left: 15px;'>
+                                               <a id='home_myopac_link' href='javascript:void(0);'>&opac.navigate.myopac;</a>
+                                       </span>
+                               </td>
+                       </tr>
+
+            <!-- locale picker -->
+            <tr><td align='center' valign='bottom' style='padding-top:10px;'>
+                       <span style='vertical-align: top;'>&common.language;</span>
+                       <span dojoType="dijit.form.FilteringSelect" store="openils.I18N.localeStore" 
+                    searchAttr="label" required="false" jsId='opacLocaleSelector'>
+                    <script>
+                        dojo.addOnLoad(function() {
+                            opacLocaleSelector.setValue(locale);
+                            dojo.connect(opacLocaleSelector, 'onChange', 
+                                function () {
+                                                       location.href = location.href.replace(/opac\/[^\/]+\/skin/, 'opac/' + this.getValue() + '/skin');
+                                }
+                            );
+                        });
+                    </script>
+                       </span>
+            </td></tr>
+
+               </tbody>
+       </table>
+
+</div>
+
+
+
+
+
+
diff --git a/Open-ILS/web/opac/skin/uhearst/xml/common/css_common.xml b/Open-ILS/web/opac/skin/uhearst/xml/common/css_common.xml
new file mode 100644 (file)
index 0000000..9d1ba77
--- /dev/null
@@ -0,0 +1,20 @@
+<!-- CSS shared across pages goes here --> 
+
+<link type='text/css' rel='stylesheet' href="<!--#echo var='OILS_SKIN_BASE'-->/uhearst/css/layout.css"/>
+
+<!-- Our font CSS's -->
+<link type='text/css' rel='stylesheet' href='<!--#echo var="OILS_CSS_BASE"-->/mediumfont.css' />
+
+<!-- Our colors -->
+<link type='text/css' rel="stylesheet" href="<!--#echo var='OILS_THEME_BASE'-->/uhearst/css/colors.css" />
+
+<!-- OpenSearch auto discovery -->
+<link type="application/opensearchdescription+xml"
+       rel='search' title="Catalogue d'Hearst"
+       href="http://<!--#echo var='SERVER_NAME'-->/opac/extras/opensearch/1.1/HEARSTSYS/HEARSTSYS/osd.xml" />
+
+<!-- enable Dojo date picker -->
+<style type="text/css">
+       @import '/js/dojo/dojo/resources/dojo.css';
+       @import '/js/dojo/dijit/themes/tundra/tundra.css';
+</style>
diff --git a/Open-ILS/web/opac/skin/uhearst/xml/common/logo.xml b/Open-ILS/web/opac/skin/uhearst/xml/common/logo.xml
new file mode 100644 (file)
index 0000000..197a6f9
--- /dev/null
@@ -0,0 +1,4 @@
+<div id='logo_div'>
+       <script language='javascript' type='text/javascript'>config.ids.common.top_logo = "top_left_logo";</script>
+       <img style='margin-right: 4px; width: 239px; height: 92px;' src='<!--#echo var="OILS_BASE"-->/images/uhearst_logo_small.png' id='top_left_logo' border='0' class='logo' />
+</div>
diff --git a/Open-ILS/web/opac/skin/uhearst/xml/footer.xml b/Open-ILS/web/opac/skin/uhearst/xml/footer.xml
new file mode 100644 (file)
index 0000000..4d756e2
--- /dev/null
@@ -0,0 +1,30 @@
+<div id='copyright_block'>
+               <div id='footer_links'>
+                               <span class='footer_link'>
+                                       <a class='classic_link'
+                                               href='/opac/<!--#echo var="locale"-->/extras/slimpac/start.html'>&opac.basic;</a>
+                               </span> 
+                               <span> | </span>
+                               <span class='footer_link'>
+                                       <a target='_blank' class='classic_link'
+                                               href='&uhearst.footer.databases.url;'>&uhearst.footer.databases;</a>
+                               </span>
+                               <span> | </span>
+                               <span class='footer_link'>
+                                       <a target='_blank' class='classic_link'
+                                               href='&uhearst.footer.racer.url;'>&uhearst.footer.racer;</a>
+                               </span>
+                               <span> | </span>
+                               <span class='footer_link'>
+                                       <a target='_blank' class='classic_link'
+                                               href='&uhearst.footer.library.home.url;'>&uhearst.footer.library.home;</a>
+                               </span>
+                               
+               </div>
+        <div id='copyright_text'>
+            <span>&footer.copyright;</span>
+        </div>
+        <div id='footer_logo'>&footer.logo;
+            <a href='http://open-ils.org'><img style='border:none;' src='../../../../images/eg_tiny_logo.jpg'/></a>
+        </div>
+</div>
diff --git a/Open-ILS/web/opac/skin/uhearst/xml/home/homesearch.xml b/Open-ILS/web/opac/skin/uhearst/xml/home/homesearch.xml
new file mode 100644 (file)
index 0000000..8471a05
--- /dev/null
@@ -0,0 +1,135 @@
+
+<div id='canvas_main' class='home_search canvas'
+       style='-moz-border-radius: 6px; padding: 6px; margin-top: 65px;' 
+       xmlns="http://www.w3.org/1999/xhtml" xmlns:xi="http://www.w3.org/2001/XInclude">
+
+       <!-- load my js -->
+       <script language='javascript' type='text/javascript'
+               src="<!--#echo var="OILS_OPAC_JS_HOST"-->/skin/default/js/depth_selector.js"> </script>
+       <script language='javascript' type='text/javascript'
+               src="<!--#echo var="OILS_OPAC_JS_HOST"-->/skin/default/js/search_bar.js"> </script>
+
+       <script language='javascript' type='text/javascript'>
+               config.ids.searchbar = {};
+               config.css.searchbar = {};
+               config.ids.searchbar.text                               = 'search_box'; 
+               config.ids.searchbar.submit                     = 'search_submit';      
+               config.ids.searchbar.type_selector      = 'search_type_selector';
+               config.ids.searchbar.depth_selector     = 'depth_selector';
+               config.ids.searchbar.form_selector      = 'form_selector';
+               config.ids.searchbar.extra_row          = 'searchbar_extra';
+               config.ids.searchbar.main_row                   = 'searchbar_main_row';
+               config.ids.searchbar.table                              = 'searchbar_table';
+               config.ids.searchbar.location_tag       = 'search_location_tag_link';
+               config.ids.searchbar.lib_sel_span       = 'lib_selector_span';
+               config.ids.searchbar.lib_sel_link       = 'lib_selector_link';
+               config.ids.searchbar.depth_sel_span     = 'depth_selector_span';
+       </script>
+
+
+       <div style='width: 100%; text-align: center'>
+               <img style='width: 598px; height: 231px;' src='<!--#echo var="OILS_BASE"-->/images/uhearst_logo.png' />
+       </div>
+
+       <style>.rowpad { height: 20px; }</style>
+
+       <table id='frontsearch_table' height='100%' width='100%' 
+               style='margin-top: 10px; border-collapse: collapse;'>
+
+               <tbody>
+
+                       <tr class='color_3'>
+
+                               <script language='javascript' type='text/javascript'>
+                                       config.ids.common.now_searching = 'now_searching_location';
+                               </script>
+
+                               <td style='padding: 6px;' class='border_5' align='center'>
+                                       <span>&opac.search.nowSearching;</span>
+                                       <span style='padding: 1px;' id='now_searching_location'>  </span>
+                               </td>
+                       </tr>
+
+
+                       <tr class='rowpad'><td></td></tr>
+
+                       <tr>
+                               <td nowrap='nowrap' align='center' class='color_1 border_5'>
+                                       <input id='search_box' style='width: 300px;' type='text' />
+                                       <span style='padding-left: 6px;'>
+                                               <input type='button' style='width: 40px;' id='search_submit' value='Go!' />
+                                       </span>
+                               </td>
+                       </tr>
+
+                       <tr class='rowpad'><td></td></tr>
+
+                       <tr class='color_3 border_5'>
+
+                               <td nowrap='nowrap' align='center' style='padding: 4px;'>
+
+                                       <span style='padding-right:40px;'>
+                                               <!--#include virtual="../common/stypes_selector.xml"-->
+                                       </span>
+
+                                       <span>
+                                               <!--
+                                               <span>&common.format;: </span>
+                                               -->
+                                               <!--#set var='FORM_SEL_ID' value='form_selector'-->
+                                               <!--#include virtual="../common/format_selector.xml"-->
+                                       </span>
+
+                               </td>
+                       </tr>
+
+                       <tr class='rowpad'><td></td></tr>
+
+                       <tr class='color_1 border_5'>
+                               <td align='center' style='padding: 4px; padding-bottom: 6px;'>
+                                       <span style='padding-right: 15px;'>
+                                               <a id='home_adv_search_link' href='javascript:void(0);'>&opac.navigate.advanced;</a></span>
+                                       <span>
+                                               <span class='hide_me' id='depth_selector_span'>
+                                                       <select id='depth_selector' >
+                                                               <option value='new'>&opac.navigate.selectNewOrg;...</option>
+                                                       </select>
+                                               </span>
+                                               <span class='hide_me' id='lib_selector_span'>
+                                                       <a id='lib_selector_link' href='javascript:void(0)'>&opac.navigate.selectOrg;</a>
+                                               </span>
+                                       </span>
+                                       <span style='padding-left: 15px;'>
+                                               <a id='home_myopac_link' href='javascript:void(0);'>&opac.navigate.myopac;</a>
+                                       </span>
+                               </td>
+                       </tr>
+
+            <!-- locale picker -->
+            <tr><td align='center' valign='bottom' style='padding-top:10px;'>
+                       <span style='vertical-align: top;'>&common.language;</span>
+                       <span dojoType="dijit.form.FilteringSelect" store="openils.I18N.localeStore" 
+                    searchAttr="label" required="false" jsId='opacLocaleSelector'>
+                    <script>
+                        dojo.addOnLoad(function() {
+                            opacLocaleSelector.setValue(locale);
+                            dojo.connect(opacLocaleSelector, 'onChange', 
+                                function () {
+                                                       location.href = location.href.replace(/opac\/[^\/]+\/skin/, 'opac/' + this.getValue() + '/skin');
+                                }
+                            );
+                        });
+                    </script>
+                       </span>
+            </td></tr>
+
+               </tbody>
+       </table>
+
+</div>
+
+
+
+
+
+
diff --git a/Open-ILS/web/opac/skin/uwin/css/layout.css b/Open-ILS/web/opac/skin/uwin/css/layout.css
new file mode 100644 (file)
index 0000000..3b7c854
--- /dev/null
@@ -0,0 +1,290 @@
+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; }
+.recid                 { position:relative; left: 0px; color: #EBEBEB; }
+
+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: black;}
+.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; padding-right:5px;}
+
+.too_many_copies {font-weight: bold; color: #000000;}
+
+
+#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_subtable { width: 100%; border-width: 0px; vertical-align: top;} */
+.result_table_subtbody { height: 100%; width: 100%; }
+/* make title slightly larger */
+.result_table_title_cell { font-weight: bold; text-align: left; }
+.result_table_sfx_cell {  background: #EBEBEB; color: #000000; font-weight: bold; text-align: left; }
+.result_table_format_cell { font-size: medium; text-align: left;} 
+.sfx_image {background: #EBEBEB; padding-right: 10px;}
+.sfx_display {background: #EBEBEB;}
+.sfx_right {width: 25%;}
+
+/* style dan's supercool live status stuff */
+/* windsor's colours are #005595 #B2BB1E */
+.live_call_cell { color: #000000; font-weight: bold; text-align: left; }
+.live_separator_cell { font-weight: bold; text-align: left; }
+.live_location_cell { color: #000000; font-weight: bold; text-align: left; }
+.live_status_cell { color: #000000; font-weight: bold; text-align: left; }
+
+.copy_count_cell { width: 0%; 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 { padding-left: 10px; }
+#rdetail_image { padding-right: 10px; }
+#rdetail_copy_info_table { padding: 4px; width: 100%; border-collapse: collapse; }
+.rdetail_copy_info_header_cell { padding: 2px; }
+.rdetail_copy_count_cell { text-align: center; }
+
+.resolver_item { background: #EBEBEB; }
+
+
+.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 <option> elements */
+.disabled_option { color: #808080; }
+
+.copy_more_info { padding-left: 6px; color: #804070; }
+
+.invalid_hold { background: #F0F0D0; }
+.myopac_summary_table td { padding : 3px; }
+
+.jacket_attrib { font-size: 7pt; }
+
+/* block that contains footer links and copyright */
+#copyright_block { 
+    width: 100%; 
+    text-align: center; 
+    vertical-align: bottom; 
+    margin-top: 10px;
+}
+
+/* block that contains the footer links */
+#footer_links {
+    width: 80%;
+    text-align: center;
+    padding: 10px;
+    margin: auto;
+}
+
+/* span for each link in the footer */
+.footer-link {
+    margin-left: 10px;
+    margin-right: 10px;
+}
+
+/* block that contains the copyright text */
+#copyright_text {
+    margin-top: 4px;
+}
+
+/* block that contains the logo */
+#footer_logo {
+    text-align: center;
+    margin: auto;
+}
+
+#opac.result.sort { margin-left: 5px; }
+
+#xul_recipient_me { margin-left: 25px; }
+#myopac_holds_thaw_date_form {padding: 10px; text-align: center;}
+#myopac_holds_freeze_select_thaw {margin-right: 100px; margin-left: 100px; }
+
+/* titles in result list */
+/*
+.result_table_title_cell .search_link {
+    font-weight: bold;
+}
+*/
+
+.search_link {
+   color: #005596;
+}
+
+.search_link:visited {
+   color: #005596; 
+}
+
+.search_link:hover {
+   color: red; 
+   text-decoration: none;
+}
+
+.libselect {
+   text-decoration: none;
+}
diff --git a/Open-ILS/web/opac/skin/uwin/js/rdetail.js b/Open-ILS/web/opac/skin/uwin/js/rdetail.js
new file mode 100644 (file)
index 0000000..17bb67a
--- /dev/null
@@ -0,0 +1,1454 @@
+/* */
+
+detachAllEvt('common', 'run');
+attachEvt("common", "run", rdetailDraw);
+attachEvt("rdetail", "recordDrawn", rdetailBuildStatusColumns);
+attachEvt("rdetail", "recordDrawn", rdetailBuildInfoRows);
+attachEvt("rdetail", "recordDrawn", rdetailGetPageIds);
+
+/* Per-skin configuration settings */
+var rdetailLocalOnly = true;
+var rdetailShowLocal = true;
+var rdetailShowCopyLocation = true;
+var rdetailGoogleBookPreview = true;
+var rdetailDisplaySerialHoldings = true;
+var rdetailEnableRefWorks = true;
+var rdetailRefWorksHost = 'http://refworks.scholarsportal.info';
+var enableHoldsOnAvailable = false;
+
+var urlCheck = true; //whether to use a url check to mask legacy urls
+var urlExpr = /webvoy|janus|resolver/i; //regular expression
+
+var orderStatus = 9;
+var processStatus = 5;
+var checkStatus = true;
+        
+/* assume 1 copy unless we look for more */
+var cpCnt = 1;
+
+/* threshold for paging */
+var rdetailBreakUpLargeSets = true; //flag for paging support
+var pgThreshold = 15; //the number of items to invoke paging
+var pgDisplay = 10; //number of items to display at a time
+
+/* used for call number checks */
+String.prototype.startsWith = function(str)
+{return (this.match("^"+str)==str)}
+
+/* vars vars vars */
+var record = null;
+var cp_statuses = null;
+var recordsCache = [];
+
+var copyRowParent = null;
+var copyRow = null;
+var statusRow = null;
+var numStatuses = null;
+var defaultCN;
+var callnumberCache = {};
+var globalCNCache = {};
+var localTOC;
+var cachedRecords;
+var _statusPositions = {};
+var opac_strings;
+
+var nextContainerIndex;
+
+var nextRecord;
+var prevRecord;
+
+var rdetailPrev = null;
+var rdetailNext = null;
+var rdetailStart = null;
+var rdetailEnd = null;
+
+var orgHiding = false;
+/*
+this does simple call number mapping for building locations,
+we use call number regular expression for lining up location - array
+can be left blank if not used
+
+objCN(location id, regular expression, location (to be appended to call number),
+       string to use for identifying building location from call number location)
+
+for example:
+  new objCN(109, '^[A-G]|^H[A-C]', '2nd Floor', 'circulating')
+*/
+/*
+Leddy Mappings - as of Nov. 9, 2010
+
+       Books
+       A - HC  2nd Floor Main Building
+       HD - QE 3rd Floor Main Building
+       QH - ZA 4th Floor Main Building
+
+       Serials
+       A - HC  3rd Floor West Building
+       HD - LA 2nd Floor West Building
+       LB - QC 1st Floor West Building
+       QD - Z  Basement Floor West Building
+*/
+var cnMapping = [
+        new objCN(109, '^[A-G]|^H[A-C\\d*\\s*]', '- 2nd Floor, Main Bldng', '(circulating)'),
+       new objCN(109, '^HD*|^[I-P]|^Q[A-E]', '- 3rd Floor, Main Bldng', '(circulating)'),
+       new objCN(109, '^Q[H-Z]|^[R-Y]|^Z[A\\d*\\s*]', '- 4th Floor, Main Bldng', '(circulating)'),
+       new objCN(109, '^[A-G]|^H[A-C\\d*\\s*]', '- 3rd Floor, West Bldng', 'Serials'),
+       new objCN(109, '^HD*|^[I-J]|^L[A\\d*\\s*]', '- 2nd Floor, West Bldng', 'Serials'),
+       new objCN(109, '^L[B-Z]|^[M-P]|^Q[A-C\\d*\\s*]', '- 1st Floor, West Bldng', 'Serials'),
+       new objCN(109, '^Q[D-Z]|^[R-Z]', '- Basement Floor, West Bldng', 'Serials')
+
+];
+
+function objCN(locId, cnRegExp, cnLocation, locStr)
+{
+       //org id
+        this.locId = locId;
+       //regexp - what to use to match on call number range
+        this.cnRegExp = cnRegExp;
+       //the location string to append to the call number
+        this.cnLocation = cnLocation;
+       //this is the string from the call number location that flags material, e.g. 'circulating', 'monographs'
+        this.locStr = locStr;
+}
+       
+/* serials are currently the only use of Dojo strings in the OPAC */
+if (rdetailDisplaySerialHoldings) {
+       dojo.require("dijit.Menu");
+       dojo.require("dijit.form.Button");
+       dojo.requireLocalization("openils.opac", "opac");
+       opac_strings = dojo.i18n.getLocalization("openils.opac", "opac");
+}
+
+function rdetailReload() {
+       var args = {};
+       args[PARAM_LOCATION] = getNewSearchLocation();
+       args[PARAM_DEPTH] = depthSelGetDepth();
+       goTo(buildOPACLink(args));
+}
+
+/* looks to see if we have a next and/or previous record in the
+   record cache, if so, set up the nav links */
+function rdetailSetPaging(ids) {
+
+       cachedRecords = {};
+       cachedRecords.ids = ids;
+
+       for( var i = 0; i < cachedRecords.ids.length; i++ ) {
+               var rec = cachedRecords.ids[i];
+               if( rec == getRid() ) {
+                       if( i > 0 ) prevRecord = cachedRecords.ids[i-1];
+                       if( i < cachedRecords.ids.length - 1 )
+                               nextRecord = cachedRecords.ids[i+1];
+                       break;
+               }
+       }
+
+       $('np_offset').appendChild(text(i + 1));
+       $('np_count').appendChild(text(getHitCount()));
+
+       if(prevRecord) {
+               unHideMe($('np_table'));
+               unHideMe($('np_prev'));
+               unHideMe($('np_start'));
+               rdetailPrev = function() { _rdetailNav(prevRecord); };
+               rdetailStart = function() { _rdetailNav(cachedRecords.ids[0]); };
+       }
+
+       if(nextRecord) {
+               unHideMe($('np_table'));
+               unHideMe($('np_next'));
+               unHideMe($('np_end'));
+               rdetailNext = function() { _rdetailNav(nextRecord); };
+               rdetailEnd = function() { _rdetailNav(cachedRecords.ids[cachedRecords.ids.length-1]); };
+       }
+
+       runEvt('rdetail', 'nextPrevDrawn', i, cachedRecords.ids.length);
+}
+
+
+function _rdetailNav(id, offset) {
+       var args = {};
+       args[PARAM_RID] = id;
+       goTo(buildOPACLink(args));
+}
+
+function rdetailDraw() {
+
+       detachAllEvt('common','depthChanged');
+       detachAllEvt('common','locationUpdated');
+       attachEvt('common','depthChanged', rdetailReload);
+       attachEvt('common','locationUpdated', rdetailReload);
+       attachEvt('common','holdUpdated', rdetailReload);
+       attachEvt('common','holdUpdateCanceled', rdetailReload);
+
+       copyRowParent = G.ui.rdetail.cp_info_row.parentNode;
+       copyRow = copyRowParent.removeChild(G.ui.rdetail.cp_info_row);
+       statusRow = G.ui.rdetail.cp_status.parentNode;
+       statusRow.id = '__rdsrow';
+
+       G.ui.rdetail.cp_info_local.onclick = rdetailShowLocalCopies;
+       G.ui.rdetail.cp_info_all.onclick = rdetailShowAllCopies;
+
+       if(getLocation() == globalOrgTree.id())
+               hideMe(G.ui.rdetail.cp_info_all);
+
+       var req = new Request(FETCH_RMODS, getRid());
+       req.callback(_rdetailDraw);
+       req.send();
+
+       if (rdetailDisplaySerialHoldings) {
+               var req = new Request(FETCH_MFHD_SUMMARY, getRid());
+               req.callback(_holdingsDraw);
+               req.send();
+               if (isXUL()) {
+                       var here = findOrgUnit(getLocation());
+                       dojo.place("<div id='mfhd_ad_menu'></div>", "rdetail_details_table", "after");
+                       var mfhd_add = new dijit.Menu({style:"float: right;"});
+                       new dijit.MenuItem({onClick:function(){
+                               var req = new Request(CREATE_MFHD_RECORD, G.user.session, 1, here.id(), getRid());
+                               var res = req.send();
+                               alert(dojo.string.substitute(opac_strings.CREATED_MFHD_RECORD, [here.name()]));
+                       }, label:opac_strings.CREATE_MFHD}).placeAt(mfhd_add);
+                       mfhd_add.placeAt(mfhd_ad_menu);
+               }
+       }
+
+       detachAllEvt("result", "idsReceived");
+       G.evt.result.hitCountReceived = [];
+       G.evt.result.recordReceived = [];
+       G.evt.result.copyCountsReceived = [];
+       G.evt.result.allRecordsReceived = [];
+}
+
+function rdetailGetPageIds() {
+       attachEvt("result", "idsReceived", rdetailSetPaging );
+       resultFetchAllRecords = true;
+       rresultCollectIds(true);
+}
+
+
+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 rdetailViewMarc(r,id) {
+       hideMe($('rdetail_extras_loading'));
+       $('rdetail_view_marc_box').innerHTML = r.getResultObject();
+
+       var div = elem('div', { "class" : 'hide_me' });
+       var span = div.appendChild( elem('abbr') );
+
+       buildunAPISpan( span, 'biblio-record_entry', record.doc_id() );
+
+       $('rdetail_view_marc_box').insertBefore(span, $('rdetail_view_marc_box').firstChild);
+}
+
+
+function rdetailShowLocalCopies() {
+       rdetailShowLocal = true;
+       rdetailBuildInfoRows();
+       hideMe(G.ui.rdetail.cp_info_local);
+       unHideMe(G.ui.rdetail.cp_info_all);
+       hideMe(G.ui.rdetail.cp_info_none); 
+}
+
+function rdetailShowAllCopies() {
+
+       rdetailShowLocal = false;
+       rdetailBuildInfoRows();
+       hideMe(G.ui.rdetail.cp_info_all);
+       unHideMe(G.ui.rdetail.cp_info_local);
+       hideMe(G.ui.rdetail.cp_info_none); 
+}
+
+function OpenMarcEditWindow(pcrud, rec) {
+       /*
+          To run in Firefox directly, must set signed.applets.codebase_principal_support
+          to true in about:config
+        */
+       netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');
+       win = window.open('/xul/server/cat/marcedit.xul'); // XXX version?
+       dojo.require('openils.PermaCrud');
+
+       win.xulG = {
+               "record": {"marc": rec.marc()},
+               "save": {
+                       "label": opac_strings.SAVE_MFHD_LABEL,
+                       "func": function(xmlString) {
+                               rec.marc(xmlString);
+                               rec.ischanged(true);
+                               pcrud.update(rec);
+                       }
+               }
+       };
+}
+
+function loadMarcEditor(recId) {
+       var pcrud = new openils.PermaCrud({"authtoken": G.user.session});
+       var rec = pcrud.retrieve("sre", recId);
+       if (rec) {
+               OpenMarcEditWindow(pcrud, rec);
+       }
+}
+
+/*
+ * This function could be written much more intelligently
+ * Limited brain power means that I'm brute-forcing it for now
+ */
+function _holdingsDraw(h) {
+       holdings = h.getResultObject();
+       if (!holdings) { return null; }
+
+       dojo.forEach(holdings, _holdingsDrawMFHD);
+
+}
+
+function _holdingsDrawMFHD(holdings, entryNum) {
+
+        var here = findOrgUnit(getLocation());
+        if (getDepth() > 0 || getDepth === 0 ) {
+                while (getDepth() < findOrgDepth(here))
+                here = findOrgUnit( here.parent_ou() );
+               if (!orgIsMine(findOrgUnit(here), findOrgUnit(holdings.owning_lib()))) {
+                       return null;
+               }
+        }
+
+       var hh = holdings.holdings();
+       var hch = holdings.current_holdings();
+       var hs = holdings.supplements();
+       var hcs = holdings.current_supplements();
+       var hi = holdings.indexes();
+       var hci = holdings.current_indexes();
+       var ho = holdings.online();
+       var hm = holdings.missing();
+       var hinc = holdings.incomplete();
+       var hloc = holdings.location() || 'MFHD';
+
+       if (    hh.length == 0 && hch.length == 0 && hs.length == 0 &&
+               hcs.length == 0 && hi.length == 0 && hci.length == 0 &&
+               ho.length == 0 && hm.length == 0 && hinc.length == 0
+       ) {
+
+               if (isXUL()) {
+                       /* 
+                        * If we have a record, but nothing to show for it, then the
+                        * record is likely empty or corrupt. This gives cataloguers a
+                        * chance to add holdings or correct the record
+                        */
+                       hh = 'PLACEHOLDER';
+               } else {
+                       return null;
+               }
+       }
+
+       dojo.place("<table style='width: 100%;'><caption id='mfhdHoldingsCaption" + entryNum + "' class='rdetail_header color_1'>" +
+               dojo.string.substitute(opac_strings.HOLDINGS_TABLE_CAPTION, [hloc]) +
+               "</caption><tbody id='rdetail_holdings_tbody_" + entryNum +
+               "'></tbody></table>", "rdetail_details_table", "after"
+       );
+       if (hh.length > 0) { _holdingsDrawMFHDEntry(entryNum, opac_strings.HOLDINGS, hh); }
+       if (hch.length > 0) { _holdingsDrawMFHDEntry(entryNum, opac_strings.CURRENT_HOLDINGS, hch); }
+       if (hs.length > 0) { _holdingsDrawMFHDEntry(entryNum, opac_strings.SUPPLEMENTS, hs); }
+       if (hcs.length > 0) { _holdingsDrawMFHDEntry(entryNum, opac_strings.CURRENT_SUPPLEMENTS, hcs); }
+       if (hi.length > 0) { _holdingsDrawMFHDEntry(entryNum, opac_strings.INDEXES, hi); }
+       if (hci.length > 0) { _holdingsDrawMFHDEntry(entryNum, opac_strings.CURRENT_INDEXES, hci); }
+       if (ho.length > 0) { _holdingsDrawMFHDEntry(entryNum, opac_strings.ONLINE_VOLUMES, ho); }
+       if (hm.length > 0) { _holdingsDrawMFHDEntry(entryNum, opac_strings.MISSING_VOLUMES, hm); }
+       if (hinc.length > 0) { _holdingsDrawMFHDEntry(entryNum, opac_strings.INCOMPLETE_VOLUMES, hinc); }
+
+       if (isXUL()) {
+               dojo.require('openils.Event');
+               dojo.require('openils.PermaCrud');
+               var mfhd_edit = new dijit.Menu({});
+               new dijit.MenuItem({onClick: function(){loadMarcEditor(holdings.id())}, label:opac_strings.EDIT_MFHD_RECORD}).placeAt(mfhd_edit, "first");
+               new dijit.MenuItem({onClick:function(){
+                       var pcrud = new openils.PermaCrud({"authtoken": G.user.session});
+                       var mfhd_rec = pcrud.retrieve("sre", holdings.id());
+                       if (mfhd_rec) {
+                               pcrud.eliminate(mfhd_rec);
+                               alert(dojo.string.substitute(opac_strings.DELETED_MFHD_RECORD, [holdings.id()]));
+                       }
+               }, label:opac_strings.DELETE_MFHD}).placeAt(mfhd_edit, "last");
+               // new dijit.MenuItem({onClick:function(){alert("Edit properties " + holdings.id());}, label:opac_strings.EDIT_PROPERTIES}).placeAt(mfhd_edit, "last");
+               var mfhd_mb = new dijit.form.DropDownButton({dropDown: mfhd_edit, label:opac_strings.EDIT_MFHD_MENU, style:"float:right"});
+               mfhd_mb.placeAt("mfhdHoldingsCaption" + entryNum, "last");
+               mfhd_edit.startup();
+       }
+}
+
+function _holdingsDrawMFHDEntry(entryNum, entryName, entry) {
+       var flatEntry = entry.toString().replace(/,/g, ', ');
+       dojo.place("<tr><td> </td><td nowrap='nowrap' class='rdetail_desc'>" + entryName + "</td><td class='rdetail_item'>" + flatEntry + "</td></tr>", "rdetail_holdings_tbody_" + entryNum, "last");
+}
+
+function _rdetailDraw(r) {
+       record = r.getResultObject();
+
+       runEvt('rdetail', 'recordRetrieved', record.doc_id());
+
+       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())));
+       G.ui.rdetail.edition.appendChild(text(record.edition()));
+       G.ui.rdetail.pubdate.appendChild(text(record.pubdate()));
+       G.ui.rdetail.publisher.appendChild(text(record.publisher()));
+       $('rdetail_physical_desc').appendChild(text(record.physical_description()));
+       r = record.types_of_resource();
+       if(r) {
+               G.ui.rdetail.tor.appendChild(text(r[0]));
+               setResourcePic( G.ui.rdetail.tor_pic, r[0]);
+       }
+       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());
+                               $('rdetail.jacket_attrib_link').setAttribute('href', href);
+                       }
+                       rdetailCheckForGBPreview();
+
+               } else {
+                       hideMe($("rdetail.jacket_attrib_div"));
+                       hideMe($("rdetail_img_link"));
+               }
+       } catch(E) {}
+
+
+       // see if the record has any external links 
+       var links = record.online_loc();
+       for( var i = 0; links && links.length > 0 && i < links.length; i = i + 3 ) {
+               var href = links[i];
+               // avoid matching "HTTP: The Complete Reference"
+               //if( href.match(/https?:\/|ftps?:\/|mailto:|http?:/i) && href.match(/ezproxy|law/i )) {
+               var test = null;
+               if (urlCheck)
+                       test = href.match(urlExpr);
+
+               if( href.match(/https?:\/|ftps?:\/|mailto:|http?:/i) && test == null) {
+                       unHideMe($('rdetail_online_row'));
+                       // MODS can contain a display label (used for the text of the link)
+                       // as well as a note about the URL; many legacy systems conflate the
+                       // two and generate MARC records that expect the note to be used as
+                       // the text of the link, with no display label; here's the canonical
+                       // format:
+                       //
+                       // 856 40 $uhttp://localhost$yDisplay label$zPublic note
+                       //
+                       // Note that the MARC21slim2MODS XSL concatenates $3 and $y together
+                       // (as $y was defined later in MARC21's life as the display label)
+                       var displayLabel = '' + links[i+1];
+                       var note = '' + links[i+2];
+                       if(!displayLabel || displayLabel.match(/https?:\/|ftps?:\/|mailto:/i)) {
+                               if(!note || note.match(/https?:\/|ftps?:\/|mailto:/i)) {
+                                       displayLabel = href;
+                               } else {
+                                       displayLabel = note;
+                               }
+                       }
+            // IE in quirks mode doesn't render CSS styling for links where the class attribute
+            // comes after the href attribute, apparently; we can use Dojo to ensure the class
+            // attribute comes first
+            dojo.place('<a class="search_link" href="' + href + '">' + displayLabel + '</a>', dojo.byId('rdetail_online'));
+                       if (note && note != displayLabel) {
+                               $('rdetail_online').appendChild(elem('span', {'class':'url_note'}, ' - ' + note));
+                       }
+                       $('rdetail_online').appendChild(elem('br'));
+               }
+       }
+
+       // Fill in our unAPI ID, if anyone cares
+       var abbrs = document.getElementsByTagName('abbr');
+       var span;
+       for (var i = 0; i < abbrs.length; i = i + 1) {
+               if (abbrs[i].getAttribute('name') == 'unapi') {
+                       span = abbrs[i];
+                       break;
+               }
+       }
+       buildunAPISpan( span, 'biblio-record_entry', record.doc_id() );
+
+       $('rdetail_place_hold').setAttribute(
+                       'href','javascript:holdsDrawEditor({record:"'+record.doc_id()+'",type:"T"});');
+
+       var RW = $('rdetail_exp_refworks');
+       if (RW && rdetailEnableRefWorks) {
+
+               var here = (findOrgUnit(getLocation())).name();
+               var org_name = here.replace(" ", "+");
+               var cgi = new CGI();
+
+               RW.setAttribute(
+                       'href',
+                       rdetailRefWorksHost + '/express/expressimport.asp?vendor='
+                       + org_name
+                       + '&filter=MARC+Format&database=All+MARC+Formats&encoding=65001&url=http%3A%2F%2F'
+                       + cgi.server_name + '/opac/extras/supercat/marctxt/record/'
+                       + record.doc_id()
+              );
+
+               RW.setAttribute('target', 'RefWorksMain');
+               RW.setAttribute('class', 'classic_link');
+
+               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())));
+
+       // Set extras before recordDrawn event to enable bookbags in barcode searches
+       rdetailSetExtrasSelector();
+
+       runEvt("rdetail", "recordDrawn");
+       recordsCache.push(record);
+
+
+       var breq = new Request(FETCH_BRE, [getRid()]);
+       breq.callback( rdetailCheckDeleted );
+       breq.send();
+
+       resultBuildCaches( [ record ] );
+    /*
+       resultDrawSubjects();
+       resultDrawSeries();
+    */
+
+       // grab added content 
+       acCollectData(cleanISBN(record.isbn()), rdetailhandleAC);
+}
+
+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];
+       if( isTrue(br.deleted()) ) {
+               hideMe($('rdetail_place_hold'));
+               $('rdetail_more_actions_selector').disabled = true;
+               unHideMe($('rdetail_deleted_exp'));
+       }
+}
+
+function rdetailSetExtrasSelector() {
+       if(!grabUser()) return;
+       unHideMe($('rdetail_more_actions'));
+
+       var req = new Request( 
+                       FETCH_CONTAINERS, G.user.session, G.user.id(), 'biblio', 'bookbag' );
+       req.callback(rdetailAddBookbags);
+       req.send();
+}
+
+function rdetailAddBookbags(r) {
+
+       var containers = r.getResultObject();
+       var selector = $('rdetail_more_actions_selector');
+       var found = false;
+       var index = 3;
+       doSelectorActions(selector);
+
+       for( var i = 0; i != containers.length; i++ ) {
+               found = true;
+               var container = containers[i];
+               insertSelectorVal( selector, index++, container.name(), 
+                               "container_" + container.id(), rdetailAddToBookbag,  1 );
+       }
+
+       nextContainerIndex = index;
+}
+
+var _actions = {};
+function rdetailNewBookbag() {
+       var name = prompt($('rdetail_bb_new').innerHTML,"");
+       if(!name) return;
+
+       var id;
+       if( id = containerCreate( name ) ) {
+               alert($('rdetail_bb_success').innerHTML);
+               var selector = $('rdetail_more_actions_selector');
+               insertSelectorVal( selector, nextContainerIndex++, name, 
+                               "container_" + id, rdetailAddToBookbag, 1 );
+               setSelector( selector, 'start' );
+       }
+}
+
+
+function rdetailAddToBookbag() {
+       var selector = $('rdetail_more_actions_selector');
+       var id = selector.options[selector.selectedIndex].value;
+       setSelector( selector, 'start' );
+
+       if( containerCreateItem( id.substring(10), record.doc_id() )) {
+               alert($('rdetail_bb_item_success').innerHTML);
+       }
+}
+
+
+var rdetailMarcFetched = false;
+function rdetailShowExtra(type, args) {
+
+       hideMe($('rdetail_copy_info_div'));
+       hideMe($('rdetail_reviews_div'));
+       hideMe($('rdetail_toc_div'));
+       hideMe($('rdetail_anotes_div'));
+       hideMe($('rdetail_excerpt_div'));
+       hideMe($('rdetail_preview_div'));
+       hideMe($('rdetail_marc_div'));
+       hideMe($('cn_browse'));
+       hideMe($('rdetail_cn_browse_div'));
+       hideMe($('rdetail_notes_div'));
+
+       removeCSSClass($('rdetail_copy_info_link'), 'rdetail_extras_selected');
+       removeCSSClass($('rdetail_viewcn_link'), 'rdetail_extras_selected');
+       removeCSSClass($('rdetail_reviews_link'), 'rdetail_extras_selected');
+       removeCSSClass($('rdetail_toc_link'), 'rdetail_extras_selected');
+       removeCSSClass($('rdetail_excerpt_link'), 'rdetail_extras_selected');
+       removeCSSClass($('rdetail_preview_link'), 'rdetail_extras_selected');
+       removeCSSClass($('rdetail_anotes_link'), 'rdetail_extras_selected');
+       removeCSSClass($('rdetail_annotation_link'), 'rdetail_extras_selected');
+       removeCSSClass($('rdetail_viewmarc_link'), 'rdetail_extras_selected');
+
+       switch(type) {
+
+               case "copyinfo": 
+                       unHideMe($('rdetail_copy_info_div')); 
+                       addCSSClass($('rdetail_copy_info_link'), 'rdetail_extras_selected');
+                       break;
+
+               case "reviews": 
+                       addCSSClass($('rdetail_reviews_link'), 'rdetail_extras_selected');
+                       unHideMe($('rdetail_reviews_div')); 
+                       break;
+
+               case "excerpt": 
+                       addCSSClass($('rdetail_excerpt_link'), 'rdetail_extras_selected');
+                       unHideMe($('rdetail_excerpt_div'));
+                       break;
+
+               case "preview": 
+                       addCSSClass($('rdetail_preview_link'), 'rdetail_extras_selected');
+                       unHideMe($('rdetail_preview_div'));
+                       rdetailDisplayGBPreview();
+                       break;
+
+               case "anotes": 
+                       addCSSClass($('rdetail_anotes_link'), 'rdetail_extras_selected');
+                       unHideMe($('rdetail_anotes_div'));
+                       break;
+
+               case "toc": 
+                       addCSSClass($('rdetail_toc_link'), 'rdetail_extras_selected');
+                       unHideMe($('rdetail_toc_div'));
+                       break;
+
+               case "marc": 
+                       addCSSClass($('rdetail_viewmarc_link'), 'rdetail_extras_selected');
+                       unHideMe($('rdetail_marc_div')); 
+                       if(rdetailMarcFetched) return;
+                       unHideMe($('rdetail_extras_loading'));
+                       rdetailMarcFetched = true;
+                       var req = new Request( FETCH_MARC_HTML, record.doc_id() );
+                       req.callback(rdetailViewMarc); 
+                       req.send();
+                       break;
+
+               case 'cn':
+                       addCSSClass($('rdetail_viewcn_link'), 'rdetail_extras_selected');
+                       unHideMe($('rdetail_cn_browse_div'));
+                       rdetailShowCNBrowse(defaultCN, getLocation(), null, true);
+                       break;
+
+       }
+}
+
+function rdetailVolumeDetails(args) {
+       var row = $(args.rowid);
+       var tbody = row.parentNode;
+       cpdBuild( tbody, row, record, args.cn, args.org, args.depth, args.copy_location );
+       return;
+}
+
+function rdetailBuildCNList() {
+
+       var select = $('cn_browse_selector');
+       var index = 0;
+       var arr = [];
+       for( var cn in callnumberCache ) arr.push( cn );
+       arr.sort();
+
+       if( arr.length == 0 ) {
+               hideMe($('rdetail_cn_browse_select_div'));
+               return;
+       }
+
+       for( var i in arr ) {
+               var cn = arr[i];
+               var opt = new Option(cn);
+               select.options[index++] = opt;
+       }
+       select.onchange = rdetailGatherCN;
+}
+
+function rdetailGatherCN() {
+       var cn = getSelectorVal($('cn_browse_selector'));
+       rdetailShowCNBrowse( cn, getLocation(), getDepth(), true );
+       setSelector( $('cn_browse_selector'), cn );
+}
+
+
+function rdetailShowCNBrowse( cn, loc, depth, fromOnclick ) {
+
+       if(!cn) {
+               unHideMe($('cn_browse_none'));
+               hideMe($('rdetail_cn_browse_select_div'));
+               return;
+       }
+
+       unHideMe($('rdetail_cn_browse_select_div'));
+       rdetailBuildCNList();
+       setSelector( $('cn_browse_selector'), cn );
+       hideMe($('rdetail_copy_info_div'));
+       hideMe($('rdetail_reviews_div'));
+       hideMe($('rdetail_toc_div'));
+       hideMe($('rdetail_marc_div'));
+       unHideMe($('rdetail_cn_browse_div'));
+       unHideMe($('cn_browse'));
+       if( !rdetailLocalOnly && ! fromOnclick ) depth = findOrgDepth(globalOrgTree);
+       cnBrowseGo(cn, loc, depth);
+}
+
+function rdetailhandleAC(data) {
+
+       if( data.reviews.html ) {
+               $('rdetail_review_container').innerHTML = data.reviews.html;
+               unHideMe($('rdetail_reviews_link'));
+       }
+
+       if( data.toc.html ) {
+               $('rdetail_toc_div').innerHTML = data.toc.html;
+               unHideMe($('rdetail_toc_link'));
+       }
+
+       if( data.excerpt.html ) {
+               $('rdetail_excerpt_div').innerHTML = data.excerpt.html;
+               unHideMe($('rdetail_excerpt_link'));
+       }
+
+       if( data.anotes.html ) {
+               $('rdetail_anotes_div').innerHTML = data.anotes.html;
+               unHideMe($('rdetail_anotes_link'));
+       }
+}
+
+function rdetailShowReviews(r) {
+       hideMe($('rdetail_extras_loading'));
+       var res = r.getResultObject();
+       var par = $('rdetail_reviews_div');
+       var template = par.removeChild($('rdetail_review_template'));
+       if( res && res.length > 0 ) {
+               unHideMe($('rdetail_reviews_link'));
+               for( var i = 0; i != res.length; i++ ) {
+                       var rev = res[i];       
+                       if( rev.text && rev.info ) {
+                               var node = template.cloneNode(true);
+                               $n(node, 'review_header').appendChild(text(rev.info));
+                               $n(node, 'review_text').appendChild(text(rev.text));
+                               par.appendChild(node);
+                       }
+               }
+       }
+}
+
+
+function rdetailShowTOC(r) {
+       hideMe($('rdetail_extras_loading'));
+       var resp = r.getResultObject();
+       if(resp) {
+               unHideMe($('rdetail_toc_link'));
+               $('rdetail_toc_div').innerHTML = resp;
+       }
+}
+
+function rdetailBuildInfoRows() {
+        var req;
+        var method = FETCH_COPY_COUNTS_SUMMARY;
+
+        //we figure out the number of copies
+        if (rdetailBreakUpLargeSets)
+                cpCnt = sortOutCopies(getLocation(), getRid(), getForm());
+
+        if (rdetailShowCopyLocation && cpCnt < pgThreshold)
+                method = FETCH_COPY_LOCATION_COUNTS_SUMMARY;
+
+        if( rdetailShowLocal )
+                req = new Request(method, record.doc_id(), getLocation(), getDepth())
+        else
+                req = new Request(method, record.doc_id());
+
+        if (rdetailBreakUpLargeSets && cpCnt >= pgThreshold) {
+                rdetailLocalOnly = true;
+                req.request.rec_id = record.doc_id();
+                req.request.cpCnt = cpCnt;
+                //remove the location options for paged sets
+                try {
+                        /*
+                        hideMe(G.ui.rdetail.cp_info_local);
+                        hideMe(G.ui.rdetail.cp_info_all);
+                        */
+                } catch(e) { }
+                req.callback(_rdetailBuildInfoPagedRows);
+        } else
+                req.callback(_rdetailBuildInfoRows);
+        req.send();
+}
+
+
+function rdetailCNPrint(orgid, cn) {
+       var div = cpdBuildPrintWindow( record, orgid);
+       var template = div.removeChild($n(div, 'cnrow'));
+       var rowNode = $("cp_info_" + orgid);
+       cpdStylePopupWindow(div);
+       openWindow(div.innerHTML);
+}
+
+var localCNFound = false;
+var ctr = 0;
+
+function _rdetailBuildInfoPagedRows(r) {
+
+        //alert(r.getText());
+        if (!r) return;
+        /*
+        */
+        var summary = r.getResultObject();
+        if(!summary) return;
+
+        summary.sort(callsortfn);
+        if (rdetailShowCopyLocation)
+                unHideMe( $n( $('rdetail_copy_info_table'), 'rdetail_copylocation_header' ) );
+
+        removeChildren(copyRowParent);
+
+        var rec_id = r.rec_id;
+        //var tot_copies = r.cpCnt;
+        var tot_copies = summary.length;
+        var cgi = new CGI();
+        var parm = cgi.param("cstart");
+        if (parm == undefined)
+                parm = 0;
+        var summaryStart = parseInt(parm);
+        parm = cgi.param("csize");
+        if (parm == undefined)
+                parm = pgDisplay;
+        var summarySize = parseInt(parm) + summaryStart;
+        if (summarySize > tot_copies)
+                summarySize = tot_copies;
+        var pgSize = parseInt(parm);
+
+        _rdetailRows(null,summaryStart, pgSize, summarySize, tot_copies);
+        var found = true;
+
+        for( var i = summaryStart; i < summary.length && i < summarySize; i++ ) {
+                var arr = summary[i];
+                globalCNCache[arr[1]] = 1;
+                var thisOrg = findOrgUnit(arr[0]);
+                var rowNode = $("cp_info_" + thisOrg.id());
+                if(!rowNode) continue;
+
+                if(rowNode.getAttribute("used")) {
+
+                        if( rowNode.nextSibling ) {
+                                sib = rowNode.nextSibling;
+                                o ='cp_info_'+thisOrg.id()+'_';
+                                /* push the new row on as the last row for this org unit */
+                                while( sib && sib.id.match(o) ) {
+                                        sib = sib.nextSibling;
+                                }
+                                if(sib)
+                                        rowNode = copyRowParent.insertBefore(copyRow.cloneNode(true), sib);
+                                else
+                                        rowNode = copyRowParent.appendChild(copyRow.cloneNode(true));
+                        } else {
+                                rowNode = copyRowParent.appendChild(copyRow.cloneNode(true));
+                        }
+
+                        var n = findNodeByName( rowNode, config.names.rdetail.lib_cell );
+                        n.appendChild(text(thisOrg.name()));
+                        n.setAttribute("style", "padding-left: " + ((findOrgDepth(thisOrg) - 1)  * 9) + "px;");
+                        rowNode.id = "cp_info_" + thisOrg.id() + '_' + (++ctr);
+
+                } else {
+                        rowNode.setAttribute("used", "1");
+                }
+
+                var cpc_temp = rowNode.removeChild(
+                                findNodeByName(rowNode, config.names.rdetail.cp_count_cell));
+
+                var statuses = arr[2];
+                var cl = '';
+
+                var recreq = new Request( FETCH_COPIES_FROM_VOLUME, rec_id, arr[1], arr[0]);
+                recreq.request.rowNode = rowNode;
+                recreq.request.cpc_temp = cpc_temp;
+                recreq.request.statuses = statuses;
+                recreq.request.arrVal = arr[1];
+                recreq.request.thisOrg = thisOrg;
+                recreq.callback(_rdetailFL);
+                recreq.send();
+
+
+                if( i == summary.length - 1 && !defaultCN) defaultCN = arr[1];
+        }
+
+        if(!found) unHideMe(G.ui.rdetail.cp_info_none);
+}
+
+function _rdetailBuildInfoRows(r) {
+
+        if (rdetailShowCopyLocation)
+                unHideMe( $n( $('rdetail_copy_info_table'), 'rdetail_copylocation_header' ) );
+
+        removeChildren(copyRowParent);
+
+        _rdetailRows();
+
+        var summary = r.getResultObject();
+        if(!summary) return;
+        var cgi = new CGI();
+        var parm = cgi.param("cstart");
+        if (parm == undefined)
+                parm = 0;
+        var summaryStart = parseInt(parm);
+        parm = cgi.param("csize");
+        if (parm == undefined)
+                parm = 25;
+        var summarySize = parseInt(parm);
+
+        var found = false;
+        //for( var i = 0; i < summary.length; i++ ) {
+        for( var i = summaryStart; i < summary.length && i < summarySize; i++ ) {
+
+                var arr = summary[i];
+                globalCNCache[arr[1]] = 1;
+                var thisOrg = findOrgUnit(arr[0]);
+                var rowNode = $("cp_info_" + thisOrg.id());
+                if(!rowNode) continue;
+
+                if(rowNode.getAttribute("used")) {
+
+                        if( rowNode.nextSibling ) {
+                                sib = rowNode.nextSibling;
+                                o ='cp_info_'+thisOrg.id()+'_';
+                                /* push the new row on as the last row for this org unit */
+                                while( sib && sib.id.match(o) ) {
+                                        sib = sib.nextSibling;
+                                }
+                                if(sib)
+                                        rowNode = copyRowParent.insertBefore(copyRow.cloneNode(true), sib);
+                                else
+                                        rowNode = copyRowParent.appendChild(copyRow.cloneNode(true));
+                        } else {
+                                rowNode = copyRowParent.appendChild(copyRow.cloneNode(true));
+                        }
+
+                        var n = findNodeByName( rowNode, config.names.rdetail.lib_cell );
+                        n.appendChild(text(thisOrg.name()));
+                        n.setAttribute("style", "padding-left: " + ((findOrgDepth(thisOrg) - 1)  * 9) + "px;");
+                        rowNode.id = "cp_info_" + thisOrg.id() + '_' + (++ctr);
+
+                } else {
+                        rowNode.setAttribute("used", "1");
+                }
+
+                var cpc_temp = rowNode.removeChild(
+                                findNodeByName(rowNode, config.names.rdetail.cp_count_cell));
+
+                var statuses = arr[2];
+                var cl = '';
+                if (rdetailShowCopyLocation) {
+                        cl = arr[2];
+                        statuses = arr[3];
+                }
+
+                rdetailApplyStatuses(rowNode, cpc_temp, statuses);
+
+                var isLocal = false;
+                if( orgIsMine( findOrgUnit(getLocation()), thisOrg ) ) {
+                        found = true;
+                        isLocal = true;
+                        if(!localCNFound) {
+                                localCNFound = true;
+                                defaultCN = arr[1];
+                        }
+                }
+
+                //if(isLocal) unHideMe(rowNode);
+                unHideMe(rowNode);
+
+                rdetailSetPath( thisOrg, isLocal );
+                rdetailBuildBrowseInfo( rowNode, arr[1], isLocal, thisOrg, cl);
+
+                if( i == summary.length - 1 && !defaultCN) defaultCN = arr[1];
+        }
+
+        if(!found) unHideMe(G.ui.rdetail.cp_info_none);
+}
+
+function _rdetailRows(node, summaryStart, pgSize, summarySize, tot_copies) {
+
+        if( rdetailShowLocal && getLocation() != globalOrgTree.id() ) {
+                var loc = findOrgUnit(getLocation());
+                if( node ) {
+                        if( !orgIsMine(node, loc) && !orgIsMine(loc,node) ) return;
+                } else {
+                        for( var i = 0; i < globalOrgTree.children().length; i++ ) {
+                                var org = findOrgUnit(globalOrgTree.children()[i]);
+                                if( orgIsMine(org, loc) ) {
+                                        node = org;
+                                        break;
+                                }
+                        }
+                }
+        }
+
+        if(!node && findOrgType(globalOrgTree.ou_type()).can_have_vols())
+                node = globalOrgTree;
+
+
+        /* don't show hidden orgs */
+
+        if(node) {
+
+                if(!isXUL() && !isTrue(node.opac_visible())) return;
+
+                var row = copyRow.cloneNode(true);
+                row.id = "cp_info_" + node.id();
+                //alert(row.id);
+
+                var libtd = findNodeByName( row, config.names.rdetail.lib_cell );
+                var cntd  = findNodeByName( row, config.names.rdetail.cn_cell );
+                var cpctd = findNodeByName( row, config.names.rdetail.cp_count_cell );
+                var actions = $n(row, 'rdetail_actions_cell');
+
+                var p = libtd.getElementsByTagName('a')[0];
+                libtd.insertBefore(text(node.name()), p);
+
+                libtd.setAttribute("style", "padding-left: " + ((findOrgDepth(node) - 1)  * 9) + "px;");
+
+                if(!findOrgType(node.ou_type()).can_have_vols()) {
+
+                        row.removeChild(cntd);
+                        row.removeChild(cpctd);
+                        row.removeChild(actions);
+                        row.setAttribute('novols', '1');
+
+                        libtd.setAttribute("colspan", numStatuses + 3 );
+                        libtd.colSpan = numStatuses + 3;
+                        addCSSClass(row, 'copy_info_region_row');
+                        if (summaryStart!= undefined &&  pgSize!=undefined &&
+                                summarySize != undefined && tot_copies != undefined)
+                        {
+                                fillOutLinks(libtd, summaryStart, pgSize, summarySize, tot_copies);
+                        } //if summaryStart
+                }//if
+
+                copyRowParent.appendChild(row);
+
+        } else { node = globalOrgTree; }
+
+        for( var c in node.children() )
+                _rdetailRows(node.children()[c], summaryStart, pgSize, summarySize, tot_copies);
+}
+
+function _rdetailCL(r) {
+        if (!r) return;
+        var cl = r.getResultObject();
+        if (cl) {
+                //alert(r.arrVal + " - " + cl.location().name());
+                rdetailApplyStatuses(r.rowNode, r.cpc_temp, r.statuses);
+
+                var isLocal = false;
+                if( orgIsMine( findOrgUnit(getLocation()), r.thisOrg ) ) {
+                        isLocal = true;
+                        if(!localCNFound) {
+                                localCNFound = true;
+                                defaultCN = r.arrVal;
+                        }
+                }
+
+                //if(isLocal) unHideMe(rowNode);
+                unHideMe(r.rowNode);
+
+                rdetailSetPath( r.thisOrg, isLocal);
+                rdetailBuildBrowseInfo( r.rowNode, r.arrVal, isLocal, r.thisOrg,
+                        cl.location().name());
+        }//cl
+}
+function _rdetailFL(r) {
+        if (!r) return;
+        var fl = r.getResultObject();
+        if (fl) {
+                var cp_request = new Request(FETCH_FLESHED_COPY, fl);
+
+                cp_request.request.rowNode = r.rowNode;
+                cp_request.request.cpc_temp = r.cpc_temp;
+                cp_request.request.statuses = r.statuses;
+                cp_request.request.arrVal = r.arrVal;
+                cp_request.request.thisOrg = r.thisOrg;
+                cp_request.callback(_rdetailCL);
+                cp_request.send();
+        }//fl
+}
+
+/*
+        callsortfn - sorting an array of call numbers
+
+        This probably won't work for every instance, but assumes last
+        number is a year. Anyway, this is how to get into the
+        array values, it could be refined, though a better way
+        will be to set up a special opensrf that can apply
+        postgres goodness to this.
+*/
+function callsortfn(a,b) {
+        var callno1 = a[1];
+        var callno2 = b[1];
+        var callnum1 = 0;
+        var callnum2 = 0;
+
+        var marker = callno1.lastIndexOf(' ');
+        if (marker != -1)
+                callnum1 = parseInt(callno1.substring(marker));
+        marker = callno2.lastIndexOf(' ');
+        if (marker != -1)
+                callnum2 = parseInt(callno2.substring(marker));
+
+        //window.status = 'comparing ' + callnum1 + ' to ' + callnum2;
+
+        if (callnum1 < callnum2) return -1;
+        if (callnum1 > callnum2) return 1;
+        return 0;
+}
+
+function fillOutLinks(node, cpstart, cpsize, ssize, pieces) {
+        if (node) {
+                var theLink = document.location + "";
+                var marker = theLink.indexOf("&cstart");
+                if (marker > 0)
+                        theLink = theLink.substring(0,marker);
+
+                var summaryStmt = '(' + (cpstart + 1) + ' to ' + ssize + ' of ' + pieces;
+                node.appendChild(document.createTextNode(summaryStmt));
+                if ((cpstart + 1) > cpsize) {
+                        node.appendChild(document.createTextNode(' '));
+                        var pglink = document.createElement("a");
+                        pglink.appendChild(document.createTextNode('Start'));
+                        pglink.setAttribute('href',theLink + '&cstart=0' +
+                                '&csize=' + cpsize);
+                        pglink.setAttribute('class','classic_link');
+                        node.appendChild(pglink);
+                        node.appendChild(document.createTextNode(' '));
+                        var pglink = document.createElement("a");
+                        pglink.appendChild(document.createTextNode('<<'));
+                        pglink.setAttribute('href',theLink + '&cstart=' +
+                                (cpstart - cpsize) + '&csize=' + cpsize);
+                        pglink.setAttribute('class','classic_link');
+                        node.appendChild(pglink);
+                        node.appendChild(document.createTextNode(' '));
+                        /*
+                        */
+                }
+                if (ssize < pieces) {
+                        node.appendChild(document.createTextNode(' '));
+                        var pglink = document.createElement("a");
+                        pglink.appendChild(document.createTextNode('>>'));
+                        pglink.setAttribute('href',theLink + '&cstart=' +
+                                ssize + '&csize=' + cpsize);
+                        pglink.setAttribute('class','classic_link');
+                        node.appendChild(pglink);
+                        node.appendChild(document.createTextNode(' '));
+                        var pglink = document.createElement("a");
+                        pglink.appendChild(document.createTextNode('End'));
+                        pglink.setAttribute('href',theLink + '&cstart=' +
+                                (pieces - cpsize) + '&csize=' + cpsize);
+                        pglink.setAttribute('class','classic_link');
+                        node.appendChild(pglink);
+                        /*
+                        */
+                }
+                node.appendChild(document.createTextNode(')'));
+                /*
+                */
+        }//if node
+}
+
+function sortOutCNmaps(orgId, cn, cl) {
+       var cnSuffix = '';
+       var re = null;
+       var match = null;
+
+        for (var i = 0; i < cnMapping.length && cnSuffix.length==0; i++) {
+               if (cnMapping[i].locId == orgId) {
+                       if (cl.indexOf(cnMapping[i].locStr) != -1) {
+                               re = new RegExp(cnMapping[i].cnRegExp);
+                               match = re.exec(cn);
+                               if (match != null)
+                                       cnSuffix = cnMapping[i].cnLocation;
+                       }//if
+               }//if 
+        }//for
+       return (text(cn + ' ' + cnSuffix));
+}//sortOutCNmaps
+
+function rdetailBuildBrowseInfo(row, cn, local, orgNode, cl) {
+
+       if(local) {
+               var cache = callnumberCache[cn];
+               if( cache ) cache.count++;
+               else callnumberCache[cn] = { count : 1 };
+       }
+
+       var depth = getDepth();
+       if( !local ) depth = findOrgDepth(globalOrgTree);
+               
+        $n(row, 'rdetail_callnumber_cell').appendChild(sortOutCNmaps(orgNode.id(),cn, cl));
+
+       if (rdetailShowCopyLocation) {
+               var cl_cell = $n(row, 'rdetail_copylocation_cell');
+               cl_cell.appendChild(text(cl));
+               unHideMe(cl_cell);
+       }
+
+       _debug('setting action clicks for cn ' + cn);
+
+       var dHref = 'javascript:rdetailVolumeDetails('+
+                       '{copy_location : "'+cl.replace(/\"/g, '\\"')+'", rowid : "'+row.id+'", cn :"'+cn.replace(/\"/g, '\\"')+'", depth:"'+depth+'", org:"'+orgNode.id()+'", local: '+local+'});';
+
+       var bHref = 'javascript:rdetailShowCNBrowse("' + cn.replace(/\"/g, '\\"') + '", '+orgNode.id()+', "'+depth+'");'; 
+
+       unHideMe( $n(row, 'details') )
+               $n(row, 'details').setAttribute('href', dHref);
+       unHideMe( $n(row, 'browse') )
+               $n(row, 'browse').setAttribute('href', bHref);
+
+       if(isXUL()) {
+               unHideMe($n(row, 'hold_div'));
+               $n(row, 'hold').onclick = function() {
+                       var req = new Request(FETCH_VOLUME_BY_INFO, cn, record.doc_id(), orgNode.id());
+                       req.callback(
+                                       function(r) {
+                                       var vol = r.getResultObject();
+                                       holdsDrawEditor({type: 'V', volumeObject : vol});
+                                       }
+                                   );
+                       req.send();
+               };
+       } else {
+               if (cpCnt <= 1)
+                       eval(dHref);
+       }
+}
+
+// sets the path to org as 'active' and displays the path if it's local 
+function rdetailSetPath(org, local) {
+       if( findOrgDepth(org) == 0 ) return;
+       var row = $("cp_info_" + org.id());
+       row.setAttribute("hasinfo", "1");
+       unHideMe(row);
+       rdetailSetPath(findOrgUnit(org.parent_ou()), local);
+}
+
+//Append all the statuses for a given summary to the 
+//copy summary table 
+function rdetailApplyStatuses( row, template, statuses ) {
+       for( var j in _statusPositions ) {
+               var stat = _statusPositions[j];
+               var val = statuses[stat.id()];
+               if (val && checkStatus) {
+                       if (j == orderStatus || j == processStatus) 
+                               hideMe($('rdetail_place_hold'));
+               }//if
+               var nn = template.cloneNode(true);
+               if(val) nn.appendChild(text(val));
+               else nn.appendChild(text(0));
+               row.appendChild(nn);
+       }
+}
+
+//Add one td (creating a new column) to the copy summary
+//table for each opac_visible copy status
+function rdetailBuildStatusColumns() {
+
+       rdetailGrabCopyStatuses();
+       var parent = statusRow;
+       var template = parent.removeChild(G.ui.rdetail.cp_status);
+
+       var i = 0;
+       for( i = 0; i < cp_statuses.length; i++ ) {
+
+               var c = cp_statuses[i];
+               if( c && isTrue(c.opac_visible()) ) {
+                       var name = c.name();
+                       _statusPositions[i] = c;
+                       var node = template.cloneNode(true);
+                       var data = findNodeByName( node, config.names.rdetail.cp_status);
+
+                       data.appendChild(text(name));
+                       parent.appendChild(node);
+               }
+       }       
+
+       numStatuses = 0;
+       for(x in _statusPositions) numStatuses++; 
+}
+
+function rdetailGrabCopyStatuses() {
+       if(cp_statuses) return cp_statuses;
+       var req = new Request(FETCH_COPY_STATUSES);
+       req.send(true);
+       cp_statuses = req.result();
+       cp_statuses = cp_statuses.sort(_rdetailSortStatuses);
+}
+
+function _rdetailSortStatuses(a, b) {
+       return parseInt(a.id()) - parseInt(b.id());
+}
+
+/**
+ * Check for a Google Book preview 
+ */
+function rdetailCheckForGBPreview() {
+       if (!rdetailGoogleBookPreview) return;
+       searchForGBPreview( cleanISBN(record.isbn()) );
+}
+
+/**
+ *
+ * @param {DOM object} query The form element containing the
+ *                     input parameters "isbns"
+ */
+function searchForGBPreview( isbn ) {
+
+       // Delete any previous Google Booksearch JSON queries.
+       var GBPJsonScript = document.getElementById("GBPJsonScript");
+       if (GBPJsonScript) {
+               GBPJsonScript.parentNode.removeChild(GBPJsonScript);
+       }
+
+       // Add a script element with the src as the user's Google Booksearch query. 
+       // JSON output is specified by including the alt=json-in-script argument
+       // and the callback function is also specified as a URI argument.
+       var GBPScriptElement = document.createElement("script");
+
+       GBPScriptElement.setAttribute("id", "GBPJsonScript");
+       GBPScriptElement.setAttribute("src",
+                       "http://books.google.com/books?bibkeys=" + 
+                       isbn + "&jscmd=viewapi&callback=GBPreviewCallback");
+       GBPScriptElement.setAttribute("type", "text/javascript");
+
+       // make the request to Google booksearch
+       document.documentElement.firstChild.appendChild(GBPScriptElement);
+}
+
+/**
+ * This function is the call-back function for the JSON scripts which 
+ * executes a Google book search response.
+ *
+ * XXX I18N of text needed
+ *
+ * @param {JSON} booksInfo is the JSON object pulled from the Google books service.
+ */
+function GBPreviewCallback(GBPBookInfo) {
+       var GBPreviewDiv = document.getElementById("rdetail_preview_div");
+       var GBPBook;
+
+       for ( i in GBPBookInfo ) {
+               GBPBook = GBPBookInfo[i];
+       }
+
+       if ( !GBPBook ) {
+               return;
+       }
+
+       if ( GBPBook.preview != "noview" ) {
+               if ( GBPBook.preview == 'full' ) {
+                       setText( $('rdetail_preview_link'), $('rdetail_preview_full_text').innerHTML );
+                       $('rdetail_preview_link_a').title = $('rdetail_preview_title').innerHTML;      
+               }
+
+               // Add a button below the book cover image to load the preview.
+               GBPBadge = document.createElement( 'img' );
+               GBPBadge.src = 'http://books.google.com/intl/en/googlebooks/images/gbs_preview_button1.gif';
+               GBPBadge.title = $('rdetail_preview_badge').innerHTML;
+               GBPBadge.style.border = 0;
+               GBPBadgelink = document.createElement( 'a' );
+               GBPBadgelink.href = 'javascript:rdetailShowExtra("preview");';
+               GBPBadgelink.appendChild( GBPBadge );
+               $('rdetail_image_cell').appendChild( GBPBadgelink );
+               $('rdetail_preview_div').style.height = 600;
+
+               /* Display the "Preview" tab in the Extras section */
+               unHideMe( $('rdetail_preview_link' ) );
+       }
+}
+
+/**
+ *  This is called when the user clicks on the 'Preview' link.  We assume
+ *  a preview is available from Google if this link was made visible.
+ *
+ * XXX I18N of Google Book Preview language attribute needed
+ */
+function rdetailDisplayGBPreview() {
+       unHideMe($('rdetail_extras_loading'));
+       GBPreviewPane = $('rdetail_preview_div');
+       if ( GBPreviewPane.getAttribute('loaded') == null ||
+               GBPreviewPane.getAttribute('loaded') == "false" ) {
+               google.load("books", "0", {"callback" : rdetailGBPViewerLoadCallback, "language": "en"} );
+               GBPreviewPane.setAttribute('loaded', 'true');
+       }
+}
+
+function rdetailGBPViewerLoadCallback() {
+       hideMe($('rdetail_extras_loading'));
+       var GBPViewer = new google.books.DefaultViewer(document.getElementById('rdetail_preview_div'));
+       GBPViewer.load('ISBN:' + cleanISBN(record.isbn()) );
+
+}
diff --git a/Open-ILS/web/opac/skin/uwin/js/result_common.js b/Open-ILS/web/opac/skin/uwin/js/result_common.js
new file mode 100644 (file)
index 0000000..78606fb
--- /dev/null
@@ -0,0 +1,1015 @@
+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 = '';
+var suppressCopyCounts = true;
+var lookUpLimit = 100; //limit for invoking live status info
+var elec_loc = 'software, multimedia'; //res name for url locations
+
+function sortOutCopies(loc_id, rec_id, form_id) {
+        var copies = 0;
+        var recreq = new Request(FETCH_R_COPY_COUNTS, loc_id, rec_id, form_id);
+        recreq.send(true);
+        if (recreq) {
+                var copy_info =  recreq.result();
+                for (var i in copy_info) {
+                        if (loc_id == copy_info[i].org_unit)
+                                return copy_info[i].available;
+                }//for
+        }//if
+
+        return copies;
+}
+
+/* this was in opac_utils.js, putting here for now */
+function cleanISBN(isbn) {
+   if(isbn) {
+      isbn = isbn.toString().replace(/^\s+/,"");
+      var idx = isbn.indexOf(" ");
+      if(idx > -1) { isbn = isbn.substring(0, idx); }
+   } else isbn = "";
+   return isbn;
+}
+
+
+/* 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);
+
+       //we don't display copy counts for consortium
+       //G.evt.result.recordReceived.push(resultDisplayRecord, resultAddCopyCounts);
+       G.evt.result.recordReceived.push(resultDisplayRecord);
+
+       //we don't display copy counts for consortium
+       //G.evt.result.copyCountsReceived.push(resultDisplayCopyCounts);
+       G.evt.result.allRecordsReceived.push( function(){unHideMe($('result_info_2'))}, function() { allRecordsReceivedAndProcessed = true; });
+
+       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("<div style='text-align: center; width: 100%; margin-left: auto; margin-right: auto;'><strong>" +
+            esItem.description + "</strong>: <a class='classic_link' href='" +
+            extraSearchStuff.searchTerms + "'>" + extraSearchStuff.displayTerms + "</a><div>", "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)); 
+               $('prev_link2').setAttribute( "href", buildOPACLink('/')); 
+               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' );
+    }
+}
+
+/* riff on buildTitleDetailLink from opac_utils */
+function buildResultTitleDetailLink(rec, link, copyCnt) {
+        if(!rec) return;
+        link.appendChild(text(normalize(truncate(rec.title(), 500))));
+        var args = {};
+        args.page = RDETAIL;
+               
+       if (copyCnt > lookUpLimit)
+               args.page = RSDETAIL;
+
+        args[PARAM_RID] = rec.doc_id();
+    // in IE, if the link text contains a '@', it replaces the innerHTML text
+    // with the value of the href attribute.  Wait, what?  Yes.  Capture the
+    // innerHTML and put it back into place after the href is set
+    var linkText = link.innerHTML; // IE
+        link.setAttribute("href", buildOPACLink(args));
+    link.innerHTML = linkText; // IE
+}
+
+
+
+/* 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());
+    var currentISSN = 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);
+
+    if (currentISBN.length > 8) {
+        pic.setAttribute("src", buildISBNSrc(currentISBN));
+    } else {
+        pic.setAttribute("src", "/opac/images/blank.png");
+    }
+
+       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();
+                       if (pic!= null)
+                               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();
+                       if (pic != null)
+                               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', onlyrec);
+               var copyCnt = sortOutCopies(getLocation(), onlyrec, null);
+
+               buildResultTitleDetailLink(rec, title_link, copyCnt); 
+               var args = {};
+               args.page = RDETAIL;
+               args[PARAM_OFFSET] = 0;
+               args[PARAM_RID] = rec.doc_id();
+               if (pic != null)
+                       pic.parentNode.setAttribute("href", buildOPACLink(args));
+
+               //don't bother with holds at this point
+               /*
+               if (enableHoldsOnAvailable) {
+                       unHideMe($n(r,'place_hold_span'));
+                       $n(r,'place_hold_link').setAttribute(
+                               'href','javascript:holdsDrawEditor({record:"'+rec.doc_id()+'",type:"T"});');
+               }
+
+               $n(r,'place_hold_link').setAttribute(
+                       'href','javascript:holdsDrawEditor({record:"'+rec.doc_id()+'",type:"T"});');
+               */
+                // Stolen from trunk - (and stolen again from lul :-))
+                var here = findOrgUnit(getLocation());
+
+               if (copyCnt <= lookUpLimit) {
+                       dojo.require('openils.BibTemplate');
+                       var l_cn_list = $n(r,'local_callnumber_list');
+
+                       dojo.addOnLoad(function () {
+                               new openils.BibTemplate({
+                                       root : l_cn_list,
+                                       record : '' + onlyrec,
+                                       org_unit : here.shortname()
+                               }).render();
+                               unHideMe(l_cn_list);
+                       });
+               } else {
+                       //there is probably an easier way to deal with IE on this but...
+                       unHideMe( $n(r, "local_callnumber_list"));
+                       var callSpot = $n(r, "local_callnumber_list").parentNode;
+                       var newTd = document.createElement( 'td' )
+                       //to do: internationalize this
+                       newTd.appendChild(text("... " + copyCnt + " print items, please see full record for details on print and digital coverage."));
+                       addCSSClass(newTd,"too_many_copies");
+                       var newTr = document.createElement( 'tr' )
+                       newTr.appendChild(newTd);
+                       callSpot.insertBefore(newTr,
+                               $n(r, "local_callnumber_list"));
+               }//if
+       }
+
+       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'));
+
+       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;
+
+               if (elec_loc.length > 0 && rec.online_loc().length > 0) 
+                       res=elec_loc;
+
+               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_<depth>_<pagePosition>'  */
+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()));
+               t.appendChild(text(" "));
+               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 || suppressCopyCounts) 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;
+       var metarecords = (findCurrentPage() == MRESULT);
+       while(copy_counts[i] != null) {
+               var cell = $("copy_count_cell_" + i +"_" + pagePosition);
+               var cts = copy_counts[i];
+
+                var availMess = "Available";
+                if (cts.count >= cts.available && cts.available > 1)
+                        availMess = cts.available + " of " + cts.count + " Available";
+                if (cts.count > cts.available && cts.available == 0)
+                        availMess = "Checked Out";
+                if (cts.count == 0 && cts.available == 0)
+                        availMess = "Online";
+
+               //cell.appendChild(text(cts.available + " / " + cts.count));
+               cell.appendChild(text(availMess));
+
+               //don't bother with holds at this point
+               /*
+               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/uwin/xml/common/css_common.xml b/Open-ILS/web/opac/skin/uwin/xml/common/css_common.xml
new file mode 100644 (file)
index 0000000..816c3fc
--- /dev/null
@@ -0,0 +1,23 @@
+<!-- CSS shared across pages goes here --> 
+
+<link type='text/css' rel='stylesheet' href="<!--#echo var='OILS_SKIN_BASE'-->/uwin/css/layout.css"/>
+
+<!-- Our font CSS's -->
+<link type='text/css' rel='stylesheet' href='<!--#echo var="OILS_CSS_BASE"-->/mediumfont.css' />
+
+<!-- Our colors -->
+<link type='text/css' rel="stylesheet" href="<!--#echo var='OILS_THEME_BASE'-->/uwin/css/colors.css" />
+
+<!-- An alternate stylesheet -->
+<link type='text/css' rel="alternate stylesheet" title='&opac.style.reddish;' href="<!--#echo var='OILS_THEME_BASE'-->/reddish/css/colors.css" />
+
+<!-- OpenSearch auto discovery -->
+<link type="application/opensearchdescription+xml"
+       rel='search' title="University of Windsor Library Catalogue"
+       href="http://<!--#echo var='SERVER_NAME'-->/opac/extras/opensearch/1.1/WINDSYS/WINDSYS/osd.xml" />
+
+<!-- enable Dojo date picker -->
+<style type="text/css">
+       @import '/js/dojo/dojo/resources/dojo.css';
+       @import '/js/dojo/dijit/themes/tundra/tundra.css';
+</style>
diff --git a/Open-ILS/web/opac/skin/uwin/xml/common/libselect.xml b/Open-ILS/web/opac/skin/uwin/xml/common/libselect.xml
new file mode 100644 (file)
index 0000000..0f17dee
--- /dev/null
@@ -0,0 +1,15 @@
+<span>
+       <script language='javascript' type='text/javascript' src='<!--#echo var="OILS_OPAC_JS_HOST"-->/skin/uwin/js/depth_selector.js'></script>
+       <span class='hide_me' id='depth_selector_span'>
+               <!--#if expr="$SHOW_DEPTHSEL_TEXT='true'"-->
+               <span>&library.select; </span>
+               <!--#endif-->
+               <select id='depth_selector' class='libselect'>
+                       <option value='new'>&library.select.label;</option>
+               </select>
+       </span>
+       <span class='hide_me' id='lib_selector_span'>
+               <a id='lib_selector_link' class='classic_link' href='javascript:void(0)'>&library.select.help;</a>
+       </span>
+</span>
+
diff --git a/Open-ILS/web/opac/skin/uwin/xml/common/login.xml b/Open-ILS/web/opac/skin/uwin/xml/common/login.xml
new file mode 100644 (file)
index 0000000..c1a4338
--- /dev/null
@@ -0,0 +1,114 @@
+
+<div id='login_box' class='hide_me canvas' style='margin-top: 6px;'>
+
+       <script language='javascript' type='text/javascript'>
+               config.ids.login = {};
+               config.css.login = {};
+               config.ids.login.form                   = "login_form";
+               config.ids.login.box                    = "login_box";
+               config.ids.login.tbody                  = "login_tbody";
+               config.ids.login.username       = "login_username";
+               config.ids.login.password       = "login_password";
+               config.ids.login.button         = "login_button";
+               config.ids.login.cancel         = "login_cancel_button";
+               config.ids.altcanvas.login                      = config.ids.login.box;
+       </script>
+
+       <br/>
+
+       <div class='login_text color_1' style='padding: 4px; text-align: center;'>
+               <span>&opac.login.login;</span>
+       </div>
+
+       <br/>
+
+    <form id='login_form' method='POST' action='javascript:loginDance();'>
+        <table id='login_table' class='data_grid' style='margin-left: 20px;' width='95%'>
+            <tbody id='login_tbody'>
+                <tr>
+                    <td><span class='login_text'>&login.username;</span></td>
+                    <td>
+                        <span class='login_text'>
+                            <input id='login_username' name='login_username' type='text' size='16'></input>
+                        </span>
+                    </td>
+                </tr>
+                <tr>
+                    <td>
+                        <span class='login_text'>&common.password;</span>
+                    </td>
+                    <td>
+                        <span class='login_text'>
+                            <input id='login_password' name='login_password' type='password' size='16'></input>
+                        </span>
+                    </td>
+                </tr>
+                <tr><td><br/></td><td/></tr>
+                <tr class='color_1'>
+                    <td colspan='2' align='center'>
+                        <span class='login_text' style='margin-right: 20px;'>
+                        <input type='submit' value='&common.login;' name='login_button' id='login_button'></input>
+                        </span>
+                        <span class='login_text' style='margin-left: 20px;'>
+                            <input type='submit' name='login_cancel_button' id='login_cancel_button' value='&common.cancel;'></input>
+                        </span>
+                    </td>
+                </tr>
+            </tbody>
+        </table>
+    </form>
+
+       <table id='change_pw_table' class='data_grid hide_me' style='margin-left: 20px;' width='95%'>
+               <thead>
+                       <tr><td colspan='2' align='center'><b>&login.password;</b></td></tr>
+               </thead>
+               <tbody>
+
+                       <tr>
+                               <td colspan='2' style='padding:10px;'>
+                                       &login.first.time;
+                                       &common.password_criteria;
+                               </td>
+                       </tr>
+
+                       <tr>
+                               <td>&login.password.current.enter;</td>
+                               <td><input type='password' id='change_pw_current'/></td>
+                       </tr>
+
+                       <tr>
+                               <td>&login.password.new.enter;</td>
+                               <td><input type='password' id='change_pw_1'/></td>
+                       </tr>
+                       <tr>
+                               <td>&login.password.new.reenter;</td>
+                               <td><input type='password' id='change_pw_2'/></td>
+                       </tr>
+                       <tr><td><br/></td><td/></tr>
+                       <tr class='color_1'>
+                               <td colspan='2' align='center'>
+                                       <span class='login_text' style='margin-right: 20px;'>
+                                               <input type='submit' value='&login.password.update;'  id='change_pw_button'/>
+                                       </span>
+                               </td>
+                       </tr>
+               </tbody>
+       </table>
+
+       <span id='pw_no_match' class='hide_me'>&login.password.nomatch;</span>
+       <span id='pw_update_successful' class='hide_me'>&login.password.success;</span>
+
+       <span id='pw_not_strong' class='hide_me'>
+               &login.password.strength;
+               &common.password_criteria;
+       </span>
+
+       <span id='patron_card_inactive_alert' class='hide_me'>&login.barcode.inactive;</span>
+
+       <span id='patron_inactive_alert' class='hide_me'>&login.account.inactive;</span>
+
+       <span id='patron_login_failed' class='hide_me'>&login.failed;</span>
+
+</div>
+
+
diff --git a/Open-ILS/web/opac/skin/uwin/xml/common/logo.xml b/Open-ILS/web/opac/skin/uwin/xml/common/logo.xml
new file mode 100644 (file)
index 0000000..2eda9b4
--- /dev/null
@@ -0,0 +1,4 @@
+<div id='logo_div'>
+       <script language='javascript' type='text/javascript'>config.ids.common.top_logo = "top_left_logo";</script>
+       <img style='margin-right: 4px; width: 187px; height: 48px;' src='<!--#echo var="OILS_BASE"-->/images/uwin_logo_small.png' id='top_left_logo' border='0' class='logo' />
+</div>
diff --git a/Open-ILS/web/opac/skin/uwin/xml/footer.xml b/Open-ILS/web/opac/skin/uwin/xml/footer.xml
new file mode 100644 (file)
index 0000000..512f8e8
--- /dev/null
@@ -0,0 +1,41 @@
+<div id='copyright_block'>\r
+               <div id='footer_links'>\r
+                                <span class='footer_link'>\r
+                                        <a target='_blank' class='classic_link'\r
+                                                href='http://windsor.concat.ca/opac/en-CA/extras/slimpac/start.html'>Basic Catalogue (HTML only)</a>\r
+                                </span>\r
+                                <span> | </span>   \r
+                               <span class='footer_link'>\r
+                                       <a target='_blank' class='classic_link'\r
+                                               href='&uwin.footer.home.leddy.url;'>&uwin.footer.home.leddy;</a>\r
+                               </span>\r
+                               <span> | </span>\r
+                               <span class='footer_link'>\r
+                                       <a target='_blank' class='classic_link'\r
+                                               href='&uwin.footer.home.law.url;'>&uwin.footer.home.law;</a>\r
+                               </span>\r
+                               <span> | </span>\r
+                               <span class='footer_link'>\r
+                                       <a target='_blank' class='classic_link'\r
+                                               href='&uwin.footer.help.url;'>&uwin.footer.help;</a>\r
+                               </span>\r
+                               <span> | </span>\r
+                               <span class='footer_link'>\r
+                                       <a target='_blank' class='classic_link'\r
+                                               href='&uwin.footer.journals.url;'>&uwin.footer.journals;</a>\r
+                               </span> \r
+                               <span> | </span>\r
+                               <span class='footer_link'>\r
+                                       <a target='_blank' class='classic_link'\r
+                                               href='&uwin.footer.databases.url;'>&uwin.footer.databases;</a>\r
+                               </span> \r
+               </div>\r
+        <div id='copyright_text'>\r
+            <span>&footer.copyright;</span>\r
+        </div>\r
+        <div id='footer_logo'>&footer.logo;\r
+            <a href='http://open-ils.org'><img style='border:none; vertical-align:middle;' \r
+               src='../../../../images/eg_tiny_logo.jpg'/></a>/A service of\r
+            <a href='http://projectconifer.ca'><img style='border:none; vertical-align:middle;' src='../../../../images/conifer_tiny_logo.jpg'/></a>\r
+        </div>\r
+</div>\r
diff --git a/Open-ILS/web/opac/skin/uwin/xml/home/homesearch.xml b/Open-ILS/web/opac/skin/uwin/xml/home/homesearch.xml
new file mode 100644 (file)
index 0000000..ed306fa
--- /dev/null
@@ -0,0 +1,135 @@
+
+<div id='canvas_main' class='home_search canvas'
+       style='-moz-border-radius: 6px; padding: 6px; margin-top: 65px;' 
+       xmlns="http://www.w3.org/1999/xhtml" xmlns:xi="http://www.w3.org/2001/XInclude">
+
+       <!-- load my js -->
+       <script language='javascript' type='text/javascript'
+               src="<!--#echo var="OILS_OPAC_JS_HOST"-->/skin/uwin/js/depth_selector.js"> </script>
+       <script language='javascript' type='text/javascript'
+               src="<!--#echo var="OILS_OPAC_JS_HOST"-->/skin/uwin/js/search_bar.js"> </script>
+
+       <script language='javascript' type='text/javascript'>
+               config.ids.searchbar = {};
+               config.css.searchbar = {};
+               config.ids.searchbar.text                               = 'search_box'; 
+               config.ids.searchbar.submit                     = 'search_submit';      
+               config.ids.searchbar.type_selector      = 'search_type_selector';
+               config.ids.searchbar.depth_selector     = 'depth_selector';
+               config.ids.searchbar.form_selector      = 'form_selector';
+               config.ids.searchbar.extra_row          = 'searchbar_extra';
+               config.ids.searchbar.main_row                   = 'searchbar_main_row';
+               config.ids.searchbar.table                              = 'searchbar_table';
+               config.ids.searchbar.location_tag       = 'search_location_tag_link';
+               config.ids.searchbar.lib_sel_span       = 'lib_selector_span';
+               config.ids.searchbar.lib_sel_link       = 'lib_selector_link';
+               config.ids.searchbar.depth_sel_span     = 'depth_selector_span';
+       </script>
+
+
+       <div style='width: 100%; text-align: center'>
+               <img style='width: 560px; height: 82px;' src='<!--#echo var="OILS_BASE"-->/images/uwin_logo.png' />
+       </div>
+
+       <style>.rowpad { height: 20px; }</style>
+
+       <table id='frontsearch_table' height='100%' width='100%' 
+               style='margin-top: 10px; border-collapse: collapse;'>
+
+               <tbody>
+
+                       <tr class='color_3'>
+
+                               <script language='javascript' type='text/javascript'>
+                                       config.ids.common.now_searching = 'now_searching_location';
+                               </script>
+
+                               <td style='padding: 6px;' class='border_5' align='center'>
+                                       <span>&opac.search.nowSearching;</span>
+                                       <span style='padding: 1px;' id='now_searching_location'>  </span>
+                               </td>
+                       </tr>
+
+
+                       <tr class='rowpad'><td></td></tr>
+
+                       <tr>
+                               <td nowrap='nowrap' align='center' class='color_1 border_5'>
+                                       <input id='search_box' style='width: 300px;' type='text' />
+                                       <span style='padding-left: 6px;'>
+                                               <input type='button' style='width: 40px;' id='search_submit' value='Go!' />
+                                       </span>
+                               </td>
+                       </tr>
+
+                       <tr class='rowpad'><td></td></tr>
+
+                       <tr class='color_3 border_5'>
+
+                               <td nowrap='nowrap' align='center' style='padding: 4px;'>
+
+                                       <span style='padding-right:40px;'>
+                                               <!--#include virtual="../common/stypes_selector.xml"-->
+                                       </span>
+
+                                       <span>
+                                               <!--
+                                               <span>&common.format;: </span>
+                                               -->
+                                               <!--#set var='FORM_SEL_ID' value='form_selector'-->
+                                               <!--#include virtual="../common/format_selector.xml"-->
+                                       </span>
+
+                               </td>
+                       </tr>
+
+                       <tr class='rowpad'><td></td></tr>
+
+                       <tr class='color_1 border_5'>
+                               <td align='center' style='padding: 4px; padding-bottom: 6px;'>
+                                       <span style='padding-right: 15px;'>
+                                               <a id='home_adv_search_link' href='javascript:void(0);'>&opac.navigate.advanced;</a></span>
+                                       <span>
+                                               <span class='hide_me' id='depth_selector_span'>
+                                                       <select id='depth_selector' >
+                                                               <option value='new'>&opac.navigate.selectNewOrg;...</option>
+                                                       </select>
+                                               </span>
+                                               <span class='hide_me' id='lib_selector_span'>
+                                                       <a id='lib_selector_link' href='javascript:void(0)'>&opac.navigate.selectOrg;</a>
+                                               </span>
+                                       </span>
+                                       <span style='padding-left: 15px;'>
+                                               <a id='home_myopac_link' href='javascript:void(0);'>&opac.navigate.myopac;</a>
+                                       </span>
+                               </td>
+                       </tr>
+
+            <!-- locale picker -->
+            <tr><td align='center' valign='bottom' style='padding-top:10px;'>
+                       <span style='vertical-align: top;'>&common.language;</span>
+                       <span dojoType="dijit.form.FilteringSelect" store="openils.I18N.localeStore" 
+                    searchAttr="label" required="false" jsId='opacLocaleSelector'>
+                    <script>
+                        dojo.addOnLoad(function() {
+                            opacLocaleSelector.setValue(locale);
+                            dojo.connect(opacLocaleSelector, 'onChange', 
+                                function () {
+                                                       location.href = location.href.replace(/opac\/[^\/]+\/skin/, 'opac/' + this.getValue() + '/skin');
+                                }
+                            );
+                        });
+                    </script>
+                       </span>
+            </td></tr>
+
+               </tbody>
+       </table>
+
+</div>
+
+
+
+
+
+
diff --git a/Open-ILS/web/opac/skin/uwin/xml/rdetail/rdetail_summary.xml b/Open-ILS/web/opac/skin/uwin/xml/rdetail/rdetail_summary.xml
new file mode 100644 (file)
index 0000000..0f21578
--- /dev/null
@@ -0,0 +1,479 @@
+
+<abbr name="unapi" class="unapi-id" title='tag:<!--#echo var="HTTP_HOST"-->,<!--#echo var="OILS_TIME_YEAR"-->:biblio-record_entry/<!--#echo var="OILS_OPAC_RID"-->'></abbr>
+<!-- This holds the record summary information -->
+<div>
+       <!-- Hack to give IE somewhere to put these things; should just rip out from rdetail.js -->
+       <span class='hide_me' id='rdetail_title'></span>
+       <span class='hide_me' id='rdetail_isbn'></span>
+       <span class='hide_me' id='rdetail_publisher'></span>
+       <span class='hide_me' id='rdetail_abstract'></span>
+       <span class='hide_me' id='rdetail_edition'></span>
+       <table id='rdetail_details_table'>
+               <tbody id='rdetail_details_tbody'>
+
+                       <tr>
+                               <td id='rdetail_image_cell' rowspan='40'>
+                                       <a id='rdetail_img_link'>
+                                               <img style='border: none;' id='rdetail_image' 
+                            onerror='
+                                hideMe($("rdetail.jacket_attrib_div"));
+                                hideMe($("rdetail_img_link"));'/>
+                                       </a>
+                    <!-- vendor attribution link -->
+                    <div class='jacket_attrib hide_me' id='rdetail.jacket_attrib_div'>
+                        <div>&opac.image_provided;</div>
+                        <div><a target='_blank' href='&vendor.base_link;' 
+                            class='classic_link' id='rdetail.jacket_attrib_link'>&vendor.name;</a></div>
+                    </div>
+                               </td>
+                               <td nowrap='nowrap' class='rdetail_desc'>&common.title;</td>            
+                                <td type='opac/slot-data' query='datafield[tag=245]' class='rdetail_item'>
+                                         <script type='opac/slot-format'><![CDATA[
+                                               var rdetail_bib_title = BT.textContent(item);
+                                               var title_node = dojo.query('head title');
+                                               dojo.addOnLoad(function() {dojo.place('<title>' + rdetail_bib_title + '</title>', title_node[0], 'replace');});
+                                                return '<span>' + rdetail_bib_title + '</span><br/>';
+                                        ]]></script>
+                                </td>
+                       </tr>
+
+                       <tr class='hide_me' id='tag246'>
+                               <td nowrap='nowrap' class='rdetail_desc'>&common.alternate.title;</td>
+                               <td type='opac/slot-data' query='datafield[tag=246] subfield[code=a]' class='rdetail_item'>
+                                       <script type='opac/slot-format'><![CDATA[
+                                               dojo.query('#tag246').removeClass('hide_me');
+                                               return '<span>' + BT.textContent(item) + '</span><br/>';
+                                       ]]></script>
+                               </td>
+                       </tr>
+                       <tr class='hide_me'>
+                               <td nowrap='nowrap' class='rdetail_desc'>&common.author;</td>           
+                               <td class='rdetail_item'>
+                                       <a title='&rdetail.author.search;' id='rdetail_author'> </a>
+                               </td>
+                       </tr>
+                       <tr class='hide_me' id='tag100'>
+                               <td nowrap='nowrap' class='rdetail_desc'>&common.author;</td>
+                               <td type='opac/slot-data' query='datafield[tag=100]' class='rdetail_item'>
+                                       <script type='opac/slot-format'><![CDATA[
+                                               dojo.query('#tag100').removeClass('hide_me');
+                                               return '<span>' + BT.textContent(item) + '</span><br/>';
+                                       ]]></script>
+                               </td>
+                       </tr>
+                       <tr class='hide_me' id='tag110'>
+                               <td nowrap='nowrap' class='rdetail_desc'>&common.corporate.author;</td>
+                               <td type='opac/slot-data' query='datafield[tag=110]' class='rdetail_item'>
+                                       <script type='opac/slot-format'><![CDATA[
+                                               dojo.query('#tag110').removeClass('hide_me');
+                                               return '<span>' + BT.textContent(item) + '</span><br/>';
+                                       ]]></script>
+                               </td>
+                       </tr>
+                       <tr class='hide_me' id='tag111'>
+                               <td nowrap='nowrap' class='rdetail_desc'>&common.meeting.name;</td>
+                               <td type='opac/slot-data' query='datafield[tag=111]' class='rdetail_item'>
+                                       <script type='opac/slot-format'><![CDATA[
+                                               dojo.query('#tag111').removeClass('hide_me');
+                                               return '<span>' + BT.textContent(item) + '</span><br/>';
+                                       ]]></script>
+                               </td>
+                       </tr>
+                       <tr class='hide_me' id='tag020'>
+                               <td nowrap='nowrap' class='rdetail_desc'>&common.isbn;</td>                     
+                               <td type='opac/slot-data' query='datafield[tag=020]' class='rdetail_item'>
+                                   <script type='opac/slot-format'><![CDATA[
+                                       dojo.query('#tag020').removeClass('hide_me');
+                                       return '<span>' + BT.textContent(item) + '</span><br/>';
+                                   ]]></script>
+                               </td>
+
+                       </tr>
+                       <tr class='hide_me' id='tag022'>
+                               <td nowrap='nowrap' class='rdetail_desc' id='issn_title'>&common.issn;</td>                     
+                               <td type='opac/slot-data' query='datafield[tag=022]' class='rdetail_item' id='rdetail_issn'>
+                                   <script type='opac/slot-format'><![CDATA[
+                                       dojo.query('#tag022').removeClass('hide_me');
+                                       var issn_raw = dojo.trim(BT.textContent(item));
+
+                                       // textContent returns multiple subfields concatenated with linefeeds,
+                                       // so our regex needs to match against linefeeds. "." does not match
+                                       // linefeeds, so get \s into the mix
+                                        var issn = issn_raw.replace(/^(\s|.)*?(\d{4}).(\d{3,4}[xX]?)(\s|.)*/, "$2-$3");
+
+                                       var ses = new OpenSRF.ClientSession('open-ils.resolver');       
+                                       var req = ses.request('open-ils.resolver.resolve_holdings.raw', 'issn', issn, 'http://sfx.scholarsportal.info/windsor');        
+                                       req.oncomplete = function(r) {
+                                               var msg;
+                                               dojo.forEach(r.recv().content(), function(entry) {
+                                                       var resolverInfo = entry.public_name + "_" + entry.target_coverage;
+                                                       //uwin has a lot of duplicates for some reason
+                                                       if (url_list.indexOf(resolverInfo) == -1) {
+                                                               if (first_issn) {
+                                                                       dojo.query('#rdetail_sfx *').orphan();
+                                                                       first_issn = false;
+                                                               }
+
+                                                               dojo.place('<div style="width: 100%">'
+                                                                       + ' <a class="search_link" href="' + entry.target_url
+                                                                       + '">' + entry.public_name + '</a> - '
+                                                                       + entry.target_coverage 
+                                                                       + (entry.target_embargo ? (' / ' + entry.target_embargo) : '') 
+                                                                       + '</div>', 'rdetail_sfx');
+                                                               dojo.query('#rdetail_sfx_row').removeClass('hide_me');
+                                                               url_list += resolverInfo;
+                                                       }//if url_list
+                                               });
+                                       }
+                                       req.send();
+
+                                       return '<span>' + issn + '</span><br/>';
+                                   ]]></script>
+                               </td>
+
+                       </tr>
+
+                       <tr class='hide_me' id='tag250'>
+                               <td nowrap='nowrap' class='rdetail_desc'>&common.edition;</td>
+                               <td type='opac/slot-data' query='datafield[tag=250]' class='rdetail_item'>
+                                   <script type='opac/slot-format'><![CDATA[
+                                       dojo.query('#tag250').removeClass('hide_me');
+                                       return '<span>' + BT.textContent(item) + '</span><br/>';
+                                   ]]></script>
+                           </td>
+                       </tr>
+
+                       <tr class='hide_me'>
+                               <td nowrap='nowrap' class='rdetail_desc'>&common.pubdate;</td>          
+                               <td class='rdetail_item' id='rdetail_pubdate'> </td>
+                       </tr>
+
+                       <tr class='hide_me' id='tag260'>
+                               <td nowrap='nowrap' class='rdetail_desc'>&common.publisher;</td>                
+                               <td type='opac/slot-data' query='datafield[tag=260]' class='rdetail_item'>
+                                   <script type='opac/slot-format'><![CDATA[
+                                       dojo.query('#tag260').removeClass('hide_me');
+                                       return '<span>' + BT.textContent(item) + '</span><br/>';
+                                   ]]></script>
+                           </td> 
+                       </tr>
+
+
+                       <tr>
+                               <td nowrap='nowrap' class='rdetail_desc'>&common.physical;</td>         
+                               <td class='rdetail_item' id='rdetail_physical_desc'> </td>
+                       </tr>
+
+                       <tr>
+                               <td nowrap='nowrap' class='rdetail_desc'>&common.format;</td>                   
+                               <td class='rdetail_item'>
+                                       <img id='rdetail_tor_pic' class='tor_pic' />
+                                       <span id='rdetail_tor' style='padding-left: 5px;'> </span>
+                               </td>
+                       </tr>
+
+                       <tr class='hide_me' id='tag520'>
+                               <td nowrap='nowrap' class='rdetail_desc'>&rdetail.detailMain.abstract;</td>     
+                               <td type='opac/slot-data' query='datafield[tag=520]' class='rdetail_item'>
+                                   <script type='opac/slot-format'><![CDATA[
+                                       dojo.query('#tag520').removeClass('hide_me');
+                                       return '<span>' + BT.textContent(item) + '</span><br/>';
+                                   ]]></script>
+                               </td>
+
+                       </tr>
+
+            <!-- *** Example of how to use the openils.BibTemplate infrastructure to augment the stock
+                 *** summary screen with complex information, such as new search links on subjects. -->
+                <tr class='hide_me' id='tag600'>
+                        <td nowrap='nowrap' class='rdetail_desc'>&common.subject.600;</td>
+                        <td type='opac/slot-data' query='datafield[tag^=600]' class='rdetail_item'>
+                        <script type='opac/slot-format'><![CDATA[
+                               return subjectMe('#tag600', item);
+                       ]]></script>
+                       </td>
+               </tr>
+               <tr class='hide_me' id='tag610'>
+                        <td nowrap='nowrap' class='rdetail_desc'>&common.subject.610;</td>
+                        <td type='opac/slot-data' query='datafield[tag^=610]' class='rdetail_item'>
+                        <script type='opac/slot-format'><![CDATA[
+                               return subjectMe('#tag610', item);
+                       ]]></script>
+                       </td>
+               </tr>
+               <tr class='hide_me' id='tag611'>
+                        <td nowrap='nowrap' class='rdetail_desc'>&common.subject.611;</td>
+                        <td type='opac/slot-data' query='datafield[tag^=611]' class='rdetail_item'>
+                        <script type='opac/slot-format'><![CDATA[
+                               return subjectMe('#tag611', item);
+                       ]]></script>
+                       </td>
+               </tr>
+               <tr class='hide_me' id='tag630'>
+                        <td nowrap='nowrap' class='rdetail_desc'>&common.subject.630;</td>
+                        <td type='opac/slot-data' query='datafield[tag^=630]' class='rdetail_item'>
+                        <script type='opac/slot-format'><![CDATA[
+                               return subjectMe('#tag630', item);
+                       ]]></script>
+                       </td>
+               </tr>
+               <tr class='hide_me' id='tag648'>
+                        <td nowrap='nowrap' class='rdetail_desc'>&common.subject.648;</td>
+                        <td type='opac/slot-data' query='datafield[tag^=648]' class='rdetail_item'>
+                        <script type='opac/slot-format'><![CDATA[
+                               return subjectMe('#tag648', item);
+                       ]]></script>
+                       </td>
+               </tr>
+               <tr class='hide_me' id='tag650'>
+                        <td nowrap='nowrap' class='rdetail_desc'>&common.subjects;</td>
+                        <td type='opac/slot-data' query='datafield[tag^=650]' class='rdetail_item'>
+                        <script type='opac/slot-format'><![CDATA[
+                               return subjectMe('#tag650', item);
+                       ]]></script>
+                       </td>
+               </tr>
+               <tr class='hide_me' id='tag651'>
+                        <td nowrap='nowrap' class='rdetail_desc'>&common.subject.651;</td>
+                        <td type='opac/slot-data' query='datafield[tag^=651]' class='rdetail_item'>
+                        <script type='opac/slot-format'><![CDATA[
+                               return subjectMe('#tag651', item);
+                       ]]></script>
+                       </td>
+               </tr>
+               <tr class='hide_me' id='tag653'>
+                        <td nowrap='nowrap' class='rdetail_desc'>&common.subject.653;</td>
+                        <td type='opac/slot-data' query='datafield[tag^=653]' class='rdetail_item'>
+                        <script type='opac/slot-format'><![CDATA[
+                               return subjectMe('#tag653', item);
+                       ]]></script>
+                       </td>
+               </tr>
+               <tr class='hide_me' id='tag654'>
+                        <td nowrap='nowrap' class='rdetail_desc'>&common.subject.654;</td>
+                        <td type='opac/slot-data' query='datafield[tag^=654]' class='rdetail_item'>
+                        <script type='opac/slot-format'><![CDATA[
+                               return subjectMe('#tag654', item);
+                       ]]></script>
+                       </td>
+               </tr>
+               <tr class='hide_me' id='tag655'>
+                        <td nowrap='nowrap' class='rdetail_desc'>&common.subject.655;</td>
+                        <td type='opac/slot-data' query='datafield[tag^=655]' class='rdetail_item'>
+                        <script type='opac/slot-format'><![CDATA[
+                               return subjectMe('#tag655', item);
+                       ]]></script>
+                       </td>
+               </tr>
+               <tr class='hide_me' id='tag656'>
+                        <td nowrap='nowrap' class='rdetail_desc'>&common.subject.656;</td>
+                        <td type='opac/slot-data' query='datafield[tag^=656]' class='rdetail_item'>
+                        <script type='opac/slot-format'><![CDATA[
+                               return subjectMe('#tag656', item);
+                       ]]></script>
+                       </td>
+               </tr>
+               <tr class='hide_me' id='tag657'>
+                        <td nowrap='nowrap' class='rdetail_desc'>&common.subject.657;</td>
+                        <td type='opac/slot-data' query='datafield[tag^=657]' class='rdetail_item'>
+                        <script type='opac/slot-format'><![CDATA[
+                               return subjectMe('#tag657', item);
+                       ]]></script>
+                       </td>
+               </tr>
+               <tr class='hide_me' id='tag658'>
+                        <td nowrap='nowrap' class='rdetail_desc'>&common.subject.658;</td>
+                        <td type='opac/slot-data' query='datafield[tag^=658]' class='rdetail_item'>
+                        <script type='opac/slot-format'><![CDATA[
+                               return subjectMe('#tag658', item);
+                       ]]></script>
+                       </td>
+               </tr>
+               <tr class='hide_me' id='tag662'>
+                        <td nowrap='nowrap' class='rdetail_desc'>&common.subject.662;</td>
+                        <td type='opac/slot-data' query='datafield[tag^=662]' class='rdetail_item'>
+                        <script type='opac/slot-format'><![CDATA[
+                               return subjectMe('#tag662', item);
+                       ]]></script>
+                       </td>
+               </tr>
+
+               <tr class='hide_me' id='tag500'>
+                       <td nowrap='nowrap' class='rdetail_desc'>&common.general.note;</td>
+                       <td type='opac/slot-data' query='datafield[tag=500]' class='rdetail_item'>
+                               <script type='opac/slot-format'><![CDATA[
+                               dojo.query('#tag500').removeClass('hide_me');
+                               return '<span>' + BT.textContent(item) + '</span><br/>';
+                               ]]></script>
+                       </td>
+               </tr>
+               <tr class='hide_me' id='tag505'>
+                       <td nowrap='nowrap' class='rdetail_desc'>&common.contents.note;</td>
+                       <td type='opac/slot-data' query='datafield[tag=505]' class='rdetail_item'>
+                               <script type='opac/slot-format'><![CDATA[
+                               dojo.query('#tag505').removeClass('hide_me');
+                               return '<span>' + BT.textContent(item) + '</span><br/>';
+                               ]]></script>
+                       </td>
+               </tr>
+               <tr class='hide_me' id='tag506'>
+                       <td nowrap='nowrap' class='rdetail_desc'>&common.usage.restrictions;</td>
+                       <td type='opac/slot-data' query='datafield[tag=506] subfield[code=a]' class='rdetail_item'>
+                               <script type='opac/slot-format'><![CDATA[
+                               dojo.query('#tag506').removeClass('hide_me');
+                               return '<span>' + BT.textContent(item) + '</span> ';
+                               ]]></script>
+                       </td>
+               </tr>
+               <tr class='hide_me' id='tag511'>
+                       <td nowrap='nowrap' class='rdetail_desc'>&common.performer.note;</td>
+                       <td type='opac/slot-data' query='datafield[tag=511]' class='rdetail_item'>
+                               <script type='opac/slot-format'><![CDATA[
+                               dojo.query('#tag511').removeClass('hide_me');
+                               return '<span>' + BT.textContent(item) + '</span><br/>';
+                               ]]></script>
+                       </td>
+               </tr>
+               <tr class='hide_me' id='tag700'>
+                       <td nowrap='nowrap' class='rdetail_desc'>&common.additional.authors;</td>
+                       <td type='opac/slot-data' query='datafield[tag=700]' class='rdetail_item'>
+                               <script type='opac/slot-format'><![CDATA[
+                               dojo.query('#tag700').removeClass('hide_me');
+                               var text = '';
+                               var list = dojo.query( 'subfield:not([code=4])', item );
+                               for (var i =0; i < list.length; i++) {
+                                       text += BT.textContent(list[i]) + ' ';
+                               }
+                               return '<span>' + text + '</span><br/>';
+                               ]]></script>
+                       </td>
+               </tr>
+               <tr class='hide_me' id='tag780'>
+                       <td nowrap='nowrap' class='rdetail_desc'>&common.preceding.entry;</td>
+                       <td type='opac/slot-data' query='datafield[tag=780]' class='rdetail_item'>
+                               <script type='opac/slot-format'><![CDATA[
+                               dojo.query('#tag780').removeClass('hide_me');
+                               return '<span>' + BT.textContent(item) + '</span><br/>';
+                               ]]></script>
+                       </td>
+               </tr>
+               <tr class='hide_me' id='tag785'>
+                       <td nowrap='nowrap' class='rdetail_desc'>&common.succeeding.entry;</td>
+                       <td type='opac/slot-data' query='datafield[tag=785]' class='rdetail_item'>
+                               <script type='opac/slot-format'><![CDATA[
+                               dojo.query('#tag785').removeClass('hide_me');
+                               return '<span>' + BT.textContent(item) + '</span><br/>';
+                               ]]></script>
+                       </td>
+               </tr>
+                <tr id='rdetail_sfx_row' class="hide_me">
+                               <td nowrap='nowrap' class='rdetail_desc'>
+                               <div class='sfx_image'>
+                                <img align='left' src='../../../../images/sfxinfo.jpg' alt=''/>
+                                </div>
+                               SFX E-Journals</td>
+                        <!-- *** Example of how to use the openils.BibTemplate infrastructure to augment the stock
+                             *** summary screen with complex information, such as location-specific URIs (856$9). -->
+                        <td class='rdetail_item result_table_sfx_cell resolver_item' id='rdetail_sfx'>
+                        </td>
+                </tr>
+               <tr class='hide_me' id='rdetail_online_row'>
+                       <!-- *** Example of how to use the openils.BibTemplate infrastructure to augment the stock
+                            *** summary screen with complex information, such as location-specific URIs (856$9). -->
+                       <td nowrap='nowrap' class='rdetail_desc'>&rdetail.summary.online;</td>
+                       <td class='rdetail_item' id='rdetail_online' type='opac/slot-data' query='volumes volume uris uri'>
+                               <script type='opac/slot-format'><![CDATA[
+                                       dojo.query('*:not([type^=opac])', 'rdetail_online').orphan();
+                                       var uri = new Object;
+                                       uri.href = item.getAttribute('href');
+                                       uri.label = item.getAttribute('label');
+                                       uri.use = item.getAttribute('use_restriction');
+                                       if (uri.href == uri.label) {
+                                               if (uri.use && uri.use != uri.label) {
+                                                       uri.label = uri.use;
+                                                       uri.use = null;
+                                               }
+                                       }
+                                       var link = '<a class="search_link" href="' + uri.href + '">' + uri.label + '</a>';
+                                       if (uri.use) {
+                                               link += ' (' + uri.use + ')';
+                                       }
+                                       return '<span>' + link + '</span><br/>';
+                               ]]></script>
+                       </td>
+               </tr>
+
+               </tbody>
+       </table>
+
+       <script language='javascript' type='text/javascript'><![CDATA[
+
+               config.ids.rdetail.details_body         = 'rdetail_details_body'; 
+               config.ids.rdetail.title                                = 'rdetail_title';
+               config.ids.rdetail.author                               = 'rdetail_author';
+               config.ids.rdetail.isbn                                 = 'rdetail_isbn';
+               config.ids.rdetail.edition                              = 'rdetail_edition';
+               config.ids.rdetail.pubdate                              = 'rdetail_pubdate';
+               config.ids.rdetail.publisher                    = 'rdetail_publisher';
+               config.ids.rdetail.tor                                  = 'rdetail_tor';
+               config.ids.rdetail.abstr                                = 'rdetail_abstract';
+               config.ids.rdetail.image                                = 'rdetail_image';
+               config.ids.rdetail.tor_pic                              = 'rdetail_tor_pic';
+
+        /* Only clear the resources box once */
+        var first_issn = true;
+        var url_list = "";
+
+        function subjectMe(tag, item) {
+            dojo.query(tag).removeClass('hide_me');
+            var cgi = new CGI();
+            var other_params = [ 'd', 'l', 'r', 'av', 's', 'sd' ];
+            var total = '';
+            var output = [];
+            dojo.query( 'subfield', item ).forEach( function (onesub) {
+                var subtext = '';
+                var sub_code = onesub.getAttribute('code');
+                try {   
+                    if (dojo.isIE) {
+                        subtext = onesub.firstChild.nodeValue;
+                    } else {
+                        subtext = onesub.textContent;
+                    }
+                    if ( sub_code.match(/[a-z]/i) ) {
+                        var current = '';
+                        if ( sub_code.match(/[vxyz]/ ) ) {
+                            current += '&#x2d;&#x2d; ';
+                        }
+                        total += subtext + ' ';
+                        current += '<a class="search_link" href="rresult.xml?rt=subject&tp=subject&t=' + total.replace(/\s+$/, '');
+                        for (var p in other_params) {
+                            if (cgi.param(other_params[p])) {
+                                current += '&' + other_params[p] + '=' + cgi.param(other_params[p]);
+                            }
+                        }
+                        current += '">' + subtext + '</a>'
+                        output.push(current);
+                    }
+                } catch (e) {
+                    return;
+                }
+            });
+            return '<span>' + output.join(' ') + '</span><br/>';
+        }
+
+        dojo.addOnLoad( function () {
+            setTimeout( function () {
+                var here = findOrgUnit(getLocation());
+                if (getDepth() > 0 || getDepth === 0 ) {
+                    while (getDepth() < findOrgDepth(here))
+                        here = findOrgUnit( here.parent_ou() );
+                }
+
+                dojo.require('openils.BibTemplate');
+                new openils.BibTemplate({ record : new CGI().param('r'), org_unit : here.shortname() }).render();
+            }, 0);
+        });
+       ]]></script>
+
+</div> <!-- details_body -->
+
diff --git a/Open-ILS/web/opac/skin/uwin/xml/result/result_info.xml b/Open-ILS/web/opac/skin/uwin/xml/result/result_info.xml
new file mode 100644 (file)
index 0000000..9f102f2
--- /dev/null
@@ -0,0 +1,80 @@
+<table style='width: 100%;'>
+       <tbody>
+
+               <tr class='color_4' style='height: 1em;'>
+
+                       <td style='vertical-align: top;'  id='next_prev_links'>
+
+                               <span class='hide_me' id='result_info_div' style='font-size: 9pt;'>
+                                       <span> &common.results; </span> 
+                                       <span id='offset_start'></span>
+                                       <!-- IE runs everything together so we force a character -->
+                                       <span style='font-size: 2pt; visibility: hidden;'>-</span>
+                                       <span>-</span>
+                                       <span style='font-size: 2pt; visibility: hidden;'>-</span>
+                                       <span id='offset_end'></span>
+                                       <span style='font-size: 2pt; visibility: hidden;'>-</span>
+                                       <span>&common.ofAtLeast;</span>
+                                       <span id='result_count'> </span>
+                                       <span style='padding-left: 6px;'> (page </span>
+                                       <span id='current_page'></span>
+                                       <span style='font-size: 2pt; visibility: hidden;'>-</span>
+                                       <span>&common.of;</span>
+                                       <span style='font-size: 2pt; visibility: hidden;'>-</span>
+                                       <span id='num_pages'> </span>
+                               </span>
+
+                               <span id='start_end_links_span' class='hide_me' 
+                                               style='padding-left: 40px;' >
+                                       <a class='search_link' id='search_home_link' 
+                                               title="&rdetail.page.results;" style='padding-left: 1em;'>&rdetail.start;</a><a class='search_link' 
+                                                       id='prev_link' title='&rdetail.page.previous;' style='padding-left: 1em;'>&common.cn.previous;</a>
+
+                                       <span class='search_page_nav_link' id='page_numbers'> </span>
+
+                                       <a  class='search_link' id='next_link' 
+                                               title='&rdetail.page.next;' style='padding-left: 1em;'>&common.cn.next;</a>
+                        <!--
+                        <a class='search_page_nav_link' 
+                                                       id='end_link' title="&rdetail.page.last;">&rdetail.end;</a>
+                            -->
+                               </span>
+
+                       </td>
+
+                       <td  colspan='5' 
+                               style='padding-bottom: 4px; text-align:center; vertical-align: top; border-bottom: 1px solid #E0E0E0;'>
+                                       <span id='search_info_table' class='hide_me' style='font-size: 8pt;'>
+                                               <b>&result.info.copies; </b>
+                                       </span>
+                       </td>
+               </tr>
+
+               <tr style='height: 2em;' id='result_thead_row'>
+                       <td> 
+                               <div class='hide_me' id='no_formats' style='padding: 4px;'>
+                                       <b>
+                                               <span style='color:red;'>*</span>
+                                               &result.info.no.items;
+                                               <div>&result.info.format.items;</div>
+                                       </b>
+                               </div>
+
+                               <div class='hide_me' id='rresult_show_all' style='padding: 4px;'>
+                                       <a href='javascript:rresultExpandSearch();' id='rresult_show_all_link' 
+                                               class='classic_link'>&result.info.show; </a>
+                               </div>
+
+                               <div class='hide_me' id='rresult_show_here' style='padding: 4px;'>
+                                       <a href='javascript:rresultContractSearch();' id='rresult_show_here_link' 
+                                               class='classic_link'>&result.info.show; </a>
+                               </div>
+
+                       </td>
+                       <td rowspan='2' style='font-size: 8pt; padding-top: 4px;' class='copy_count_cell' 
+                               width='12%' align='center' name='result_thead_ccell'> </td>
+               </tr>
+
+       </tbody>
+</table>
+
diff --git a/Open-ILS/web/opac/skin/uwin/xml/result/result_table.xml b/Open-ILS/web/opac/skin/uwin/xml/result/result_table.xml
new file mode 100644 (file)
index 0000000..b400b2b
--- /dev/null
@@ -0,0 +1,431 @@
+<!-- Search results are spit into this table -->
+
+<div id='result_table_div' xmlns:xi="http://www.w3.org/2001/XInclude">
+
+    <table id='res_table'> 
+
+        <!-- for some reason, this is the only way i can force the cell widths -->
+        <thead id='result_thead'>
+            <tr>
+                <td class='result_table_pic_header'></td>
+                <td> </td>
+            </tr>
+        </thead>
+
+        <tbody id='result_table'>
+            <tr>
+
+                <td class='result_table_row'>
+                    <!--#include virtual="result_info.xml"-->
+                </td>
+            </tr>
+
+            <!-- Template for displaying a search result.  This row template is cloned and inserted
+                    for each result returned -->
+
+            <tr id='result_table_template' class='hide_me'>
+
+                <!-- Jacket image goes here -->
+
+                <td class='result_table_row' align='left'>
+                    <table class='result_table_subtable'>
+                                               <tbody align='left' class='result_table_subtbody'>
+
+                            <tr style='height: 1em' name='counts_row'>
+
+                                <td  rowspan='6' class='result_table_pic_header'>
+                                    <a><img name='item_jacket' class='result_table_pic'/></a>
+                                </td>
+
+                                                               <td align='left' class='result_table_title_cell' name='result_table_title_cell'>
+                                    <!-- Title goes here -->
+                                    <a title="&result.table.keyword;" name='item_title' class='search_link'> 
+                                        <!-- Title goes here -->
+                                    </a>
+                                </td>
+
+                                <!-- Copy this td for each copy count appended -->
+                                <td  rowspan='5' nowrap='nowrap' name="copy_count_cell" class='copy_count_cell'> 
+                                </td>
+
+                            </tr>
+        
+                            <tr style='height: 1em' >
+                                <td class='result_table_author_cell'>
+                                    <a title="&result.table.author;" name='item_author' class='search_link'> 
+                                        <!-- Author goes here -->
+                                    </a>
+                                    <div>
+                                    <span name='result_table_extra_span' class='hide_me'>
+                                        <span name='result_table_pub_box' style='padding-left: 10px;'> 
+                                            <span name='result_table_edition_span' style='padding-left: 10px;'></span> |
+                                            <span name='result_table_pub_span'> </span> |
+                                            <span name='result_table_phys_span'> </span>
+                                        </span>
+                                    </span>
+                                    </div>
+                                </td>
+                            </tr>
+
+
+                            <!--
+                                there is probably a more elegant way to achieve this but what
+                                happens here is that the record id is used to place resolver
+                                info in the correct place in the results list - the id is
+                                placed here from the js layer
+                            -->
+                            <tr id='result_table_recid' class='result_table_title_cell hide_me'>
+                                <td class='sfx_display'> 
+                                    <span class='sfx_image'>
+                                    <img src='../../../../images/sfxinfo.jpg' alt=''/>
+                                    <i>SFX E-Journals</i>
+                                    </span>
+                                    <span id='result_table_recid_span' name='result_table_recid_span' class='recid'>
+                                        <span name='recid_holder' class='hide_me'></span>
+                                    </span>
+                                </td>
+                                <td class='sfx_right'></td>
+                            </tr>
+
+                            <tr name="local_callnumber_list" class="result_table_title_cell">
+                                <td>
+                                <!--
+                                    this is very close to the layout in rdetail, we need to find the
+                                    record id in order to place the resolver info in the right spot
+                                -->
+                                <span type='opac/slot-data' query='record' class='hide_me'>
+                                <span class='hide_me' debug='true' type='opac/slot-format'><![CDATA[
+                                    var this_title_id;
+                                
+                                    dojo.query('datafield[tag="901"] subfield[code="c"]', item).forEach(function (item) {
+                                        this_title_id = dojo.trim(BT.textContent(item));
+                                    });
+
+                                    dojo.query('datafield[tag="022"] subfield', item).forEach(function(item) {
+                                        var issn = '';
+                                        issn = BT.textContent(item) + '';
+                                        issn = issn.replace(/^(\s|.)*?(\d{4}).(\d{3,4}[xX]?)(\s|.)*/, "$2-$3");
+                                        if (issn.length > 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/windsor');
+                                                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);}
+                                        }
+                                    });
+                                ]]></span>
+                                </span>
+
+                                <!-- Prevent records with dozens of items attached from filling the screen -->
+                                <span type='opac/slot-data+marcxml-full' query='volumes'>
+                                <span class='hide_me' debug='true' type='opac/slot-format'><![CDATA[
+                                    var output = dojo.create('span'); 
+
+                                    var item_cnt = 0;
+                                    var max_items = 4;
+
+
+                                    dojo.query('volume', item).forEach(function(vol) {
+                                        if (item_cnt >= max_items) {
+                                            return output.innerHTML;
+                                        }
+                                        dojo.query('copy', vol).forEach(function (cp) {
+                                            if (cp.getAttribute('deleted') == 't') {
+                                                return;
+                                            }
+                                                                                       if (cp.getAttribute('opac_visible') == 'f') {
+                                                                                               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 == 80) {
+                                                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;
+                                ]]></span>
+                                </span>
+
+                                <!-- Be lenient in what we accept; disabled until we figure out how to prevent both URIs and SFX -->
+                                <span type='opac/slot-data+marcxml-uris' query='record'>
+                                    <span class='hide_me' type='opac/slot-format'><![CDATA[
+                                        var found_issn = false;
+                                        dojo.query('datafield[tag="022"]', item).forEach(function(issn) {
+                                            found_issn = true;
+                                        });
+                                        if (found_issn) { return; }
+
+                                        var this_title_id;
+                                    
+                                        dojo.query('datafield[tag="901"] subfield[code="c"]', item).forEach(function (item) {
+                                            this_title_id = dojo.trim(BT.textContent(item));
+                                        });
+
+                                        var output = dojo.create('span'); 
+                                        dojo.query('volumes volume uris uri', item).forEach(function(xitem) {
+                                            if (resolved[this_title_id]) { return; }
+                                            var uri = new Object;
+                                            uri.href = xitem.getAttribute('href');
+                                            uri.label = xitem.getAttribute('label');
+                                            uri.use = xitem.getAttribute('use_restriction');
+                                            if (uri.href == uri.label) {
+                                                if (uri.use && uri.use != uri.label) {
+                                                    uri.label = uri.use;
+                                                    uri.use = null;
+                                                }
+                                            }
+                                            var link = dojo.create('a', {"class":"search_link", "href": uri.href});
+                                            var link_text = dojo.doc.createTextNode(uri.label);
+                                            link.appendChild(link_text);
+                                            output.appendChild(link);
+                            
+                                            if (uri.use) {
+                                                var use_text = dojo.doc.createTextNode(' (' + uri.use + ')');
+                                                output.appendChild(use_text);
+                                            }
+                                            dojo.create('br', null, output);
+                                        });
+                                        return output.innerHTML;
+                                    ]]></span>
+                                </span>
+                                </td>
+                            </tr>
+
+                            <tr style='height:1em;' >
+                                <td name='result_table_format_cell' class='result_table_format_cell'>
+
+                                    <a name='text_link' class='search_link'> 
+                                        <img src='../../../../images/tor/text.jpg' class='dim tor_pic' />
+                                    </a>
+
+                                    <a name='sound recording-nonmusical_link' class='search_link'> 
+                                        <img src='../../../../images/tor/sound recording-nonmusical.jpg' class='dim tor_pic' />
+                                    </a>
+
+                                    <a name='moving image_link' class='search_link'> 
+                                        <img src='../../../../images/tor/moving image.jpg' class='dim tor_pic' />
+                                    </a>
+
+                                    <a name='software, multimedia_link' class='search_link'> 
+                                        <img src='../../../../images/tor/software, multimedia.jpg' class='dim tor_pic' />
+                                    </a>
+
+                                    <a name='sound recording-musical_link' class='search_link'> 
+                                        <img src='../../../../images/tor/sound recording-musical.jpg' class='dim tor_pic' />
+                                    </a>
+
+                                    <a name='cartographic_link' class='search_link'> 
+                                        <img src='../../../../images/tor/cartographic.jpg' class='dim tor_pic' />
+                                    </a>
+
+                                    <a name='mixed material_link' class='search_link'> 
+                                        <img src='../../../../images/tor/mixed material.jpg' class='dim tor_pic' />
+                                    </a>
+
+                                    <a name='notated music_link' class='search_link'> 
+                                        <img src='../../../../images/tor/notated music.jpg' class='dim tor_pic' />
+                                    </a>
+
+                                    <a name='sound recording_link' class='search_link'> 
+                                        <img src='../../../../images/tor/sound recording.jpg' class='dim tor_pic' />
+                                    </a>
+
+                                    <a name='still image_link' class='search_link'> 
+                                        <img src='../../../../images/tor/still images.jpg' class='dim tor_pic' />
+                                    </a>
+
+                                    <a name='three dimensional object_link' class='search_link'> 
+                                        <img src='../../../../images/tor/three dimensional object.jpg' class='dim tor_pic' />
+                                    </a>
+
+                                    <span class='hide_me' 
+                                        style='color: #9999FF; padding-left: 10px; font-size: 7pt; font-weight: 300;'> 
+                                        <span>&common.relevancy; </span><span name='relevancy_span'> </span>
+                                    </span>
+
+                                    <span class='hide_me' name='place_hold_span'>
+                                        <a style='padding-left: 8px;' href='javascript:void(0);' 
+                                            class='classic_link' name='place_hold_link'>&opac.holds.placeHold;</a>
+                                    </span>
+
+                                    <!-- Empty span used for creating unAPI links -->
+                                    <abbr style='padding-left: 8px;' name="unapi" class="unapi-id">
+                                        <!-- unAPI URI goes here -->
+                                    </abbr>
+
+                                    <!-- Empty span used for creating Google Book Search-->
+                                    <span name="googleBooksLink" class="hide_me">
+                                        <a style='padding-left: 8px;' class='classic_link' name="googleBooks-link">&result.googleBooks.browse;</a>
+                                    </span>
+
+
+                                </td>
+                            </tr>
+
+                        </tbody>
+                    </table>
+                </td>
+            </tr>
+        </tbody>
+    </table>
+
+
+   <!-- ====================== -->
+   <table style='width: 100%; margin-top: 12px;' id='result_info_2' class='hide_me'>
+      <tbody>
+               
+          <tr class='color_4' style='height: 1em;'>
+                     
+             <td style='vertical-align: top;'  id='next_prev_links2'>
+                        
+                <span class='hide_me' id='result_info_div2' style='font-size: 9pt;'>
+                   <span> &common.results; </span> 
+                   <b id='offset_start2'> </b>
+                               <!-- IE runs everything together so we force a character -->
+                               <span style='font-size: 2pt; visibility: hidden;'>-</span>
+                   <span> - </span>
+                               <span style='font-size: 2pt; visibility: hidden;'>-</span>
+                   <b id='offset_end2'> </b>
+                               <span style='font-size: 2pt; visibility: hidden;'>-</span>
+                   <span> &common.ofAtLeast; </span>
+                   <b id='result_count2'> </b>
+                   <span style='padding-left: 6px;'> (page </span>
+                   <span id='current_page2'> </span>
+                               <span style='font-size: 2pt; visibility: hidden;'>-</span>
+                   <span> &common.of; </span>
+                               <span style='font-size: 2pt; visibility: hidden;'>-</span>
+                   <span id='num_pages2'> </span>
+                </span>
+                           
+                <span id='start_end_links_span2' class='hide_me' 
+                   style='padding-left: 40px;' >
+                <a class='search_page_nav_link' id='search_home_link2' 
+                   title="&rdetail.page.results;" style='padding-left: 1em;'>&rdetail.start;</a><a class='search_page_nav_link' 
+                   id='prev_link2' title='&rdetail.page.previous;' style='padding-left: 1em;'>&rdetail.page.previous.symbol;</a>
+            
+                <span class='search_page_nav_link' id='page_numbers2'> </span>
+                   <a  class='search_page_nav_link' id='next_link2' 
+                      title='&rdetail.page.next;' style='padding-left: 1em;'>&rdetail.page.next.symbol;</a>
+                      <!--
+                      <a class='search_page_nav_link' 
+                      id='end_link2' title="&rdetail.page.last;">&rdetail.end;</a>
+                      -->
+                </span>
+                        
+             </td>
+                        
+             <td  colspan='5' 
+                style='padding-bottom: 4px; text-align:center; vertical-align: top; border-bottom: 1px solid #E0E0E0;'>
+               <!--
+                <span id='search_info_table2' style='font-size: 8pt;'>
+                <b>Available copies / Total copies </b>
+                </span>
+               -->
+             </td>
+          </tr>
+      </tbody>
+   </table>
+   <!-- ====================== -->
+
+
+    <script language='javascript' type='text/javascript'>
+        config.names.result.format_cell = 'result_table_format_cell';
+        config.names.result.format_link = 'resource_link'
+        config.names.result.format_pic = 'format_pic'
+        var url_list = "";
+        var title_list = "";
+        var curr_title_id = "";
+        var resolved = {};
+    </script>
+
+    <!-- ChiliFresh setup -->
+    <script language='javascript' type='text/javascript'>
+        var chilifresh = '<!--#echo var="OILS_CHILIFRESH_ACCOUNT"-->';
+        if (chilifresh=='(none)') { chilifresh = false; }
+    </script>
+    <!--if expr="${OILS_CHILIFRESH_ACCOUNT} && ${OILS_CHILIFRESH_ACCOUNT}!='(none)'"-->
+        <input type="hidden" id="chilifresh_account" name="chilifresh_account"
+            value="<!--#echo var='OILS_CHILIFRESH_ACCOUNT'-->" />
+        <input type="hidden" id="chilifresh_profile" name="chilifresh_profile"
+            value="<!--#echo var='OILS_CHILIFRESH_PROFILE'-->" />
+        <input type="hidden" id="chilifresh_version" name="chilifresh_version" value="onsite_v1" />
+        <input type="hidden" id="chilifresh_type" name="chilifresh_type" value="search" />
+        <script language="javascript" type="text/javascript" src="<!--#echo var='OILS_CHILIFRESH_URL'-->"></script>
+    <!--endif-->
+
+</div>
+
diff --git a/Open-ILS/web/opac/theme/algoma/css/colors.css b/Open-ILS/web/opac/theme/algoma/css/colors.css
new file mode 100644 (file)
index 0000000..de0799a
--- /dev/null
@@ -0,0 +1,139 @@
+body a                 { color: black; text-decoration: none;}
+body a:visited { color: black; text-decoration: none;}
+body a:hover   { color: red; text-decoration: underline;}
+
+
+/* the idea is to have 4 complimentary colors that 
+ * are used throughout the opac.  Edit those colors
+ * in this file
+ */
+.color_1 { background: #C94842; color: #000000; }
+.color_2 { background: #8F1F2D; color: #000000; }
+.color_3 { background: #D9D9D9; color: #000000; }
+.color_4 { background: #E9E9E9; color: #000000; }
+
+.border_1 { border: 1px solid #C94842; }
+.border_2 { border: 1px solid #8F1F2D; }
+.border_3 { border: 1px solid #D9D9D9; }
+.border_4 { border: 1px solid #E9E9E9; }
+
+.border_1_2 { border: 2px solid #C94842; }
+.border_2_2 { border: 2px solid #8F1F2D; }
+.border_3_2 { border: 2px solid #D9D9D9; }
+.border_4_2 { border: 2px solid #E9E9E9; }
+
+.border_1_3 { border: 3px solid #C94842; }
+.border_2_3 { border: 3px solid #8F1F2D; }
+.border_3_3 { border: 3px solid #D9D9D9; }
+.border_4_3 { border: 3px solid #E9E9E9; }
+
+/* some facet styling */
+.facetClassContainer { margin: 2px; border: 1px solid #C94842; }
+.facetClassLabelContainer { background: #C94842; border: 1px solid #C94842; }
+.facetClassLabel { font-weight: bold; text-align: center; }
+.facetFieldContainer { background: #E9E9E9; }
+.facetFieldLabel { padding-left: 2px; margin-top: 5px; margin-bottom: 5px; font-weight: bold; text-align: left; }
+.extraFacetFieldsWrapper { }
+.toggleExtraFacetFieldsButton { float: right; margin: 0px; padding: 0px; }
+.facetFieldLineCount { display: inline-block; border-right: 1px solid #C94842; color: gray; width: 3em; margin-right: 3px }
+.facetField { border-top: 1px solid #C94842; }
+.facetFields { padding-left: 5px; }
+.facetFieldLineValue { overflow: hidden; text-overflow: ellipsis; }
+
+.searcherSimpleSearchWrapper {} 
+.searcherAdvancedSearchWrapper { margin: 2px; border: 1px solid #C94842; } 
+
+.searcherClassedSearchesContainer { margin: 5px; } 
+.searcherClassedSearches {} 
+.searcherClassedSearchesLabel { font-weight: bold; } 
+
+.searcherClassedSearchesAddContainer { width: 50%; text-align: center; }
+
+.searcherFacetedSearchesContainer { margin: 5px; border-top: 1px solid black; } 
+.searcherFacetedSearches {} 
+.searcherFacetedSearchesLabel { font-weight: bold; } 
+
+.searcherFilterModifierContainer { margin: 5px; border-top: 1px solid black; } 
+
+.searcherFiltersLabel { font-weight: bold; } 
+.searcherFilterContainer {} 
+
+.searcherModifiersLabel { font-weight: bold; } 
+.searcherModifierContainer {} 
+
+.searcherGoContainer { width: 50%; text-align: right; }
+.searcherDeckSwapContainer {}
+
+
+
+
+
+/* general purpose light borders */
+.border_5 { border: 1px solid #D0D0D0; }
+.border_6 { border: 1px solid #808080; }
+
+input:focus { background: #E9E9E9; color: #000000;}
+a:focus { background: #E9E9E9; color: #000000;}
+
+
+/* ---------------------------------------------------------------------- */
+
+.canvas { /* main content div for each page */
+    border-left: 3px solid #C94842;
+    border-bottom: 3px solid #C94842;
+       border-top: 3px solid #C94842;
+}
+
+/* border around home search box */
+.home_search { border: 3px solid #C94842; }
+
+/* main nav sidebar */
+.sidebar_item_active { background: #C94842; }
+
+/* record detail summary block */
+.rdetail_desc { border: 1px solid #C94842; }
+.rdetail_item { border: 1px solid #C94842; }
+.rdetail_extras_selected { background: #E9E9E9;} 
+
+
+.data_grid thead tr { background: #E9E9E9; color: #000000; }
+.data_grid thead td { border: 1px solid #808080; }
+.data_grid tbody td { border: 1px solid #D9D9D9; }
+.data_grid_nb thead tr { background: #E9E9E9; color: #000000; }
+.data_grid_nb thead td { border: none; }
+.data_grid_nb tbody td { border: none; }
+
+.light_border { border: 1px solid #D9D9D9; }
+
+.adv_quick_search_submit { border-bottom: 3px solid #D9D9D9;}
+
+.myopac_link_active { background: #D9D9D9; }
+
+.sidebar_extra_link { text-decoration: none; }
+#searchbar_tag_on { color: red; }
+.searchbar_item { color: black; } 
+#login_box { border-top: 1px solid #808080; border-bottom: 1px solid #808080; }
+#next_prev_links_dead { color: #808080; text-decoration: none; }
+
+.nav_link_active {font-weight: bold;}
+
+.search_link { text-decoration: none; }
+.result_table_subtable { border-top: 1px solid #E0E0E0; }
+
+.copy_count_cell { border-right: 1px solid #E0E0E0; } 
+.copy_count_div {      border-left: 2px solid #D9D9D9; border-right: 2px solid #D9D9D9; }
+
+#rdetail_image_cell { border: 1px solid white; border-right: 1px solid #C94842;}
+
+
+
+.x_mark { color: red; }
+.check_mark { color: green; }
+
+#myopac_holds_thaw_date_form { border: 1px solid #E0E0E0; } 
+
+.invalid_field { border: 3px solid red; }
+
+.hold_expire_warning { color:red; }
+
diff --git a/Open-ILS/web/opac/theme/hrsrh/css/colors.css b/Open-ILS/web/opac/theme/hrsrh/css/colors.css
new file mode 100644 (file)
index 0000000..577097c
--- /dev/null
@@ -0,0 +1,140 @@
+body a                 { color: black; text-decoration: none;}
+body a:visited { color: black; text-decoration: none;}
+body a.search_link:visited { color: #003399; text-decoration: none; font-weight: bold; }
+body a:hover   { color: red; text-decoration: underline;}
+/*
+.NoveListSelect a                      { color: blue; text-decoration: underline;}
+.NoveListSelect a:visited      { color: purple; text-decoration: underline;}
+*/
+
+
+/* the idea is to have 4 complimentary colors that 
+ * are used throughout the opac.  Edit those colors
+ * in this file
+ */
+.color_1 { background: #E0E0F0; color: #000000; }
+.color_2 { background: #FFC211; color: #000000; }
+.color_3 { background: #E0E0F0; color: #000000; }
+.color_4 { background: #E0E0F0; color: #000000; }
+
+.border_1 { border: 1px solid #00AAAA; }
+.border_2 { border: 1px solid #FFC211; }
+.border_3 { border: 1px solid #00CCCC; }
+.border_4 { border: 1px solid #E0E0F0; }
+
+.border_1_2 { border: 2px solid #00AAAA; }
+.border_2_2 { border: 2px solid #FFC211; }
+.border_3_2 { border: 2px solid #00CCCC; }
+.border_4_2 { border: 2px solid #E0E0F0; }
+
+.border_1_3 { border: 3px solid #00AAAA; }
+.border_2_3 { border: 3px solid #FFC211; }
+.border_3_3 { border: 3px solid #00CCCC; }
+.border_4_3 { border: 3px solid #E0E0F0; }
+
+/* some facet styling */
+.facetClassContainer { margin: 2px; border: 1px solid #E0E0F0; }
+.facetClassLabelContainer { background: #E0E0F0; border: 1px solid #FFC211; }
+.facetClassLabel { font-weight: bold; text-align: center; }
+.facetFieldContainer { background: #E0E0F0; }
+.facetFieldLabel { padding-left: 2px; margin-top: 5px; margin-bottom: 5px; font-weight: bold; text-align: left; }
+.extraFacetFieldsWrapper { }
+.toggleExtraFacetFieldsButton { float: right; margin: 0px; padding: 0px; }
+.facetFieldLineCount { display: inline-block; border-right: 1px solid #FFC211; color: gray; width: 3em; margin-right: 3px }
+.facetField { border-top: 1px solid #FFC211; }
+.facetFields { padding-left: 5px; }
+.facetFieldLineValue { overflow: hidden; text-overflow: ellipsis; }
+
+.searcherSimpleSearchWrapper {} 
+.searcherAdvancedSearchWrapper { margin: 2px; border: 1px solid #FFC211; } 
+
+.searcherClassedSearchesContainer { margin: 5px; } 
+.searcherClassedSearches {} 
+.searcherClassedSearchesLabel { font-weight: bold; } 
+
+.searcherClassedSearchesAddContainer { width: 50%; text-align: center; }
+
+.searcherFacetedSearchesContainer { margin: 5px; border-top: 1px solid black; } 
+.searcherFacetedSearches {} 
+.searcherFacetedSearchesLabel { font-weight: bold; } 
+
+.searcherFilterModifierContainer { margin: 5px; border-top: 1px solid black; } 
+
+.searcherFiltersLabel { font-weight: bold; } 
+.searcherFilterContainer {} 
+
+.searcherModifiersLabel { font-weight: bold; } 
+.searcherModifierContainer {} 
+
+.searcherGoContainer { width: 50%; text-align: right; }
+.searcherDeckSwapContainer {}
+
+/* general purpose light borders */
+.border_5 { border: 1px solid #D0D0D0; }
+.border_6 { border: 1px solid #808080; }
+
+input:focus { background: #FFFFFF; color: #000000;}
+a:focus { background: #E0E0F0; color: #000000;}
+
+
+/* ---------------------------------------------------------------------- */
+
+.canvas { /* main content div for each page */
+    border-left: 3px solid #00AAAA;
+    border-bottom: 3px solid #00AAAA;
+       border-top: 3px solid #00AAAA;
+}
+
+/* border around home search box */
+.home_search { border: 3px solid #00AAAA; }
+
+/* main nav sidebar */
+.sidebar_item_active { background: #E0E0F0; }
+
+/* record detail summary block */
+.rdetail_desc { border: 1px solid #00AAAA; }
+.rdetail_item { border: 1px solid #00AAAA; }
+.rdetail_extras_selected { background: #E0E0F0;} 
+
+
+.data_grid thead tr { background: #E0E0F0; color: #000000; }
+.data_grid thead td { border: 1px solid #808080; }
+.data_grid tbody td { border: 1px solid #00CCCC; }
+.data_grid_nb thead tr { background: #E0E0F0; color: #000000; }
+.data_grid_nb thead td { border: none; }
+.data_grid_nb tbody td { border: none; }
+
+.light_border { border: 1px solid #00CCCC; }
+
+.adv_quick_search_submit { border-bottom: 3px solid #00CCCC;}
+
+.myopac_link_active { background: #00CCCC; }
+
+.sidebar_extra_link { text-decoration: none; }
+#searchbar_tag_on { color: red; }
+.searchbar_item { color: black; } 
+#login_box { border-top: 1px solid #808080; border-bottom: 1px solid #808080; }
+#next_prev_links_dead { color: #808080; text-decoration: none; }
+
+.nav_link_active {font-weight: bold;}
+
+.search_link { color: #003399; text-decoration: none; font-weight: bold; }
+.result_table_subtable { border-top: 1px solid #E0E0F0; }
+
+.copy_count_cell { border-right: 1px solid #E0E0F0; } 
+.copy_count_div {      border-left: 2px solid #00CCCC; border-right: 2px solid #00CCCC; }
+
+#rdetail_image_cell { border: 1px solid white; border-right: 1px solid #00AAAA;}
+
+
+
+.x_mark { color: red; }
+.check_mark { color: green; }
+
+#myopac_holds_thaw_date_form { border: 1px solid #E0E0F0; } 
+
+.invalid_field { border: 3px solid red; }
+
+.hold_expire_warning { color:red; }
+
diff --git a/Open-ILS/web/opac/theme/lul/css/colors.css b/Open-ILS/web/opac/theme/lul/css/colors.css
new file mode 100644 (file)
index 0000000..bddfcb0
--- /dev/null
@@ -0,0 +1,142 @@
+body a                 { color: black; text-decoration: none;}
+body a:visited { color: black; text-decoration: none;}
+body a.search_link:visited { color: #003399; text-decoration: none; font-weight: bold; }
+body a:hover   { color: red; text-decoration: underline;}
+/*
+.NoveListSelect a                      { color: blue; text-decoration: underline;}
+.NoveListSelect a:visited      { color: purple; text-decoration: underline;}
+*/
+
+/* the idea is to have 4 complimentary colors that 
+ * are used throughout the opac.  Edit those colors
+ * in this file
+ */
+.color_1 { background: #9DA7EA; color: #000000; }
+.color_2 { background: #FFC211; color: #000000; }
+.color_3 { background: #D8DCF7; color: #000000; }
+.color_4 { background: #E0E0F0; color: #000000; }
+
+.border_1 { border: 1px solid #9DA7EA; }
+.border_2 { border: 1px solid #FFC211; }
+.border_3 { border: 1px solid #D8DCF7; }
+.border_4 { border: 1px solid #E0E0F0; }
+
+.border_1_2 { border: 2px solid #9DA7EA; }
+.border_2_2 { border: 2px solid #FFC211; }
+.border_3_2 { border: 2px solid #D8DCF7; }
+.border_4_2 { border: 2px solid #E0E0F0; }
+
+.border_1_3 { border: 3px solid #9DA7EA; }
+.border_2_3 { border: 3px solid #FFC211; }
+.border_3_3 { border: 3px solid #D8DCF7; }
+.border_4_3 { border: 3px solid #E0E0F0; }
+
+
+/* some facet styling */
+.facetClassContainer { margin: 2px; border: 1px solid #9DA7EA; }
+.facetClassLabelContainer { background: #9DA7EA; border: 1px solid #9DA7EA; }
+.facetClassLabel { font-weight: bold; text-align: center; }
+.facetFieldContainer { background: #E0E0F0; }
+.facetFieldLabel { padding-left: 2px; margin-top: 5px; margin-bottom: 5px; font-weight: bold; text-align: left; }
+.extraFacetFieldsWrapper { }
+.toggleExtraFacetFieldsButton { float: right; margin: 0px; padding: 0px; }
+.facetFieldLineCount { display: inline-block; border-right: 1px solid #9DA7EA; color: gray; width: 3em; margin-right: 3px }
+.facetField { border-top: 1px solid #9DA7EA; }
+.facetFields { padding-left: 5px; }
+.facetFieldLineValue { overflow: hidden; text-overflow: ellipsis; }
+
+.searcherSimpleSearchWrapper {} 
+.searcherAdvancedSearchWrapper { margin: 2px; border: 1px solid #9DA7EA; } 
+
+.searcherClassedSearchesContainer { margin: 5px; } 
+.searcherClassedSearches {} 
+.searcherClassedSearchesLabel { font-weight: bold; } 
+
+.searcherClassedSearchesAddContainer { width: 50%; text-align: center; }
+
+.searcherFacetedSearchesContainer { margin: 5px; border-top: 1px solid black; } 
+.searcherFacetedSearches {} 
+.searcherFacetedSearchesLabel { font-weight: bold; } 
+
+.searcherFilterModifierContainer { margin: 5px; border-top: 1px solid black; } 
+
+.searcherFiltersLabel { font-weight: bold; } 
+.searcherFilterContainer {} 
+
+.searcherModifiersLabel { font-weight: bold; } 
+.searcherModifierContainer {} 
+
+.searcherGoContainer { width: 50%; text-align: right; }
+.searcherDeckSwapContainer {}
+
+
+/* general purpose light borders */
+.border_5 { border: 1px solid #D0D0D0; }
+.border_6 { border: 1px solid #808080; }
+
+input:focus { background: #E0E0F0; color: #000000;}
+a:focus { background: #E0E0F0; color: #000000;}
+
+
+/* ---------------------------------------------------------------------- */
+
+.canvas { /* main content div for each page */
+    border-left: 3px solid #9DA7EA;
+    border-bottom: 3px solid #9DA7EA;
+       border-top: 3px solid #9DA7EA;
+}
+
+/* border around home search box */
+.home_search { border: 3px solid #9DA7EA; }
+
+/* main nav sidebar */
+.sidebar_item_active { background: #9DA7EA; }
+
+/* record detail summary block */
+.rdetail_desc { border: 1px solid #9DA7EA; }
+.rdetail_item { border: 1px solid #9DA7EA; }
+.rdetail_extras_selected { background: #E0E0F0;} 
+
+
+.data_grid thead tr { background: #E0E0F0; color: #000000; }
+.data_grid thead td { border: 1px solid #808080; }
+.data_grid tbody td { border: 1px solid #D8DCF7; }
+.data_grid_nb thead tr { background: #E0E0F0; color: #000000; }
+.data_grid_nb thead td { border: none; }
+.data_grid_nb tbody td { border: none; }
+
+.light_border { border: 1px solid #D8DCF7; }
+
+.adv_quick_search_submit { border-bottom: 3px solid #D8DCF7;}
+
+.myopac_link_active { background: #D8DCF7; }
+
+.sidebar_extra_link { text-decoration: none; }
+#searchbar_tag_on { color: red; }
+.searchbar_item { color: black; } 
+#login_box { border-top: 1px solid #808080; border-bottom: 1px solid #808080; }
+#next_prev_links_dead { color: #808080; text-decoration: none; }
+
+.nav_link_active {font-weight: bold;}
+
+.search_link { color: #003399; text-decoration: none; font-weight: bold; }
+.result_table_subtable { border-top: 1px solid #E0E0F0; }
+
+.copy_count_cell { border-right: 1px solid #E0E0F0; } 
+.copy_count_div {      border-left: 2px solid #D8DCF7; border-right: 2px solid #D8DCF7; }
+
+#rdetail_image_cell { border: 1px solid white; border-right: 1px solid #9DA7EA;}
+
+
+
+.x_mark { color: red; }
+.check_mark { color: green; }
+
+#myopac_holds_thaw_date_form { border: 1px solid #E0E0F0; } 
+
+.invalid_field { border: 3px solid red; }
+
+.hold_expire_warning { color:red; }
+
+#result_low_hits { border-top: 2px solid #A7EA9D }
diff --git a/Open-ILS/web/opac/theme/nosm/css/colors.css b/Open-ILS/web/opac/theme/nosm/css/colors.css
new file mode 100644 (file)
index 0000000..ea17d13
--- /dev/null
@@ -0,0 +1,141 @@
+body a                 { color: black; text-decoration: none;}
+body a:visited { color: black; text-decoration: none;}
+body a:hover   { color: red; text-decoration: underline;}
+/*
+.NoveListSelect a                      { color: blue; text-decoration: underline;}
+.NoveListSelect a:visited      { color: purple; text-decoration: underline;}
+*/
+
+/* the idea is to have 4 complimentary colors that 
+ * are used throughout the opac.  Edit those colors
+ * in this file
+ */
+.color_1 { background: #9DA7EA; color: #000000; }
+.color_2 { background: #FFC211; color: #000000; }
+.color_3 { background: #D8DCF7; color: #000000; }
+.color_4 { background: #E0E0F0; color: #000000; }
+
+.border_1 { border: 1px solid #9DA7EA; }
+.border_2 { border: 1px solid #FFC211; }
+.border_3 { border: 1px solid #D8DCF7; }
+.border_4 { border: 1px solid #E0E0F0; }
+
+.border_1_2 { border: 2px solid #9DA7EA; }
+.border_2_2 { border: 2px solid #FFC211; }
+.border_3_2 { border: 2px solid #D8DCF7; }
+.border_4_2 { border: 2px solid #E0E0F0; }
+
+.border_1_3 { border: 3px solid #9DA7EA; }
+.border_2_3 { border: 3px solid #FFC211; }
+.border_3_3 { border: 3px solid #D8DCF7; }
+.border_4_3 { border: 3px solid #E0E0F0; }
+
+/* some facet styling */
+.facetClassContainer { margin: 2px; border: 1px solid #9DA7EA; }
+.facetClassLabelContainer { background: #9DA7EA; border: 1px solid #9DA7EA; }
+.facetClassLabel { font-weight: bold; text-align: center; }
+.facetFieldContainer { background: #E0E0F0; }
+.facetFieldLabel { padding-left: 2px; margin-top: 5px; margin-bottom: 5px; font-weight: bold; text-align: left; }
+.extraFacetFieldsWrapper { }
+.toggleExtraFacetFieldsButton { float: right; margin: 0px; padding: 0px; }
+.facetFieldLineCount { display: inline-block; border-right: 1px solid #9DA7EA; color: gray; width: 3em; margin-right: 3px }
+.facetField { border-top: 1px solid #9DA7EA; }
+.facetFields { padding-left: 5px; }
+.facetFieldLineValue { overflow: hidden; text-overflow: ellipsis; }
+
+.searcherSimpleSearchWrapper {} 
+.searcherAdvancedSearchWrapper { margin: 2px; border: 1px solid #9DA7EA; } 
+
+.searcherClassedSearchesContainer { margin: 5px; } 
+.searcherClassedSearches {} 
+.searcherClassedSearchesLabel { font-weight: bold; } 
+
+.searcherClassedSearchesAddContainer { width: 50%; text-align: center; }
+
+.searcherFacetedSearchesContainer { margin: 5px; border-top: 1px solid black; } 
+.searcherFacetedSearches {} 
+.searcherFacetedSearchesLabel { font-weight: bold; } 
+
+.searcherFilterModifierContainer { margin: 5px; border-top: 1px solid black; } 
+
+.searcherFiltersLabel { font-weight: bold; } 
+.searcherFilterContainer {} 
+
+.searcherModifiersLabel { font-weight: bold; } 
+.searcherModifierContainer {} 
+
+.searcherGoContainer { width: 50%; text-align: right; }
+.searcherDeckSwapContainer {}
+
+
+
+
+/* general purpose light borders */
+.border_5 { border: 1px solid #D0D0D0; }
+.border_6 { border: 1px solid #808080; }
+
+input:focus { background: #E0E0F0; color: #000000;}
+a:focus { background: #E0E0F0; color: #000000;}
+
+
+/* ---------------------------------------------------------------------- */
+
+.canvas { /* main content div for each page */
+    border-left: 3px solid #9DA7EA;
+    border-bottom: 3px solid #9DA7EA;
+       border-top: 3px solid #9DA7EA;
+}
+
+/* border around home search box */
+.home_search { border: 3px solid #9DA7EA; }
+
+/* main nav sidebar */
+.sidebar_item_active { background: #9DA7EA; }
+
+/* record detail summary block */
+.rdetail_desc { border: 1px solid #9DA7EA; }
+.rdetail_item { border: 1px solid #9DA7EA; }
+.rdetail_extras_selected { background: #E0E0F0;} 
+
+
+.data_grid thead tr { background: #E0E0F0; color: #000000; }
+.data_grid thead td { border: 1px solid #808080; }
+.data_grid tbody td { border: 1px solid #D8DCF7; }
+.data_grid_nb thead tr { background: #E0E0F0; color: #000000; }
+.data_grid_nb thead td { border: none; }
+.data_grid_nb tbody td { border: none; }
+
+.light_border { border: 1px solid #D8DCF7; }
+
+.adv_quick_search_submit { border-bottom: 3px solid #D8DCF7;}
+
+.myopac_link_active { background: #D8DCF7; }
+
+.sidebar_extra_link { text-decoration: none; }
+#searchbar_tag_on { color: red; }
+.searchbar_item { color: black; } 
+#login_box { border-top: 1px solid #808080; border-bottom: 1px solid #808080; }
+#next_prev_links_dead { color: #808080; text-decoration: none; }
+
+.nav_link_active {font-weight: bold;}
+
+.search_link { text-decoration: none; }
+.result_table_subtable { border-top: 1px solid #E0E0F0; }
+
+.copy_count_cell { border-right: 1px solid #E0E0F0; } 
+.copy_count_div {      border-left: 2px solid #D8DCF7; border-right: 2px solid #D8DCF7; }
+
+#rdetail_image_cell { border: 1px solid white; border-right: 1px solid #9DA7EA;}
+
+
+
+.x_mark { color: red; }
+.check_mark { color: green; }
+
+#myopac_holds_thaw_date_form { border: 1px solid #E0E0F0; } 
+
+.invalid_field { border: 3px solid red; }
+
+.hold_expire_warning { color:red; }
+
diff --git a/Open-ILS/web/opac/theme/sjcg/css/colors.css b/Open-ILS/web/opac/theme/sjcg/css/colors.css
new file mode 100644 (file)
index 0000000..5ce7ac2
--- /dev/null
@@ -0,0 +1,139 @@
+body a                 { color: black; text-decoration: none;}
+body a:visited { color: black; text-decoration: none;}
+body a:hover   { color: red; text-decoration: underline;}
+
+/* SJCG chose a dark primary accent colour; make the text visible */
+body .color_1 a { color: white; text-decoration: none;}
+body .sidebar_item_active a { color: white; text-decoration: none;}
+
+
+/* the idea is to have 4 complimentary colors that 
+ * are used throughout the opac.  Edit those colors
+ * in this file
+ */
+.color_1 { background: #492F91; color: #FFFFFF; }
+.color_2 { background: #FFC423; color: #000000; }
+.color_3 { background: #D8DCF7; color: #000000; }
+.color_4 { background: #E0E0F0; color: #000000; }
+
+.border_1 { border: 1px solid #492F91; }
+.border_2 { border: 1px solid #FFC423; }
+.border_3 { border: 1px solid #D8DCF7; }
+.border_4 { border: 1px solid #E0E0F0; }
+
+.border_1_2 { border: 2px solid #492F91; }
+.border_2_2 { border: 2px solid #FFC423; }
+.border_3_2 { border: 2px solid #D8DCF7; }
+.border_4_2 { border: 2px solid #E0E0F0; }
+
+.border_1_3 { border: 3px solid #492F91; }
+.border_2_3 { border: 3px solid #FFC423; }
+.border_3_3 { border: 3px solid #D8DCF7; }
+.border_4_3 { border: 3px solid #E0E0F0; }
+
+/* some facet styling */
+.facetClassContainer { margin: 2px; border: 1px solid #492F91; }
+.facetClassLabelContainer { background: #492F91; border: 1px solid #492F91; }
+.facetClassLabel { font-weight: bold; text-align: center; color: #FFFFFF; }
+.facetFieldContainer { background: #E0E0F0; }
+.facetFieldLabel { padding-left: 2px; margin-top: 5px; margin-bottom: 5px; font-weight: bold; text-align: left; }
+.extraFacetFieldsWrapper { }
+.toggleExtraFacetFieldsButton { float: right; margin: 0px; padding: 0px; }
+.facetFieldLineCount { display: inline-block; border-right: 1px solid #492F91; color: gray; width: 3em; margin-right: 3px }
+.facetField { border-top: 1px solid #492F91; }
+.facetFields { padding-left: 5px; }
+.facetFieldLineValue { overflow: hidden; text-overflow: ellipsis; }
+
+.searcherSimpleSearchWrapper {} 
+.searcherAdvancedSearchWrapper { margin: 2px; border: 1px solid #492F91; } 
+
+.searcherClassedSearchesContainer { margin: 5px; } 
+.searcherClassedSearches {} 
+.searcherClassedSearchesLabel { font-weight: bold; } 
+
+.searcherClassedSearchesAddContainer { width: 50%; text-align: center; }
+
+.searcherFacetedSearchesContainer { margin: 5px; border-top: 1px solid black; } 
+.searcherFacetedSearches {} 
+.searcherFacetedSearchesLabel { font-weight: bold; } 
+
+.searcherFilterModifierContainer { margin: 5px; border-top: 1px solid black; } 
+
+.searcherFiltersLabel { font-weight: bold; } 
+.searcherFilterContainer {} 
+
+.searcherModifiersLabel { font-weight: bold; } 
+.searcherModifierContainer {} 
+
+.searcherGoContainer { width: 50%; text-align: right; }
+.searcherDeckSwapContainer {}
+
+/* general purpose light borders */
+.border_5 { border: 1px solid #D0D0D0; }
+.border_6 { border: 1px solid #808080; }
+
+input:focus { background: #E0E0F0; color: #000000;}
+a:focus { background: #E0E0F0; color: #000000;}
+
+
+/* ---------------------------------------------------------------------- */
+
+.canvas { /* main content div for each page */
+    border-left: 3px solid #492F91;
+    border-bottom: 3px solid #492F91;
+       border-top: 3px solid #492F91;
+}
+
+/* border around home search box */
+.home_search { border: 3px solid #492F91; }
+
+/* main nav sidebar */
+.sidebar_item_active { background: #492F91; color: #FFFFFF; }
+
+/* record detail summary block */
+.rdetail_desc { border: 1px solid #492F91; }
+.rdetail_item { border: 1px solid #492F91; }
+.rdetail_extras_selected { background: #E0E0F0;} 
+
+
+.data_grid thead tr { background: #E0E0F0; color: #000000; }
+.data_grid thead td { border: 1px solid #808080; }
+.data_grid tbody td { border: 1px solid #D8DCF7; }
+.data_grid_nb thead tr { background: #E0E0F0; color: #000000; }
+.data_grid_nb thead td { border: none; }
+.data_grid_nb tbody td { border: none; }
+
+.light_border { border: 1px solid #D8DCF7; }
+
+.adv_quick_search_submit { border-bottom: 3px solid #D8DCF7;}
+
+.myopac_link_active { background: #D8DCF7; }
+
+.sidebar_extra_link { text-decoration: none; }
+#searchbar_tag_on { color: red; }
+.searchbar_item { color: black; } 
+#login_box { border-top: 1px solid #808080; border-bottom: 1px solid #808080; }
+#next_prev_links_dead { color: #808080; text-decoration: none; }
+
+.nav_link_active {font-weight: bold;}
+
+.search_link { text-decoration: none; }
+.result_table_subtable { border-top: 1px solid #E0E0F0; }
+
+.copy_count_cell { border-right: 1px solid #E0E0F0; } 
+.copy_count_div {      border-left: 2px solid #D8DCF7; border-right: 2px solid #D8DCF7; }
+
+#rdetail_image_cell { border: 1px solid white; border-right: 1px solid #492F91;}
+
+
+
+.x_mark { color: red; }
+.check_mark { color: green; }
+
+#myopac_holds_thaw_date_form { border: 1px solid #E0E0F0; } 
+
+.invalid_field { border: 3px solid red; }
+
+.hold_expire_warning { color:red; }
+
diff --git a/Open-ILS/web/opac/theme/uhearst/css/colors.css b/Open-ILS/web/opac/theme/uhearst/css/colors.css
new file mode 100644 (file)
index 0000000..3613285
--- /dev/null
@@ -0,0 +1,140 @@
+body a                 { color: black; text-decoration: none;}
+body a:visited { color: black; text-decoration: none;}
+body a:hover   { color: #60B1B8; text-decoration: underline;}
+/*
+.NoveListSelect a                      { color: blue; text-decoration: underline;}
+.NoveListSelect a:visited      { color: purple; text-decoration: underline;}
+*/
+
+/* the idea is to have 4 complimentary colors that 
+ * are used throughout the opac.  Edit those colors
+ * in this file
+ */
+.color_1 { background: #BB6315; color: #000000; }
+.color_2 { background: #DD8F4A; color: #000000; }
+.color_3 { background: #DDA471; color: #000000; }
+.color_4 { background: #60B1B8; color: #000000; }
+
+.border_1 { border: 1px solid #BB6315; }
+.border_2 { border: 1px solid #DD8F4A; }
+.border_3 { border: 1px solid #DDA471; }
+.border_4 { border: 1px solid #60B1B8; }
+
+.border_1_2 { border: 2px solid #BB6315; }
+.border_2_2 { border: 2px solid #DD8F4A; }
+.border_3_2 { border: 2px solid #DDA471; }
+.border_4_2 { border: 2px solid #60B1B8; }
+
+.border_1_3 { border: 3px solid #BB6315; }
+.border_2_3 { border: 3px solid #DD8F4A; }
+.border_3_3 { border: 3px solid #DDA471; }
+.border_4_3 { border: 3px solid #60B1B8; }
+
+
+/* some facet styling */
+.facetClassContainer { margin: 2px; border: 1px solid #BB6315; }
+.facetClassLabelContainer { background: #BB6315; border: 1px solid #BB6315; }
+.facetClassLabel { font-weight: bold; text-align: center; }
+.facetFieldContainer { background: #60B1B8; }
+.facetFieldLabel { padding-left: 2px; margin-top: 5px; margin-bottom: 5px; font-weight: bold; text-align: left; }
+.extraFacetFieldsWrapper { }
+.toggleExtraFacetFieldsButton { float: right; margin: 0px; padding: 0px; }
+.facetFieldLineCount { display: inline-block; border-right: 1px solid #BB6315; color: gray; width: 3em; margin-right: 3px }
+.facetField { border-top: 1px solid #BB6315; }
+.facetFields { padding-left: 5px; }
+.facetFieldLineValue { overflow: hidden; text-overflow: ellipsis; }
+
+.searcherSimpleSearchWrapper {} 
+.searcherAdvancedSearchWrapper { margin: 2px; border: 1px solid #BB6315; } 
+
+.searcherClassedSearchesContainer { margin: 5px; } 
+.searcherClassedSearches {} 
+.searcherClassedSearchesLabel { font-weight: bold; } 
+
+.searcherClassedSearchesAddContainer { width: 50%; text-align: center; }
+
+.searcherFacetedSearchesContainer { margin: 5px; border-top: 1px solid black; } 
+.searcherFacetedSearches {} 
+.searcherFacetedSearchesLabel { font-weight: bold; } 
+
+.searcherFilterModifierContainer { margin: 5px; border-top: 1px solid black; } 
+
+.searcherFiltersLabel { font-weight: bold; } 
+.searcherFilterContainer {} 
+
+.searcherModifiersLabel { font-weight: bold; } 
+.searcherModifierContainer {} 
+
+.searcherGoContainer { width: 50%; text-align: right; }
+.searcherDeckSwapContainer {}
+
+
+/* general purpose light borders */
+.border_5 { border: 1px solid #FFFFFF; }
+.border_6 { border: 1px solid #60B1B8; }
+
+input:focus { background: #FFFFFF; color: #000000;}
+a:focus { background: #60B1B8; color: #000000;}
+
+
+/* ---------------------------------------------------------------------- */
+
+.canvas { /* main content div for each page */
+    border-left: 3px solid #BB6315;
+    border-bottom: 3px solid #BB6315;
+       border-top: 3px solid #BB6315;
+}
+
+/* border around home search box */
+.home_search { border: 3px solid #BB6315; }
+
+/* main nav sidebar */
+.sidebar_item_active { background: #BB6315; }
+
+/* record detail summary block */
+.rdetail_desc { border: 1px solid #BB6315; }
+.rdetail_item { border: 1px solid #BB6315; }
+.rdetail_extras_selected { background: #60B1B8;} 
+
+
+.data_grid thead tr { background: #60B1B8; color: #000000; }
+.data_grid thead td { border: 1px solid #60B1B8; }
+.data_grid tbody td { border: 1px solid #DDA471; }
+.data_grid_nb thead tr { background: #60B1B8; color: #000000; }
+.data_grid_nb thead td { border: none; }
+.data_grid_nb tbody td { border: none; }
+
+.light_border { border: 1px solid #DDA471; }
+
+.adv_quick_search_submit { border-bottom: 3px solid #DDA471;}
+
+.myopac_link_active { background: #DDA471; }
+
+.sidebar_extra_link { text-decoration: none; }
+#searchbar_tag_on { color: red; }
+.searchbar_item { color: black; } 
+#login_box { border-top: 1px solid #60B1B8; border-bottom: 1px solid #60B1B8; }
+#next_prev_links_dead { color: #60B1B8; text-decoration: none; }
+
+.nav_link_active {font-weight: bold;}
+
+.search_link { text-decoration: none; }
+.result_table_subtable { border-top: 1px solid #60B1B8; }
+
+.copy_count_cell { border-right: 1px solid #60B1B8; } 
+.copy_count_div {      border-left: 2px solid #DDA471; border-right: 2px solid #DDA471; }
+
+#rdetail_image_cell { border: 1px solid white; border-right: 1px solid #BB6315;}
+
+
+
+.x_mark { color: red; }
+.check_mark { color: green; }
+
+#myopac_holds_thaw_date_form { border: 1px solid #60B1B8; } 
+
+.invalid_field { border: 3px solid red; }
+
+.hold_expire_warning { color:red; }
+
diff --git a/Open-ILS/web/opac/theme/uwin/css/colors.css b/Open-ILS/web/opac/theme/uwin/css/colors.css
new file mode 100644 (file)
index 0000000..c36157f
--- /dev/null
@@ -0,0 +1,155 @@
+body a                 { color: black; text-decoration: none;}
+body a:visited { color: black; text-decoration: none;}
+body a:hover   { color: red; text-decoration: underline;}
+/*
+.NoveListSelect a                      { color: blue; text-decoration: underline;}
+.NoveListSelect a:visited      { color: purple; text-decoration: underline;}
+*/
+
+
+/* the idea is to have 4 complimentary colors that 
+ * are used throughout the opac.  Edit those colors
+ * in this file
+ */
+.color_1 { background: #B2BB1E; color: #000000; }
+.color_2 { background: #B2BB1E; color: #000000; }
+.color_3 { background: #EEE; color: #000000; }
+.color_4 { background: #E7E0D5; color: #000000; }
+
+.border_1 { border: 1px solid #005595; }
+.border_2 { border: 1px solid #B2BB1E; }
+.border_3 { border: 1px solid #EEE; }
+.border_4 { border: 1px solid #E7E0D5; }
+
+.border_1_2 { border: 2px solid #B2BB1E; }
+.border_2_2 { border: 2px solid #B2BB1E; }
+.border_3_2 { border: 2px solid #EEE; }
+.border_4_2 { border: 2px solid #E7E0D5; }
+
+.border_1_3 { border: 3px solid #B2BB1E; }
+.border_2_3 { border: 3px solid #B2BB1E; }
+.border_3_3 { border: 3px solid #EEE; }
+.border_4_3 { border: 3px solid #E7E0D5; }
+
+
+/* some facet styling */
+.facetClassContainer { margin: 2px; border: 1px solid #005595; }
+.facetClassLabelContainer { background: #005595; border: 1px solid #005595; }
+.facetClassLabel { font-weight: bold; color: #FFF; }
+.facetFieldContainer { background: #E7E0D5; }
+.facetFieldLabel { padding-left: 2px; margin-top: 5px; margin-bottom: 5px; font-weight: bold; text-align: left; }
+.extraFacetFieldsWrapper { }
+.toggleExtraFacetFieldsButton { float: right; margin: 0px; padding: 0px; }
+.facetFieldLineCount { display: inline-block; border-right: 1px solid #005595; color: gray; width: 3em; margin-right: 3px }
+.facetField { border-top: 1px solid #005595; }
+.facetFields { padding-left: 5px; }
+.facetFieldLineValue { overflow: hidden; text-overflow: ellipsis; }
+
+.searcherSimpleSearchWrapper {} 
+.searcherAdvancedSearchWrapper { margin: 2px; border: 1px solid #005595; } 
+
+.searcherClassedSearchesContainer { margin: 5px; } 
+.searcherClassedSearches {} 
+.searcherClassedSearchesLabel { font-weight: bold; } 
+
+.searcherClassedSearchesAddContainer { width: 50%; text-align: center; }
+
+.searcherFacetedSearchesContainer { margin: 5px; border-top: 1px solid black; } 
+.searcherFacetedSearches {} 
+.searcherFacetedSearchesLabel { font-weight: bold; } 
+
+.searcherFilterModifierContainer { margin: 5px; border-top: 1px solid black; } 
+
+.searcherFiltersLabel { font-weight: bold; } 
+.searcherFilterContainer {} 
+
+.searcherModifiersLabel { font-weight: bold; } 
+.searcherModifierContainer {} 
+
+.searcherGoContainer { width: 50%; text-align: right; }
+.searcherDeckSwapContainer {}
+
+
+
+/* general purpose light borders */
+.border_5 { border: 1px solid #D0D0D0; }
+.border_6 { border: 1px solid #808080; }
+
+/* 
+input:focus { background: #EEE; color: #000000;}
+a:focus { background: #E0F0E0; color: #000000;}
+*/
+/* ---------------------------------------------------------------------- */
+
+.canvas { /* main content div for each page */
+    border-right: 3px solid #005595;
+    border-left: 3px solid #005595;
+    border-bottom: 3px solid #005595;
+    border-top: 3px solid #005595;
+}
+
+/* border around home search box */
+.home_search { border: 3px solid #005595; }
+
+/* main nav sidebar */
+.sidebar_item_active { background: #005595; color: #EEE; }
+.sidebar_item_active a { background: #005595; color: #EEE; }
+.sidebar_item_active a:hover { background: #005595; color: #EEE; text-decoration: none; }
+/* #advanced_link { background: #005595; color: #EEE; } */
+#sidebar_results_wrapper { border-right: 0; }
+
+/* record detail summary block */
+.rdetail_desc { border: 1px solid #CCC; }
+.rdetail_item { border: 1px solid #CCC; }
+.rdetails_extra_links { border: 1px solid #CCC; }
+.rdetail_extras_td { border: 1px solid #CCC; }
+.rdetail_extras_selected { background: #B2BB1E;} 
+.rdetail_extras_selected a:hover { color: #FF0;} 
+#rdetail_image_cell { border: 1px solid white; border-right: 1px solid #CCC;}
+
+
+.data_grid thead tr { background: #E7E0D5; color: #000000; }
+.data_grid thead td { border: 1px solid #CCC; }
+.data_grid tbody td { border: 1px solid #CCC; }
+.data_grid_nb thead tr { background: #CCC; color: #000000; }
+.data_grid_nb thead td { border: none; }
+.data_grid_nb tbody td { border: none; }
+/*
+.copy_count_cell { border-right: 0px solid #CCC; } 
+we specifically suppress this
+*/
+.copy_count_cell { border-right: 0px; padding: 2px; } 
+.copy_count_div {      border-left: 2px solid #CCC; border-right: 0px solid #CCC; }
+
+.light_border { border: 1px solid #CCC; }
+
+.adv_quick_search_submit { border-bottom: 3px solid #CCC;}
+
+.myopac_link_active { background: #E0F6E0; }
+
+.sidebar_extra_link { text-decoration: none; }
+#searchbar_tag_on { color: red; }
+.searchbar_item { color: black; } 
+#login_box { border-top: 1px solid #808080; border-bottom: 1px solid #808080; }
+#next_prev_links_dead { color: #808080; text-decoration: none; }
+
+.nav_link_active {font-weight: bold;}
+
+.search_link { text-decoration: none; }
+.result_table_subtable { border-top: 1px solid #E0E0E0; }
+
+.x_mark { color: red; }
+.check_mark { color: green; }
+
+#myopac_holds_thaw_date_form { border: 1px solid #E0E0E0; } 
+
+.invalid_field { border: 3px solid red; }
+
+#lib_selector_link:hover { color: #FF0; }
+#adv_global_search #lib_selector_link:hover { color: red; }
+#rdetail_place_hold:hover { color: #FF0; }
+#home_adv_search_link:hover { color: #FF0; }
+depth_selector:hover { color: #FF0; }
+#home_myopac_link:hover { color: #FF0; }