From 4fa0973a4fdce3b2b41876f32f2a22580c48524d Mon Sep 17 00:00:00 2001 From: Dennis Schafroth Date: Tue, 22 Nov 2011 19:08:31 +0100 Subject: [PATCH] Fix subjects --- www/iphone/example_client.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) 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); -- 1.7.10.4