Widget facets now render (using toString) with the facet-name included.
authorMike Taylor <mike@indexdata.com>
Thu, 1 May 2014 14:01:00 +0000 (15:01 +0100)
committerMike Taylor <mike@indexdata.com>
Thu, 1 May 2014 14:01:00 +0000 (15:01 +0100)
src/mkws-widget-termlists.js

index 33d12b9..3ea68f5 100644 (file)
@@ -35,6 +35,10 @@ mkws.registerWidgetType('Facet', function() {
     var max = ref[1];
     var pzIndex = ref[2] ? name : null;
 
+    that.toString = function() {
+       return '[Widget ' + that.team.name() + ':' + that.type + '(' + name + ')]';
+    };
+
     that.team.queue("termlists").subscribe(function(data) {
        data = data[name];