From: Sebastian Hammer Date: Sat, 14 Apr 2007 23:59:20 +0000 (+0000) Subject: Removed linechange before first location X-Git-Tag: PAZPAR2.1.0.0~298 X-Git-Url: http://git.indexdata.com/?a=commitdiff_plain;h=606fdfa493ec8360a2a43b4bd396e8f891defc63;p=pazpar2-moved-to-github.git Removed linechange before first location --- diff --git a/www/masterkey/js/client.js b/www/masterkey/js/client.js index 44426f2..648c738 100644 --- a/www/masterkey/js/client.js +++ b/www/masterkey/js/client.js @@ -1,5 +1,5 @@ /* -** $Id: client.js,v 1.15 2007-04-14 06:12:21 quinn Exp $ +** $Id: client.js,v 1.16 2007-04-14 23:59:20 quinn Exp $ ** MasterKey - pazpar2's javascript client . */ @@ -254,28 +254,31 @@ function drawDetailedRec(detailBox) var detailTable = $('
'); var recLocation = currentDetailedData["location"]; - if( recLocation ) - detailTable.append('Available at: '); - - for(var i=0; i < recLocation.length; i++) - { - var url = recLocation[i]["md-url"]; - var date = recLocation[i]["md-date"]; - var description = recLocation[i]["md-description"]; - detailTable.append(' '+recLocation[i].name+''); - if (url) { - var tline = $(' '); - var td = $('').appendTo(tline); - var tlink = $('Go to resource'); - tlink.attr('href', url);; - tlink.attr('target', '_blank'); - tlink.appendTo(td); - detailTable.append(tline); + var hdtarget; + if( recLocation ) { + hdtarget = $('Available at:'); + detailTable.append(hdtarget); + + for(var i=0; i < recLocation.length; i++) + { + if (!hdtarget) + hdtarget = $(' ').appendTo(detailTable); + var url = recLocation[i]["md-url"]; + var description = recLocation[i]["md-description"]; + hdtarget.append(''+recLocation[i].name+''); + if (url) { + var tline = $(' '); + var td = $('').appendTo(tline); + var tlink = $('Go to resource'); + tlink.attr('href', url);; + tlink.attr('target', '_blank'); + tlink.appendTo(td); + detailTable.append(tline); + } + if (description) + detailTable.append($(' '+description+'')); + hdtarget = undefined; } - if (date) - detailTable.append($('Date'+date+'')); - if (description) - detailTable.append($(' '+description+'')); } detailTable.appendTo(detailBox);