From 4c6f9a1f806b78e332cd5712d37f72f20ac79567 Mon Sep 17 00:00:00 2001 From: Wolfram Schneider Date: Mon, 1 Jul 2013 13:15:39 +0000 Subject: [PATCH] on first page, hide the termlist and start displaying it after results are back --- experiments/spclient/index-mobile.html | 2 +- experiments/spclient/mkws.js | 11 ++++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/experiments/spclient/index-mobile.html b/experiments/spclient/index-mobile.html index 7fc9924..e73267b 100644 --- a/experiments/spclient/index-mobile.html +++ b/experiments/spclient/index-mobile.html @@ -18,7 +18,7 @@ sort_default: "relevance", query_width: 50, responsive_design: true, - facets: ["sources", "subjects", "authors"], + facets: ["authors", "sources", "subjects"], perpage_default: 20 }; diff --git a/experiments/spclient/mkws.js b/experiments/spclient/mkws.js index ae807e1..d168a34 100644 --- a/experiments/spclient/mkws.js +++ b/experiments/spclient/mkws.js @@ -158,8 +158,14 @@ function my_onstat(data) { } function my_onterm(data) { - if (!mkws_config.facets || mkws_config.facets.length == 0) + // no facets + if (!mkws_config.facets || mkws_config.facets.length == 0) { + $("#termlist").parent().hide(); return; + } + + // display if we first got results + $("#termlist").parent().show(); var termlists = []; termlists.push('
' + M('Termlists') + '
'); @@ -558,6 +564,9 @@ function mkws_html_all(config) { mkws_service_proxy_auth(config.service_proxy_auth); domReady(); + + // on first page, hide the termlist + $(document).ready(function() { $("#termlist").parent().hide(); } ); } function mkws_set_lang(mkws_config) { -- 1.7.10.4