configurable responsive web design
authorWolfram Schneider <wosch@indexdata.dk>
Tue, 2 Jul 2013 12:54:49 +0000 (12:54 +0000)
committerWolfram Schneider <wosch@indexdata.dk>
Tue, 2 Jul 2013 12:54:49 +0000 (12:54 +0000)
responsive_design_width: 980, /* a page with less pixel width considered as mobile */

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

index d9ca35f..5de7bf5 100644 (file)
@@ -18,6 +18,7 @@
                query_width: 50,
                responsive_design: true,
                facets: ["authors", "sources", "subjects"],
+               responsive_design_width: 990,
                perpage_default: 20
         };
     </script>
index 9d6f28d..8340905 100644 (file)
@@ -502,9 +502,11 @@ function mkws_html_all(config) {
        lang_menu: true,        /* show/hide language menu */
        lang_display: [],       /* display languages links for given languages, [] for all */
        facets: ["sources", "subjects", "authors"], /* display facets, in this order, [] for none */
+       responsive_design_width: 980, /* a page with less pixel width considered as mobile */   
 
        debug: 0,     /* debug level for development: 0..2 */
 
+
        dummy: "dummy"
     };
 
@@ -742,7 +744,9 @@ function mkws_mobile_resize () {
     var obj;
     // alert($(window).width());
 
-    if ($(window).width() <= 980) {
+    var width = mkws_config.responsive_design_width || 980;
+
+    if ($(window).width() <= width) {
        for(var i = 0; i < list.length; i++) {
            $("#" + list[i]).hide();
        }