From c5fc96208c7400d6bb8a7e75dd74a0e5ae4f6490 Mon Sep 17 00:00:00 2001 From: Dennis Schafroth Date: Mon, 28 Jun 2010 13:13:37 +0200 Subject: [PATCH] Show user displayname in Logout link. Remove a logging statement. --- www/iphone/example_client.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) 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 = '