From 57eeec560a0bf4fed38e8d61a25df8d222f708eb Mon Sep 17 00:00:00 2001 From: Wolfram Schneider Date: Tue, 2 Jul 2013 12:54:49 +0000 Subject: [PATCH] configurable responsive web design responsive_design_width: 980, /* a page with less pixel width considered as mobile */ --- experiments/spclient/index-mobile.html | 1 + experiments/spclient/mkws.js | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/experiments/spclient/index-mobile.html b/experiments/spclient/index-mobile.html index d9ca35f..5de7bf5 100644 --- a/experiments/spclient/index-mobile.html +++ b/experiments/spclient/index-mobile.html @@ -18,6 +18,7 @@ query_width: 50, responsive_design: true, facets: ["authors", "sources", "subjects"], + responsive_design_width: 990, perpage_default: 20 }; diff --git a/experiments/spclient/mkws.js b/experiments/spclient/mkws.js index 9d6f28d..8340905 100644 --- a/experiments/spclient/mkws.js +++ b/experiments/spclient/mkws.js @@ -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(); } -- 1.7.10.4