From c9b6aa29e42360618ead9d4674e194e750a6f423 Mon Sep 17 00:00:00 2001 From: Sebastian Hammer Date: Sat, 14 Apr 2007 06:12:21 +0000 Subject: [PATCH] Messing with the full display to bring it closer in line with what is needed for masterkey service. Not there yet. --- www/masterkey/js/client.js | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/www/masterkey/js/client.js b/www/masterkey/js/client.js index 584d833..44426f2 100644 --- a/www/masterkey/js/client.js +++ b/www/masterkey/js/client.js @@ -1,5 +1,5 @@ /* -** $Id: client.js,v 1.14 2007-04-13 18:28:10 quinn Exp $ +** $Id: client.js,v 1.15 2007-04-14 06:12:21 quinn Exp $ ** MasterKey - pazpar2's javascript client . */ @@ -251,22 +251,31 @@ function drawDetailedRec(detailBox) if( detailBox == undefined ) detailBox = $('
').appendTo($('#rec_'+currentDetailedId)); - detailBox.append('Details:
'); var detailTable = $('
'); - var recDate = currentDetailedData["md-date"]; - var recSubject = currentDetailedData["md-subject"]; var recLocation = currentDetailedData["location"]; - if( recDate ) - detailTable.append('Published:'+recDate+''); - if( recSubject ) - detailTable.append('Subject:'+recSubject+''); 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); + } + if (date) + detailTable.append($('Date'+date+'')); + if (description) + detailTable.append($(' '+description+'')); } detailTable.appendTo(detailBox); -- 1.7.10.4