From: Dennis Schafroth Date: Wed, 2 Jun 2010 12:50:27 +0000 (+0200) Subject: Added method to set iPhone App mode X-Git-Tag: v1.4.2~7^2~36 X-Git-Url: http://sru.miketaylor.org.uk/cgi-bin?a=commitdiff_plain;h=9dcc2862e93637695e496fd11fe0c69762baa06a;p=pazpar2-moved-to-github.git Added method to set iPhone App mode --- diff --git a/www/iphone/example_client.js b/www/iphone/example_client.js index b728f95..cfae8ed 100644 --- a/www/iphone/example_client.js +++ b/www/iphone/example_client.js @@ -37,7 +37,6 @@ var SourceMax = 16; var SubjectMax = 10; var AuthorMax = 10; var tab = "recordview"; -var inApp = false; // @@ -277,10 +276,24 @@ function domReady () document.search.query.value = ''; document.select.sort.onchange = onSelectDdChange; document.select.perpage.onchange = onSelectDdChange; - if (!inApp) - document.getElementById("heading").style.display=""; + applicationMode(true); +} + +function applicationMode(newmode) +{ + var searchdiv = document.getElementById("searchForm"); + if (newmode) + inApp = newmode; + if (inApp) { + document.getElementById("heading").style.display="none"; + searchdiv.style.display = 'none'; + } + else { + searchdiv.style.display = ''; + document.search.onsubmit = onFormSubmit; + } + callback.init(); } - // when search button pressed function onFormSubmitEventHandler() {