workarounds for IE8
authorWolfram Schneider <wosch@indexdata.dk>
Fri, 21 Jun 2013 10:47:59 +0000 (10:47 +0000)
committerWolfram Schneider <wosch@indexdata.dk>
Fri, 21 Jun 2013 10:47:59 +0000 (10:47 +0000)
IE8 cannot handle JS object keys with the name 'switch'

experiments/spclient/index.html
experiments/spclient/mkws.js

index e9f32ad..e7738c3 100644 (file)
@@ -12,7 +12,7 @@
                lang: "en",
                debug: 1,
                use_service_proxy: true,
-               switch: true, 
+               switch_menu: true, 
                sort_default: "relevance",
                perpage_default: 20
         }; 
index 82b431b..a45600d 100644 (file)
@@ -437,7 +437,7 @@ function mkws_html_all(data) {
        sort_default: "relevance",
        perpage_default: 20,
        query_width: 50,
-       switch: true, /* show/hide Records|Targets menu */
+       switch_menu: true, /* show/hide Records|Targets menu */
        debug: 0,     /* debug level for development: 0..2 */
 
        dummy: "dummy"
@@ -532,8 +532,8 @@ function mkws_html_switch(config) {
       </div>');
     $("#mkwsTargets").css("display", "none");
 
-    if (!config.switch) {
-       debug("disable switch");
+    if (!config.switch_menu) {
+       debug("disable switch menu");
         $("#mkwsSwitch").css("display", "none");
     }
 }