From: Dennis Schafroth Date: Tue, 22 Nov 2011 18:08:31 +0000 (+0100) Subject: Fix subjects X-Git-Tag: v1.6.6~23 X-Git-Url: http://sru.miketaylor.org.uk/?a=commitdiff_plain;h=4fa0973a4fdce3b2b41876f32f2a22580c48524d;p=pazpar2-moved-to-github.git Fix subjects --- diff --git a/www/iphone/example_client.js b/www/iphone/example_client.js index e713b06..dd2d4f1 100644 --- a/www/iphone/example_client.js +++ b/www/iphone/example_client.js @@ -842,11 +842,12 @@ function renderLines(title, values, name, tag) { if (tag == undefined) tag = 'big'; var result = ""; - result = '
  • ' + title + '

    <' + tag + '>'; if (values != undefined && values.length) for (var idx = 0 ; idx < values.length ; idx++) - result += values[idx][name]; - result += '
  • '; + if (values[idx][name] != undefined ) + result += values[idx][name] + ' '; + if (result != "") + result = '
  • ' + title + '

    <' + tag + '>' + result + '
  • '; return result; } @@ -912,8 +913,8 @@ function renderDetails_iphone(data, marker) +=renderLine('Date', data["md-date"]) + renderLine('Author', data["md-author"]) // + renderLineURL('URL', data["md-electronic-url"], data["md-electronic-url"]) - + renderLine('Description', data["md-description"]); - + renderLines('Subjects', data["location"], "md-subject"); + + renderLine('Description', data["md-description"]) + + renderLines('Subjects', data["location"], "md-subject"); if (coverimagetag.length>0) { details += renderLine('Cover', coverimagetag);