From: dbs Date: Sun, 14 Sep 2008 00:32:29 +0000 (+0000) Subject: Now that we're guaranteeing each URL attribute will be defined, X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=76ccca59a249f8d1e90d5fc438286d866f155d6c;p=Evergreen.git Now that we're guaranteeing each URL attribute will be defined, we no longer need to check for 'undefined' git-svn-id: svn://svn.open-ils.org/ILS/trunk@10590 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/web/opac/skin/default/js/rdetail.js b/Open-ILS/web/opac/skin/default/js/rdetail.js index 015caac233..b103dc32e9 100644 --- a/Open-ILS/web/opac/skin/default/js/rdetail.js +++ b/Open-ILS/web/opac/skin/default/js/rdetail.js @@ -224,15 +224,15 @@ function _rdetailDraw(r) { // (as $y was defined later in MARC21's life as the display label) var displayLabel = '' + links[i+1]; var note = '' + links[i+2]; - if(displayLabel == 'undefined' || displayLabel.match(/https?:\/|ftps?:\/|mailto:/i)) { - if(note == 'undefined' || note.match(/https?:\/|ftps?:\/|mailto:/i)) { + if(!displayLabel || displayLabel.match(/https?:\/|ftps?:\/|mailto:/i)) { + if(!note || note.match(/https?:\/|ftps?:\/|mailto:/i)) { displayLabel = href; } else { displayLabel = note; } } $('rdetail_online').appendChild(elem('a', {href:href,'class':'classic_link'}, displayLabel)); - if (note != 'undefined' && note != displayLabel) { + if (!note && note != displayLabel) { $('rdetail_online').appendChild(elem('span', {'class':'url_note'}, ' - ' + note)); } $('rdetail_online').appendChild(elem('br'));