fixing display of online resources with all-numeric display labels (thanks to Dan...
authormiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 9 Jul 2008 03:50:07 +0000 (03:50 +0000)
committermiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 9 Jul 2008 03:50:07 +0000 (03:50 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@10002 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/web/opac/skin/default/js/rdetail.js

index 063e40e..986a3dc 100644 (file)
@@ -207,11 +207,11 @@ function _rdetailDraw(r) {
 
        // see if the record has any external links 
        var links = record.online_loc();
-       for( var i = 0; links && links.length > 0 && i < links.length; i++ ) {
+       for( var i = 0; links && links.length > 0 && i < links.length; i = i + 2 ) {
                var href = links[i];
-               if( href.match(/http/) ) {
+               if( href.match(/https?:|ftp:|mailto:/) ) {
                        unHideMe($('rdetail_online_row'));
-                       var name = links[i+1];
+                       var name = '' + links[i+1];
                        if(!name || name.match(/http/)) name = href;
                        $('rdetail_online').appendChild(elem('a', {href:href,'class':'classic_link'}, name));
                        $('rdetail_online').appendChild(elem('br'));