From 5ed48e8ede19889c8bf219633b8f9f55accd9530 Mon Sep 17 00:00:00 2001 From: Mike Taylor Date: Thu, 3 Apr 2014 17:05:26 +0100 Subject: [PATCH] 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. --- src/mkws-widgets.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- 1.7.10.4