Remove switch_menu item from config object. After all, if the
authorMike Taylor <mike@indexdata.com>
Thu, 22 Aug 2013 16:08:24 +0000 (17:08 +0100)
committerMike Taylor <mike@indexdata.com>
Thu, 22 Aug 2013 16:08:24 +0000 (17:08 +0100)
mkwsSwitch div is not provided, it's not displayed.  It seems perverse
to have an application include that div, then add a config element
saying to ignore it! And equally perverse to add the div to an
existing page that lacks it, and not see it appear.

tools/htdocs/mkws.js

index 5053027..025fa8a 100644 (file)
@@ -524,7 +524,6 @@ function mkws_html_all(config) {
        sort_default: "relevance",
        perpage_default: 20,
        query_width: 50,
-       switch_menu: false,     /* show/hide Records|Targets menu */
        lang_menu: true,        /* show/hide language menu */
        sort_menu: true,        /* show/hide sort menu */
        perpage_menu: true,     /* show/hide perpage menu */
@@ -672,11 +671,6 @@ function mkws_html_switch(config) {
        No information available yet.\
       </div>');
     $("#mkwsTargets").css("display", "none");
-
-    if (!config.switch_menu) {
-       debug("disable switch menu");
-        $("#mkwsSwitch").css("display", "none");
-    }
 }
 
 function mkws_html_sort(config) {