Add another Handlebars helper, "compare".
[mkws-moved-to-github.git] / src / mkws-team.js
index c88d58b..c26d2c3 100644 (file)
@@ -88,9 +88,6 @@ mkws.makeTeam = function($, teamName) {
     that.queue("log").publish(m_teamName, timestamp, s);
   }
 
-  // ### transitional placeholder function until we have promoted all invocations
-  that.log = function (x) { _log(mkws.log, x) };
-
   that.trace = function(x) { _log(mkws.trace, x) };
   that.debug = function(x) { _log(mkws.debug, x) };
   that.info = function(x) { _log(mkws.info, x) };
@@ -176,7 +173,7 @@ mkws.makeTeam = function($, teamName) {
       params.onbytarget = onBytarget;
       that.info("setting bytarget callback");
     }
-    if (m_queues.stat) {
+    if (m_queues.stat || m_queues.firstrecords || m_queues.complete) {
       params.onstat = onStat;
       that.info("setting stat callback");
     }
@@ -309,7 +306,6 @@ mkws.makeTeam = function($, teamName) {
 
   function triggerSearch(query, sortOrder, maxrecs, perpage, limit, targets, torusquery) {
     resetPage();
-    queue("navi").publish();
 
     // Continue to use previous query/sort-order unless new ones are specified
     if (query) m_query = query;
@@ -337,6 +333,7 @@ mkws.makeTeam = function($, teamName) {
         "pp2filter = " + pp2filter + ", params = " + $.toJSON(params));
 
     m_paz.search(m_query, m_perpage, m_sortOrder, pp2filter, undefined, params);
+    queue("searchtriggered").publish();
   }
 
   // fetch record details to be retrieved from the record queue
@@ -426,7 +423,7 @@ mkws.makeTeam = function($, teamName) {
 
   that.registerTemplate = function(name, text) {
     if(mkws._old2new.hasOwnProperty(name)) {
-      that.warn("Warning: registerTemplate old widget name: " + name + " => " + mkws._old2new[name]);
+      that.warn("registerTemplate: old widget name: " + name + " => " + mkws._old2new[name]);
       name = mkws._old2new[name];
     }
     m_templateText[name] = text;
@@ -435,7 +432,7 @@ mkws.makeTeam = function($, teamName) {
 
   function loadTemplate(name, fallbackString) {
     if(mkws._old2new.hasOwnProperty(name)) {
-       that.warn("Warning loadTemplate: old widget name: " + name + " => " + mkws._old2new[name]);
+       that.warn("loadTemplate: old widget name: " + name + " => " + mkws._old2new[name]);
        name = mkws._old2new[name];
     }
 
@@ -502,8 +499,7 @@ mkws.makeTeam = function($, teamName) {
       }
     }
     return undefined;
-  }
-
+  };
 
   return that;
 };