<title>Realraum Kiosk Seite</title>
<script src="/jquery.min.js"></script>
<!--script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script-->
+ <script type="text/javascript" src="gplusapikey.js"></script>
<script type="text/javascript" src="kiosk.js"></script>
<link rel="stylesheet" href="kiosk.css" type="text/css" />
</head>
<div id="headerphoto" class="headerphoto">
<img class="headerphoto" src="http://realraum.at/wiki/lib/exe/fetch.php?media=xro:realraum_hdr.jpg"></img>
</div>
- <div class="calendars">
- <div class="calendar" style="float:left;">
+ <div class="calendar" style="float:left;">
<p class="topic">Upcoming Events</p>
<div id="grical_upcoming">Loading calendar ...</div>
- </div>
- <!--div class="calendar" style="float:right;">
- <p class="topic">Previous Events</p>
- <div id="grical_previous">Loading Old Events ...</div>
- </div-->
</div>
- <!-- Door and Presence Status ------------------------ -->
- <br/>
<!-- Sensor Data ------------------------ -->
+ <table border="0" cellpadding="0" cellspacing="0"><tr>
+ <td style="vertical-align:top;">
<div class="sensorgraphs">
<p class="topic">Sensor Data</p>
<div class="sensorelem">
<tr><td id="sensor_status" style="border:1px solid black; margin-top:5px;">Loading ...</td></tr>
</table>
</div>
- <!--div class="sensorelem">
+ <div class="sensorelem">
<img id="tempsensor" class="sensorimg" src="http://realraum.at/get_sensor.php?sensor=temp"/>
- </div-->
+ </div>
<div class="sensorelem">
<img id="lightsensor" class="sensorimg" src="http://realraum.at/get_sensor.php?sensor=light"/>
</div>
<img id="movementsensor" class="sensorimg" src="http://realraum.at/get_sensor.php?sensor=movement"/>
</div>
</div>
+
+ </td><td style="vertical-align:top;">
+
+ <div class="gpluswall">
+ <p class="topic">Google+</p>
+ <div id="gplusevents">G Plus Events</div>
+ </div>
+ </td></tr>
+ </table>
</body>
</html>
+function writeGooglePlusEvents(data, elem)
+{
+ var ghtml = "";
+ for (var i=0; i< data.items.length; i++)
+ {
+ var item = data.items[i];
+ var noteobj = item.object;
+ var attach = noteobj.attachments;
+ var notetxt = noteobj.content;
+ var noteimg = false;
+ if (attach)
+ {
+ for (var a=0; a<attach.length; a++)
+ {
+ if ( attach[a].objectType == "photo")
+ {
+ noteimg = attach[a].image.url;
+ }
+ else if (attach[a].objectType == "event")
+ {
+ notetxt = "<b>" + attach[a].displayName+"</b><br/>"+notetxt;
+ }
+ }
+ }
+ ghtml += '<div class="gpluspost">'
+ ghtml += '<img class="gplusactor" src="'+item.actor.image.url+'"/><p class="gplustimestamp">'+item.updated+'</p>';
+ ghtml += '<p class="gplustxt">'+notetxt+'</p>';
+ if (noteimg)
+ {
+ ghtml += '<p class="gplusimg"><img class="gplusimg" src="'+noteimg+'"/></p>';
+ }
+ ghtml += '</div>';
+ }
+ elem.innerHTML=ghtml;
+}
+
+
+function loadGooglePlusEvents()
+{
+ var gplusuri = "https://www.googleapis.com/plus/v1/people/113737596421797426873/activities/public?maxResults=3&key="+gplusapikey;
+ var gpluscontainer=document.getElementById("gplusevents");
+ gpluscontainer.innerHTML="Plus loading ...";
+ $.getJSON(gplusuri, function(data){
+ writeGooglePlusEvents(data, gpluscontainer);
+ });
+}
+
function writeCalendar(data, elem)
{
}
when = data[s].start +", "+stime+" Uhr";
}
- calhtml += '<li class="level1"><div class="li">'+when+' - <a href="'+data[s].url+'" class="urlextern" title="'+data[s].title+'" rel="nofollow">'+data[s].title+'</a></div></li>'+"\n";
+ calhtml += '<li class="level1"><span class="r3red">'+when+'</span> - '+data[s].title+'</li>'+"\n";
}
elem.innerHTML='<ul>'+calhtml+'</ul>';
}
function updateSensors()
{
- //reloadImg(document.getElementById("tempsensor"));
+ reloadImg(document.getElementById("tempsensor"));
reloadImg(document.getElementById("movementsensor"));
reloadImg(document.getElementById("lightsensor"));
}
setInterval("clock()", 500);
updateAnwesenheitStatus();
loadCalendar();
+ loadGooglePlusEvents();
setInterval("updateAnwesenheitStatus()", 10000);
setInterval("loadCalendar()", 100000);
setInterval("updateSensors()", 50000);
+ setInterval("loadGooglePlusEvents()", 3600*1000);
});
function updateDateClock(now)
var new_image = new Image();
//set up the new image
new_image.id = element.id;
+ new_image.className = element.className;
new_image.src = element.src;
element.parentNode.insertBefore(new_image,element);
element.parentNode.removeChild(element);