From: Mike Taylor Date: Wed, 27 Nov 2013 11:49:59 +0000 (+0000) Subject: Simplify order of text accumulation. X-Git-Tag: 0.9.1~148^2~44 X-Git-Url: http://git.indexdata.com/?p=mkws-moved-to-github.git;a=commitdiff_plain;h=03fc65535a2ae809c2d38e5b7b6af42c5927d239 Simplify order of text accumulation. --- diff --git a/tools/htdocs/mkws.js b/tools/htdocs/mkws.js index 15157a7..05d50b5 100644 --- a/tools/htdocs/mkws.js +++ b/tools/htdocs/mkws.js @@ -640,20 +640,21 @@ function replaceHtml(el, html) { function renderDetails(data, marker) { - var details = '
'; - if (mkws.templateRecord === undefined) { maybeLoadTemplate("Record"); } + var details; if (mkws.templateRecord) { var template = mkws.templateRecord; - details += template(data); + details = template(data); } else { - details += defaultRenderDetails(data, marker); + details = defaultRenderDetails(data, marker); } + details = '
' + details; details += '
'; + return details; }