- debug("running auto search: '" + query + "' sorted by '" + sort + "'");
- // ### currently ignoring sort
- newSearch(query);
+ var targets = node.attr('targets');
+ var s = "running auto search: '" + query + "'";
+ if (sort) s += " sorted by '" + sort + "'";
+ if (targets) s += " in targets '" + targets + "'";
+ debug(s);
+ newSearch(query, sort, targets);