From: Dennis Schafroth Date: Mon, 28 Jun 2010 11:13:37 +0000 (+0200) Subject: Show user displayname in Logout link. Remove a logging statement. X-Git-Tag: v1.4.4~50 X-Git-Url: http://jsfdemo.indexdata.com/cgi-bin?a=commitdiff_plain;h=c5fc96208c7400d6bb8a7e75dd74a0e5ae4f6490;p=pazpar2-moved-to-github.git Show user displayname in Logout link. Remove a logging statement. --- diff --git a/www/iphone/example_client.js b/www/iphone/example_client.js index b24561f..9761e83 100644 --- a/www/iphone/example_client.js +++ b/www/iphone/example_client.js @@ -15,8 +15,6 @@ if (document.location.hash == '#useproxy' || document.location.search.match("use showResponseType = 'json'; } -if (this.JSON ) - alert("Native JSON support"); my_paz = new pz2( { "onshow": my_onshow, "showtime": 500, //each timer (show, stat, term, bytarget) can be specified this way @@ -95,7 +93,8 @@ function logInOrOut() { } function loggedIn() { var login = document.getElementById("login"); - login.innerHTML = 'Logout'; + login.innerHTML = 'Logout(' + auth.displayName + ')'; + document.getElementById("log").innerHTML = login.innerHTML; } function auth_check() { @@ -268,7 +267,6 @@ function my_onterm_iphone(data) { authors = authors + "au" + "|" + data.author[i].name + "|" + data.author[i].freq + "\n"; } termlist["authors"] = authors; - //document.getElementById("log").innerHTML = targets + "\n" + subjects + "\n" + authors; callback.send("termlist", "refresh"); } @@ -622,7 +620,8 @@ function renderDetails_iphone(data, marker) { //return renderDetails(data,marker); - + if (!data) + return ""; var details = '
' /* details = '