From: Mike Taylor Date: Wed, 20 Nov 2013 16:49:29 +0000 (+0000) Subject: Rename variable. X-Git-Tag: 0.9.1~148^2~68 X-Git-Url: http://lists.indexdata.dk/cgi-bin?a=commitdiff_plain;h=0afab23ce298ced8796a4762d1e9bb0bfb0703f9;p=mkws-moved-to-github.git Rename variable. --- diff --git a/tools/htdocs/mkws.js b/tools/htdocs/mkws.js index eb88ebd..3769422 100644 --- a/tools/htdocs/mkws.js +++ b/tools/htdocs/mkws.js @@ -557,9 +557,9 @@ function renderDetails(data, marker) var details = '
'; if (marker) details += ''; - var sources = []; + var locations = []; for (var i in data.location) { - sources.push(data.location[i]['@name']); + locations.push(data.location[i]['@name']); } details += renderField("Title", data["md-title"], data["md-title-remainder"], data["md-title-responsibility"]); @@ -567,12 +567,12 @@ function renderDetails(data, marker) details += renderField("Author", data["md-author"]); details += renderField("URL", data["md-electronic-url"]); details += renderField("Subject", data["location"][0]["md-subject"]); - if (sources.length == 0) { + if (locations.length == 0) { details += ''; - } else if (sources.length == 1) { - details += renderField("Location", sources); + } else if (locations.length == 1) { + details += renderField("Location", locations); } else { - details += renderField("Locations", sources); + details += renderField("Locations", locations); } details += '
'+ marker + '
No locations for record!
';