[open-ils-commits] r1004 - conifer/branches/rel_1_6_1/web/opac/skin/lul/xml/result (dbs)
svn at svn.open-ils.org
svn at svn.open-ils.org
Thu Sep 23 15:59:43 EDT 2010
Author: dbs
Date: 2010-09-23 15:59:38 -0400 (Thu, 23 Sep 2010)
New Revision: 1004
Modified:
conifer/branches/rel_1_6_1/web/opac/skin/lul/xml/result/result_table.xml
Log:
More lenient ISSN extraction; remove one layer of dojo.query()ing
Modified: conifer/branches/rel_1_6_1/web/opac/skin/lul/xml/result/result_table.xml
===================================================================
--- conifer/branches/rel_1_6_1/web/opac/skin/lul/xml/result/result_table.xml 2010-09-23 18:51:36 UTC (rev 1003)
+++ conifer/branches/rel_1_6_1/web/opac/skin/lul/xml/result/result_table.xml 2010-09-23 19:59:38 UTC (rev 1004)
@@ -100,60 +100,57 @@
record id in order to place the resolver info in the right spot
-->
<span
- type='opac/slot-data' query='datafield[tag="022"]' class='hide_me'>
+ 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 list = dojo.query( 'subfield[code="a"]', item );
var issn = '';
- for (var i =0; i < list.length; i++) {
- issn = dojox.data.dom.textContent(list[i]) + '';
- 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(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;
+ issn = dojox.data.dom.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(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);}
- }
+ }
+ });
+ };
+ req.send();
+ } catch (err) { alert(err.message);}
}
]]></span>
</span>
More information about the open-ils-commits
mailing list