displayLabel = note;
}
}
+ // Latch-ditch attempt to prevent URLs as display labels
+ if (displayLabel.substring(0,7) == 'http://') {
+ displayLabel = 'Connect to this resource online';
+ }
$('rdetail_online').appendChild(elem('a', {href:href,'class':'css_button'}, displayLabel));
if (note && note != displayLabel) {
$('rdetail_online').appendChild(elem('span', {'class':'url_note'}, ' - ' + note));
<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>';
+ var link;
+ var linklabel = item.getAttribute('label');
+ if (linklabel.substring(0,7) == 'http://') {
+ linklabel = 'Connect to this resource online';
+ }
+ var link = '<a href="' + item.getAttribute('href') + '" class="css_button">' + linklabel + '</a>';
if (item.getAttribute('use_restriction'))
link += ' (Use restriction: ' + item.getAttribute('use_restriction') + ')';
return link;
if (urihref.substring(0,20) == "http://via.tadl.org/") {
var uri_entry = dojo.create('div', {"style":"padding-bottom: 5px;"});
var link = dojo.create('a', {"class":"css_button", "href": urihref}, uri_entry);
+ if (urilabel.substring(0,7) == "http://") {
+ // Provide a default label if label appears to be a URL
+ urilabel = "Connect to this resource online";
+ }
var link_text = dojo.doc.createTextNode(urilabel);
link.appendChild(link_text);
output.appendChild(uri_entry);