From: dbs Date: Thu, 23 Sep 2010 18:51:36 +0000 (+0000) Subject: SFX links, falling back to asset.uri links, in brief results. MADNESS. X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=9bd2062c74cb6e6be20f5c9319f4811bbf5fafca;p=contrib%2FConifer.git SFX links, falling back to asset.uri links, in brief results. MADNESS. git-svn-id: svn://svn.open-ils.org/ILS-Contrib/conifer/branches/rel_1_6_1@1003 6d9bc8c9-1ec2-4278-b937-99fde70a366f --- diff --git a/web/opac/skin/lul/js/result_common.js b/web/opac/skin/lul/js/result_common.js index 0854626c1d..af8812aae8 100644 --- a/web/opac/skin/lul/js/result_common.js +++ b/web/opac/skin/lul/js/result_common.js @@ -588,6 +588,7 @@ function resultDisplayRecord(rec, pos, is_mr) { 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()) ); @@ -824,7 +825,7 @@ function resultDisplayCopyCounts(rec, pagePosition, copy_counts) { /* here we style opac-invisible records for xul */ if( cts.depth == 0 ) { - if(cts.transcendant == null && !cts.unshadow) { + 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 ) diff --git a/web/opac/skin/lul/xml/result/result_table.xml b/web/opac/skin/lul/xml/result/result_table.xml index 6c3cff3bfb..5f349ed00a 100644 --- a/web/opac/skin/lul/xml/result/result_table.xml +++ b/web/opac/skin/lul/xml/result/result_table.xml @@ -2,296 +2,402 @@
- - - - - - - - - - - - - - - - - - - - - - - - - -
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - -
- - - -
- - - | - | - - - -
-
&result.localCallNumbers; - - - = max_items) { - return output.innerHTML; - } - dojo.query('copy', vol).forEach(function (cp) { - if (cp.getAttribute('deleted') == 't') { - return; - } - 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) { - if (!vol_appended) { - dojo.create('b', { "innerHTML": vol.getAttribute('label') }, output); - vol_appended = true; - } - var pfx = dojo.doc.createTextNode(' - '); - output.appendChild(pfx); - dojo.create('b', { "innerHTML": dojox.xml.parser.textContent(location) }, output); - } - }); - if (loc_id == 8 || loc_id == 20) { - return; - } - dojo.query('status', cp).forEach(function (status) { - var pfx = dojo.doc.createTextNode(' ('); - output.appendChild(pfx); - dojo.create('b', { "innerHTML": dojox.xml.parser.textContent(status) }, output); - var sfx = dojo.doc.createTextNode(')'); - output.appendChild(sfx); - }); - dojo.create('br', null, output); - - item_cnt++; - if (item_cnt >= max_items) { - output.appendChild(dojo.doc.createTextNode('... more items in full record')); - } - }); - }); - }); - dojo.query('volumes volume uris uri', item).forEach(function(link) { - var found_issn = false; - dojo.query('datafield[tag="022"]', item).forEach(function () { - found_issn = true; - }); - if (found_issn) { - return; - } - var uri = new Object; - uri.href = link.getAttribute('href'); - uri.label = link.getAttribute('label'); - uri.use = link.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); - }); - if (output) { - return output.innerHTML; - } - ]]> - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - &common.relevancy; - - - - &opac.holds.placeHold; - - - - - - - - - - &result.googleBooks.browse; - - - -
-
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
+ + + +
+ + + | + | + + + +
+
+ + + +
&result.localCallNumbers; + + + + + + + 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(dojox.data.dom.textContent(recinfo))) == parseFloat(this_title_id)) { + resolverNode = recinfo; + } + }); + url_list += resolverInfo; + var output = null; + if (resolverNode != null) { + var parent = resolverNode.parentNode; + if (parent) { + parent = parent.parentNode; + } + if (parent) { + dojo.removeClass(parent,'hide_me'); + } + output = dojo.create('div',{"style":"background-color:#EEFFEE;"},resolverNode,"last"); + dojo.addClass(output,"result_table_sfx_cell"); + title_list += this_title_id; + var link = dojo.create('a', {"style": "margin-left: 1em;", "class":"search_link", "href": entry.target_url}); + var link_text = dojo.doc.createTextNode( entry.public_name); + link.appendChild(link_text); + output.appendChild(link); + var coverage_text = dojo.doc.createTextNode(' - ' + entry.target_coverage + + (entry.target_embargo ? (' / ' + entry.target_embargo) : '')); + output.appendChild(coverage_text); + resolved[this_title_id] = true; + } + } + }); + }; + req.send(); + } catch (err) { alert(err.message);} + } + } + ]]> + + + + = max_items) { + return output.innerHTML; + } + dojo.query('copy', vol).forEach(function (cp) { + if (cp.getAttribute('deleted') == 't') { + return; + } + var 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) { + dojo.create('span',{ "style": "font-weight: bold;", + innerHTML: vol.getAttribute('label')}, + output); + vol_appended = true; + } + dojo.create('span', { className: 'live_separator_cell', + "innerHTML": ' - '}, + output); + dojo.create('span', { "style": "font-weight: bold;", + "innerHTML": dojox.xml.parser.textContent(location)}, + output); + } + }); + if (loc_id == 8 || loc_id == 20 || loc_id == 185 || loc_id == 156) { + return; + } + dojo.query('status', cp).forEach(function (status) { + var pfx = dojo.doc.createTextNode(' ('); + output.appendChild(pfx); + dojo.create('span', { "style": "font-weight: bold;", + "innerHTML": dojox.xml.parser.textContent(status) }, output); + var sfx = dojo.doc.createTextNode(')'); + output.appendChild(sfx); + }); + dojo.create('br', null, output); + + item_cnt++; + if (item_cnt >= max_items) { + output.appendChild(dojo.doc.createTextNode('... more print items listed in full record')); + dojo.create('br', null, output); + } + }); + }); + + return output.innerHTML; + ]]> + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + &common.relevancy; + + + + &opac.holds.placeHold; + + + + + + + + + + &result.googleBooks.browse; + + + +
+
- + - + - - + +
+ - - &common.results; - - - - - &common.ofAtLeast; - - (page - - &common.of; - - + + &common.results; + + - + + &common.ofAtLeast; + + (page + + &common.of; + + - - &rdetail.start;&rdetail.page.previous.symbol; &rdetail.page.previous; + + &rdetail.start;&rdetail.page.previous.symbol; &rdetail.page.previous; - - &rdetail.page.next; &rdetail.page.next.symbol; + + &rdetail.page.next; &rdetail.page.next.symbol; - + - + -
- +