this_title_id = dojo.trim(BT.textContent(item));
});
+ dojo.query('datafield[tag="020"]', item).forEach(function(item) {
+ var sfx_mark = false;
+ dojo.query('subfield[code="9"]', item).forEach(function(item) {
+ sfx_mark = true;
+ });
+ if (!sfx_mark) {
+ return;
+ }
+
+ var isbn = '';
+ isbn = BT.textContent(item) + '';
+ isbn = isbn.replace(/^\s|.*?(\d\S*).*?$/, "$1");
+ isbn = isbn.replace(/-/g, "");
+ if (isbn.length > 0) {
+ try {
+ var ses = new OpenSRF.ClientSession('open-ils.resolver');
+ var req = ses.request('open-ils.resolver.resolve_holdings.raw',
+ 'isbn', isbn, '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);}
+ }
+ });
dojo.query('datafield[tag="022"] subfield', item).forEach(function(item) {
var issn = '';
issn = BT.textContent(item) + '';
} catch (err) { alert(err.message);}
}
});
+
]]></span>
</span>
<span type='opac/slot-data+marcxml-uris' query='record'>
<span class='hide_me' type='opac/slot-format'><![CDATA[
var found_issn = false;
+ var found_isbn = false;
dojo.query('datafield[tag="022"]', item).forEach(function(issn) {
found_issn = true;
});
- if (found_issn) { return; }
+ dojo.query('datafield[tag="020"] subfield[code="9"]', item).forEach(function(isbn) {
+ found_isbn = true;
+ });
+ if (found_issn or found_isbn) { return; }
var this_title_id;