From: Bernhard Tittelbach Date: Wed, 17 Apr 2013 12:37:20 +0000 (+0000) Subject: raspberry kiosk date string X-Git-Url: https://git.realraum.at/?a=commitdiff_plain;h=8110e4afe4bf6aee1f19740bd9482a502cdb8d3c;p=svn42.git raspberry kiosk date string --- diff --git a/raspberry-kiosk/kiosk.css b/raspberry-kiosk/kiosk.css index 5832093..59b7238 100644 --- a/raspberry-kiosk/kiosk.css +++ b/raspberry-kiosk/kiosk.css @@ -69,7 +69,7 @@ p.topic { div.calendar { display:block; width: 100%; - height: 16em; + height: 13em; margin-top:10px; margin-left:0px; margin-right:0px; diff --git a/raspberry-kiosk/kiosk.js b/raspberry-kiosk/kiosk.js index b090f24..512a337 100644 --- a/raspberry-kiosk/kiosk.js +++ b/raspberry-kiosk/kiosk.js @@ -37,7 +37,8 @@ function writeGooglePlusEvents(data, elem) function loadGooglePlusEvents() { - var gplusuri = "https://www.googleapis.com/plus/v1/people/113737596421797426873/activities/public?maxResults=3&key="+gplusapikey; + var gpak = "AIzaSyD9xBFM-KWwSYBgZ8VzftJ5wYYvurOxEHg"; + var gplusuri = "https://www.googleapis.com/plus/v1/people/113737596421797426873/activities/public?maxResults=4&key="+gpak; var gpluscontainer=document.getElementById("gplusevents"); gpluscontainer.innerHTML="Plus loading ..."; $.getJSON(gplusuri, function(data){ @@ -64,9 +65,10 @@ function writeCalendar(data, elem) { stime=stime.substring(0,stime.length-3); } - when = data[s].start +", "+stime+" Uhr"; + if (stime.length <= 2) { stime+="h"; } + when = data[s].start.substring(8,10)+"."+data[s].start.substring(5,7) +", "+stime; } - calhtml += '
  • '+when+' - '+data[s].title+'
  • '+"\n"; + calhtml += '
  • '+when+' - '+data[s].title+'
  • '+"\n"; } elem.innerHTML=''; }