From: Dennis Schafroth Date: Tue, 15 Nov 2011 10:24:06 +0000 (+0100) Subject: Use md-author if present instead of md-title-responsibility. Swap title-remainder... X-Git-Tag: v1.6.6~13^2~8 X-Git-Url: http://lists.indexdata.dk/cgi-bin?a=commitdiff_plain;h=fbdba021c917c36b27a594bfa555de45d4f2383c;p=pazpar2-moved-to-github.git Use md-author if present instead of md-title-responsibility. Swap title-remainder with author/title-responsibility --- diff --git a/www/iphone/example_client.js b/www/iphone/example_client.js index 4fe0836..ea74e67 100644 --- a/www/iphone/example_client.js +++ b/www/iphone/example_client.js @@ -153,10 +153,13 @@ function my_onshow(data) { +'' + hit["md-title"] +' '); - if (hit["md-title-responsibility"] !== undefined) { - html.push(''+hit["md-title-responsibility"]+' '); if (hit["md-title-remainder"] !== undefined) { - html.push('' + hit["md-title-remainder"] + ' '); + html.push('' + hit["md-title-remainder"] + ' '); + if (hit["md-author"] != undefined) { + html.push(''+hit["md-author"]+' '); + } + else if (hit["md-title-responsibility"] !== undefined) { + html.push(''+hit["md-title-responsibility"]+' '); } } if (hit.recid == curDetRecId) { @@ -611,8 +614,8 @@ function renderDetails(data, marker) if (data["md-title-remainder"] !== undefined) { details += ' : ' + data["md-title-remainder"] + ' '; } - if (data["md-title-responsibility"] !== undefined) { - details += ' '+ data["md-title-responsibility"] +''; + if (data["md-author"] !== undefined) { + details += ' '+ data["md-auhtor"] +''; } details += ''; } @@ -669,7 +672,9 @@ function renderDetails_iphone(data, marker) if (data["md-title-remainder"] !== undefined) { details += ' ' + data["md-title-remainder"] + ' '; } - if (data["md-title-responsibility"] !== undefined) { + if (data["md-author"] !== undefined) { + details += ''+ data["md-author"] +''; + } else if (data["md-title-responsibility"] !== undefined) { details += ''+ data["md-title-responsibility"] +''; } details += ''