<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>
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){
writeGooglePlusEvents(data, gpluscontainer);
});
{
//old URI: //grical.realraum.at/s/?query=!realraum&limit=9&view=json
var calcontainer=document.getElementById("grical_upcoming");
- calcontainer.innerHTML="Calendar loading ...<br/>please wait a second or two";
$.getJSON('/shmcache/grical_realraum.json', function(data){
writeCalendar(data, calcontainer);
});
alert("Error: " + textStatus);
}
+function IsImageOk(img) {
+ if (!img.complete) {
+ return false;
+ }
+ if (typeof img.naturalWidth != "undefined" && img.naturalWidth == 0) {
+ return false;
+ }
+ return true;
+}
+
function reloadImg(element)
{
//var image = document.getElementById("theText");
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);
+ if (IsImageOk(new_image))
+ {
+ element.parentNode.insertBefore(new_image,element);
+ element.parentNode.removeChild(element);
+ }
}
}