Individual terms within a facet are wrapped in <div class="term">
authorMike Taylor <mike@indexdata.com>
Wed, 10 Jul 2013 14:57:34 +0000 (15:57 +0100)
committerMike Taylor <mike@indexdata.com>
Wed, 10 Jul 2013 14:57:34 +0000 (15:57 +0100)
It should now be possible to style termlists as tables.

tools/htdocs/mkws.js

index f4124b4..7625589 100644 (file)
@@ -204,6 +204,7 @@ function add_single_facet(acc, caption, data, max, cclIndex) {
     acc.push('<div class="facet">');
     acc.push('<div class="termtitle">' + M(caption) + '</div>');
     for (var i = 0; i < data.length && i < max; i++ ) {
+       acc.push('<div class="term">');
         acc.push('<a href="#" ');
        var action;
        if (!cclIndex) {
@@ -214,7 +215,8 @@ function add_single_facet(acc, caption, data, max, cclIndex) {
            action = 'limitQuery(\'' + cclIndex + '\', this.firstChild.nodeValue)';
        }
        acc.push('onclick="' + action + ';return false;">' + data[i].name + '</a>'
-                + '<span> (' + data[i].freq + ')</span><br/>');
+                + '<span> (' + data[i].freq + ')</span>');
+       acc.push('</div>');
     }
     acc.push('</div>');
 }