Merge branch 'master' of ssh://git.indexdata.com/home/git/private/mkws
authorMike Taylor <mike@indexdata.com>
Fri, 6 Jun 2014 16:07:46 +0000 (17:07 +0100)
committerMike Taylor <mike@indexdata.com>
Fri, 6 Jun 2014 16:07:46 +0000 (17:07 +0100)
examples/htdocs/mike.html
src/mkws-widget.js

index 22e16d0..857df2b 100644 (file)
@@ -35,7 +35,7 @@
     <div class="mkwsProgress"></div>
     <div class="mkwsSearch"></div>
     <div class="mkwsRecords" autosearch="dinosaur"></div>
-    <div class="mkwsTermlists" autosearch="dinosaur"></div>
+    <div class="mkwsTermlists" autosearch="water"></div>
     <div class="mkwsTargets"></div>
     <div class="mkwsStat"></div>
     <div class="mkwsBuilder"></div>
index 33c977f..0c41a31 100644 (file)
@@ -95,8 +95,17 @@ function widget($, team, type, node) {
         }
       }
 
-      // Stash this for subsequent inspection
-      this.team.config().query = query;
+      var old = this.team.config().query;
+      if (!old) {
+        // Stash this for subsequent inspection
+        this.team.config().query = query;
+      } else if (old === query) {
+        this.log("duplicate autosearch: '" + query + "': ignoring");
+        return;
+      } else {
+        this.log("conflicting autosearch: '" + query + "' vs '" + old + "': ignoring");
+        return;
+      }
 
       this.team.queue("ready").subscribe(function() {
         // Postpone testing for the configuration items: these are not