torusquery selects targets by category.
[mkws-moved-to-github.git] / src / mkws-widgets.js
index da20ce5..17ecdab 100644 (file)
@@ -257,8 +257,7 @@ mkws.registerWidgetType('Records', function() {
        }
        $(that.node).html(html.join(''));
 
-       function renderSummary(hit)
-       {
+       function renderSummary(hit) {
            var template = team.loadTemplate("Summary");
            hit._id = team.recordElementId(hit.recid[0]);
            hit._onclick = "mkws.showDetails('" + team.name() + "', '" + hit.recid[0] + "');return false;"
@@ -289,13 +288,16 @@ mkws.registerWidgetType('Records', function() {
            var sortOrder = that.config.sort;
            var perpage = that.config.perpage;
            var targets = that.config.targets;
+           var torusquery = that.config.torusquery;
+           that.log("torusquery='" + torusquery + "'");
            var s = "running auto search: '" + query + "'";
            if (sortOrder) s += " sorted by '" + sortOrder + "'";
            if (perpage) s += " with " + perpage + " per page";
            if (targets) s += " in targets '" + targets + "'";
+           if (torusquery) s += " limited by torusquery '" + torusquery + "'";
            that.log(s);
 
-           that.team.newSearch(query, sortOrder, perpage, targets);
+           that.team.newSearch(query, sortOrder, perpage, targets, torusquery);
        });
     }
 });