Switch and Lang widgets hide themselves when the window is narrow.
authorMike Taylor <mike@indexdata.com>
Thu, 1 May 2014 16:02:02 +0000 (17:02 +0100)
committerMike Taylor <mike@indexdata.com>
Thu, 1 May 2014 16:02:02 +0000 (17:02 +0100)
src/mkws-widget-main.js

index e7bacd7..573eb04 100644 (file)
@@ -228,6 +228,7 @@ mkws.registerWidgetType('Switch', function() {
 <a href="#" onclick="mkws.switchView(\'' + tname + '\', \'records\')">Records</a><span> \
 | \
 </span><a href="#" onclick="mkws.switchView(\'' + tname + '\', \'targets\')">Targets</a>');
+    widget.hideWhenNarrow(this);
 });
 
 
@@ -381,6 +382,7 @@ mkws.registerWidgetType('Lang', function() {
     }
 
     $(this.node).html(data);
+    widget.hideWhenNarrow(this);
 
 
     // set or re-set "lang" URL parameter