From: Mike Taylor Date: Tue, 11 Nov 2014 09:41:38 +0000 (+0000) Subject: The "records" widget supports the new optional "summary-template" X-Git-Tag: 1.0.0~23 X-Git-Url: http://git.indexdata.com/?p=mkws-moved-to-github.git;a=commitdiff_plain;h=b615b65c020b96643f2c3d4900a73cc4c982e0ce The "records" widget supports the new optional "summary-template" setting, which tells it to use a template other than the default "template" when rendering summary records. For example,
will render all records in detailed view. --- diff --git a/src/mkws-widget-main.js b/src/mkws-widget-main.js index 70c45e2..c1a58ef 100644 --- a/src/mkws-widget-main.js +++ b/src/mkws-widget-main.js @@ -128,7 +128,7 @@ mkws.registerWidgetType('records', function() { } } var template = team.loadTemplate(that.config.template || "records"); - var summaryPartial = team.loadTemplate("summary"); + var summaryPartial = team.loadTemplate(that.config['summary-template'] || "summary"); var tdata = $.extend({}, {"hits": data.hits}, that.config.template_vars); that.node.html(template(tdata, {"partials":{"summary":summaryPartial}})); });