[open-ils-commits] r10588 - trunk/Open-ILS/web/opac/skin/default/js
svn at svn.open-ils.org
svn at svn.open-ils.org
Sat Sep 13 03:28:01 EDT 2008
Author: dbs
Date: 2008-09-13 03:27:57 -0400 (Sat, 13 Sep 2008)
New Revision: 10588
Modified:
trunk/Open-ILS/web/opac/skin/default/js/rdetail.js
Log:
Prevent an 'undefined' $z note from being displayed when neither $y and $3 are defined
Modified: trunk/Open-ILS/web/opac/skin/default/js/rdetail.js
===================================================================
--- trunk/Open-ILS/web/opac/skin/default/js/rdetail.js 2008-09-13 06:43:51 UTC (rev 10587)
+++ trunk/Open-ILS/web/opac/skin/default/js/rdetail.js 2008-09-13 07:27:57 UTC (rev 10588)
@@ -224,15 +224,15 @@
// (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 || displayLabel.match(/https?:\/|ftps?:\/|mailto:/i)) {
- if(!note || note.match(/https?:\/|ftps?:\/|mailto:/i)) {
+ if(displayLabel == 'undefined' || displayLabel.match(/https?:\/|ftps?:\/|mailto:/i)) {
+ if(note == 'undefined' || note.match(/https?:\/|ftps?:\/|mailto:/i)) {
displayLabel = href;
} else {
displayLabel = note;
}
}
$('rdetail_online').appendChild(elem('a', {href:href,'class':'classic_link'}, displayLabel));
- if (note && note != displayLabel) {
+ if (note != 'undefined' && note != displayLabel) {
$('rdetail_online').appendChild(elem('span', {'class':'url_note'}, ' - ' + note));
}
$('rdetail_online').appendChild(elem('br'));
More information about the open-ils-commits
mailing list