The "Record" widget publishes a "record" widget with the data from
authorMike Taylor <mike@indexdata.com>
Fri, 25 Apr 2014 16:04:34 +0000 (17:04 +0100)
committerMike Taylor <mike@indexdata.com>
Fri, 25 Apr 2014 16:04:34 +0000 (17:04 +0100)
each individual record that it's about to render. Useful mostly for
logging.

src/mkws-widgets.js

index cd9e45d..517850b 100644 (file)
@@ -237,6 +237,7 @@ mkws.registerWidgetType('Records', function() {
        var html = [];
        for (var i = 0; i < data.hits.length; i++) {
            var hit = data.hits[i];
+            that.team.queue("record").publish(hit);
            var divId = team.recordElementId(hit.recid[0]);
            html.push('<div class="record mkwsTeam_' + team.name() + ' ' + divId + '">', renderSummary(hit), '</div>');
            // ### At some point, we may be able to move the