From: Mike Taylor Date: Thu, 3 Apr 2014 16:05:26 +0000 (+0100) Subject: Summary template name is taken from that.config.template if provided X-Git-Tag: 1.0.0~1060 X-Git-Url: http://jsfdemo.indexdata.com/?a=commitdiff_plain;h=5ed48e8ede19889c8bf219633b8f9f55accd9530;p=mkws-moved-to-github.git Summary template name is taken from that.config.template if provided (falling back to the old default of "Summary"). Allows multiple records widgets to display different formats. --- diff --git a/src/mkws-widgets.js b/src/mkws-widgets.js index 312bfab..0f58002 100644 --- a/src/mkws-widgets.js +++ b/src/mkws-widgets.js @@ -304,7 +304,7 @@ mkws.registerWidgetType('Records', function() { $(that.node).html(html.join('')); function renderSummary(hit) { - var template = team.loadTemplate("Summary"); + var template = team.loadTemplate(that.config.template || "Summary"); hit._id = team.recordElementId(hit.recid[0]); hit._onclick = "mkws.showDetails('" + team.name() + "', '" + hit.recid[0] + "');return false;" return template(hit);