Move termlist hiding to CSS MKWS-258
authorJason Skomorowski <jason@indexdata.com>
Tue, 7 Oct 2014 19:14:21 +0000 (15:14 -0400)
committerJason Skomorowski <jason@indexdata.com>
Tue, 7 Oct 2014 19:14:21 +0000 (15:14 -0400)
src/mkws-widget-termlists.js
tools/htdocs/mkws.css

index 8f6e467..43737c1 100644 (file)
@@ -2,11 +2,8 @@ mkws.registerWidgetType('Termlists', function() {
   // Initially hide the termlists; display when we get results
   var that = this;
   var team = this.team;
-  mkws.$(document).ready(function() {
-    that.node.hide();
-  });
   team.queue("termlists").subscribe(function(data) {
-    that.node.show();
+    that.node.addClass("active");
   });
 
   var template = team.loadTemplate(this.config.template || "Termlists");
index c21ed17..cb5f2e7 100644 (file)
     background: #d0e0ff;
     padding: 0.7em;
     font-size: small;
+    display: none;
 
     border-top-right-radius: 10px;
     -moz-border-top-right-radius: 10px;
     -webkit-border-top-right-radius: 10px;
 }
 
+.mkwsTermlists.active {
+    display: block;
+}
+
 .mkwsFacet {
     background: #e0f0ff;
     padding: 0.7em;