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');
+ if (url_list[this_title_id] == undefined)
+ url_list[this_title_id] = "";
req.oncomplete = function(r) {
var resolverInfo = "";
dojo.forEach(r.recv().content(), function(entry) {
resolverInfo = entry.public_name + "_" + entry.target_coverage;
- if (url_list.indexOf(resolverInfo) == -1) {
+ var testDup = url_list[this_title_id] + "";
+
+ if (testDup.indexOf(resolverInfo) == -1) {
var resolverNode = null;
dojo.query('.recid').forEach(function(recinfo) {
if (parseFloat(dojo.trim(dojox.data.dom.textContent(recinfo))) ==
resolverNode = recinfo;
}
});
- url_list += resolverInfo;
+ url_list[this_title_id] += resolverInfo;
var output = null;
if (resolverNode != null) {
var parent = resolverNode.parentNode;
var item_cnt = 0;
var max_items = 4;
-
dojo.query('volume', item).forEach(function(vol) {
if (item_cnt >= max_items) {
return output.innerHTML;
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('span',{ className: 'live_location_cell',
- innerHTML: vol.getAttribute('label')},
+ loc_id = parseInt(location.getAttribute('ident'));
+ if (loc_id != 8 && loc_id != 20) {
+ if (!vol_appended) {
+ dojo.create('span',{ className: 'live_location_cell',
+ innerHTML: vol.getAttribute('label')},
+ output);
+ vol_appended = true;
+ }
+ dojo.create('span', { className: 'live_separator_cell',
+ "innerHTML": ' - '},
+ output);
+ dojo.create('span', { className: 'live_location_cell',
+ "innerHTML": dojox.xml.parser.textContent(location)},
output);
- vol_appended = true;
}
- dojo.create('span', { className: 'live_separator_cell',
- "innerHTML": ' - '},
- output);
- dojo.create('span', { className: 'live_location_cell',
- "innerHTML": dojox.xml.parser.textContent(location)},
- output);
+ });
+ if (loc_id == 8 || loc_id == 20) {
+ return;
}
- });
- 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('span', { className: 'live_status_cell',
- "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.query('status', cp).forEach(function (status) {
+ var pfx = dojo.doc.createTextNode(' (');
+ output.appendChild(pfx);
+ dojo.create('span', { className: 'live_status_cell',
+ "innerHTML": dojox.xml.parser.textContent(status) }, output);
+ var qfx = dojo.doc.createTextNode(')');
+ output.appendChild(qfx);
+ });
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;
+ return output.innerHTML;
]]></span>
</span>
var output = dojo.create('span');
var uri = new Object;
uri.href = item.getAttribute('href');
+ /* url check for legacy (and mostly broken) urls */
+ var test = null;
+ if (urlCheck)
+ test = href.match(urlExpr);
+ if (test != null)
+ return "";
uri.label = item.getAttribute('label');
uri.use = item.getAttribute('use_restriction');
if (uri.href == uri.label) {
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 url_list = new Array();
var title_list = "";
var curr_title_id = "";
+ /* whether to use a url check to mask legacy urls */
+ var urlCheck = true;
+ /* regular expression */
+ var urlExpr = /webvoy|janus|resolver/i;
+ var test = "";
</script>