From: Dennis Schafroth Date: Tue, 25 Oct 2011 11:03:02 +0000 (+0200) Subject: Merge branch 'master' of ssh://git.indexdata.com/home/git/pub/pazpar2 X-Git-Tag: v1.6.4~5 X-Git-Url: http://lists.indexdata.com/cgi-bin?a=commitdiff_plain;h=9fc82783ae2b4f497d7554bb7ed718729e2c683a;hp=1e8adcca70828544df65770652d86e7d828a5795;p=pazpar2-moved-to-github.git Merge branch 'master' of ssh://git.indexdata.com/home/git/pub/pazpar2 --- diff --git a/www/iphone/UiUIKit/stylesheets/iphone.css b/www/iphone/UiUIKit/stylesheets/iphone.css index 8bcbc3c..23e48ff 100644 --- a/www/iphone/UiUIKit/stylesheets/iphone.css +++ b/www/iphone/UiUIKit/stylesheets/iphone.css @@ -219,7 +219,7 @@ ul li { color: #666; - border-top: 1px solid #B4B4B4; + border-top: 0px; list-style-type: none; padding: 10px 10px 10px 10px; } @@ -229,7 +229,7 @@ /* when you have a first LI item on any list */ li:first-child { - border-top: 0; + border-top: 0px; -webkit-border-top-left-radius: 8px; -webkit-border-top-right-radius: 8px; } diff --git a/www/iphone/example_client.js b/www/iphone/example_client.js index 9761e83..e6af70c 100644 --- a/www/iphone/example_client.js +++ b/www/iphone/example_client.js @@ -5,14 +5,14 @@ // then register the form submit event with the pz2.search function // autoInit is set to true on default var usesessions = true; -var pazpar2path = '/pazpar2/search.pz2'; +var pazpar2path = '/service-proxy/'; var showResponseType = ''; var querys = {'su': '', 'au': '', 'xt': ''}; - -if (document.location.hash == '#useproxy' || document.location.search.match("useproxy=true")) { +var showResponseType = 'json'; +if (document.location.hash == '#pazpar2' || document.location.search.match("useproxy=false")) { usesessions = false; - pazpar2path = '/service-proxy/'; - showResponseType = 'json'; + pazpar2path = '/pazpar2/search.pz2'; + showResponseType = 'xml'; } @@ -98,7 +98,7 @@ function loggedIn() { } function auth_check() { - auth.check(loggedIn, login, true); + auth.check(loggedIn, login); domReady(); } @@ -124,6 +124,8 @@ function my_onshow(data) { var results = document.getElementById("results"); var html = []; + if (data.hits == undefined) + return ; for (var i = 0; i < data.hits.length; i++) { var hit = data.hits[i]; html.push('
  • ' @@ -335,19 +337,22 @@ function domReady () function applicationMode(newmode) { - var searchdiv = document.getElementById("searchForm"); - if (newmode) - inApp = newmode; - if (inApp) { + var searchdiv = document.getElementById("searchForm"); + if (newmode) + inApp = newmode; + if (inApp) { document.getElementById("heading").style.display="none"; searchdiv.style.display = 'none'; - } - else { - document.getElementById("nav").style.display=""; - searchdiv.style.display = ''; - document.search.onsubmit = onFormSubmit; - } - callback.init(); + } + else { + + document.getElementById("nav").style.display=""; + document.getElementById("normal").style.display="inline"; + document.getElementById("normal").style.visibility=""; + searchdiv.style.display = ''; + document.search.onsubmit = onFormSubmit; + } + callback.init(); } // when search button pressed function onFormSubmitEventHandler() @@ -396,14 +401,14 @@ function limitQuery(field, value) showhide("recordview"); } -//limit the query after clicking the facet +// limit the query after clicking the facet function removeQuery (field, value) { document.search.query.value.replace(' and ' + field + '="' + value + '"', ''); onFormSubmitEventHandler(); showhide("recordview"); } -//limit the query after clicking the facet +// limit the query after clicking the facet function limitOrResetQuery (field, value, selected) { if (field == 'reset_su' || field == 'reset_au') { var reset_field = field.substring(6); diff --git a/www/iphone/index.html b/www/iphone/index.html index adfd5de..47fe8d1 100644 --- a/www/iphone/index.html +++ b/www/iphone/index.html @@ -30,8 +30,8 @@ - - + +