Part of ACREP-80: new 'widget' parameter to team.newSearch
[mkws-moved-to-github.git] / src / mkws-team.js
index e4645b2..3d48385 100644 (file)
@@ -288,7 +288,7 @@ mkws.makeTeam = function($, teamName) {
   that.resetPage = resetPage;
 
 
-  function newSearch(query, sortOrder, maxrecs, perpage, limit, targets, torusquery) {
+  function newSearch(widget, query, sortOrder, maxrecs, perpage, limit, targets, torusquery) {
     that.info("newSearch: " + query);
 
     if (config.use_service_proxy && !mkws.authenticated) {
@@ -306,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;
@@ -334,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
@@ -499,8 +499,7 @@ mkws.makeTeam = function($, teamName) {
       }
     }
     return undefined;
-  }
-
+  };
 
   return that;
 };