From: Bernhard Tittelbach Date: Wed, 14 Aug 2013 21:34:08 +0000 (+0000) Subject: unified javascript for realraum pages X-Git-Url: https://git.realraum.at/?a=commitdiff_plain;h=0cfc9aa6adadf56be358775e6a5b8c8a280fc4e8;p=svn42.git unified javascript for realraum pages --- diff --git a/raspberry-kiosk/kiosk.css b/raspberry-kiosk/kiosk.css index 145920e..9aa7ff1 100644 --- a/raspberry-kiosk/kiosk.css +++ b/raspberry-kiosk/kiosk.css @@ -7,8 +7,6 @@ body { margin:0; background-color: #D0D0AF; overflow: hidden; - max-width:900px; - max-height:1440px; } div { @@ -43,6 +41,21 @@ div.headerphoto { margin-top:10px; } +img.headerphoto2 { + width:100%; + margin: -70px 0 0 0px; +} + +div.headerphoto2 { + display:block; + width: 100%; + height: 285px; + overflow: hidden; + padding: 0.1em 0; + text-align: center; + margin-top:10px; +} + div.contentborder, div.calendar, div.sensorgraphs, diff --git a/raspberry-kiosk/kiosk.html b/raspberry-kiosk/kiosk.html index 2aabd39..14645bf 100644 --- a/raspberry-kiosk/kiosk.html +++ b/raspberry-kiosk/kiosk.html @@ -3,12 +3,12 @@ Realraum Kiosk Seite - + - +
@@ -16,7 +16,7 @@

Veranstaltungskalender

-
Kalendar lädt ...
+
Kalendar lädt ...
@@ -25,7 +25,7 @@

Sensordaten

- +
Lädt ...
Lädt ...
Lädt ...
diff --git a/raspberry-kiosk/kiosk.js b/raspberry-kiosk/kiosk.js index 1553712..253b2d1 100644 --- a/raspberry-kiosk/kiosk.js +++ b/raspberry-kiosk/kiosk.js @@ -107,7 +107,7 @@ function weekday2str(dow) return ""; } -function calendarItemIterator(data) +function calendarItemEnhancer(data) { for (var s=0; s'+data[s].title+''+"\n"; - } + $.each(calendarItemEnhancer(data), function(index, itm) { + calhtml += '
  • '+itm.when+' - '+itm.title+'
  • '+"\n"; + }); calcontainer.innerHTML=''; }); } @@ -158,9 +157,9 @@ function loadCalendarMainPage() var calcontainer=document.getElementById("grical_upcoming"); $.getJSON('/shmcache/grical_realraum.json', function(data){ var calhtml = ""; - for (var itm in calendarItemIterator(data)) { - calhtml += '
  • '+"\n"; - } + $.each(calendarItemEnhancer(data), function(index, itm) { + calhtml += '
  • '+itm.when+' - '+itm.title+'
  • '+"\n"; + }); calcontainer.innerHTML=''; }); } @@ -181,8 +180,16 @@ function writeAnwesenheitStatus(data) iconuri=data.icon.closed; statuscolor="red"; } - html='
    '+data.status+'
    '; - document.getElementById('anwesenheit_status').innerHTML=html; + var anwesenheit_status_kiosk = document.getElementById('anwesenheit_status_kiosk'); + var anwesenheit_status_frontpage = document.getElementById('anwesenheit_status'); + if (anwesenheit_status_kiosk) + { + anwesenheit_status_kiosk.innerHTML='
    '+data.status+'
    '; + } + if (anwesenheit_status_frontpage) + { + anwesenheit_status_frontpage.innerHTML='
    '+data.status+'
    '; + } if (data.sensors) { @@ -342,13 +349,30 @@ function reloadImg(element) $(document).ready(function() { - updateDateClock(new Date()); - setInterval("clock()", 500); updateAnwesenheitStatus(); - loadCalendarKiosk(); - loadGooglePlusEvents(); - setInterval("updateAnwesenheitStatus()", 10*1000); - setInterval("loadCalendarKiosk()", 123*1000); - setInterval("updateSensors()",145*1000); - setInterval("loadGooglePlusEvents()", 1207*1000); + setInterval("updateAnwesenheitStatus()", 10*1000); + if (document.getElementById("dateclock")) + { + updateDateClock(new Date()); + setInterval("clock()", 500); + } + if (document.getElementById("grical_upcoming_kiosk")) + { + loadCalendarKiosk(); + setInterval("loadCalendarKiosk()", 123*1000); + } + if (document.getElementById("grical_upcoming")) + { + loadCalendarMainPage(); + setInterval("loadCalendarMainPage()", 123*1000); + } + if (document.getElementById("sensorgraphs")) + { + setInterval("updateSensors()",145*1000); + } + if (document.getElementById("gplusevents")) + { + loadGooglePlusEvents(); + setInterval("loadGooglePlusEvents()", 1207*1000); + } }); diff --git a/raspberry-kiosk/kiosk1.html b/raspberry-kiosk/kiosk1.html new file mode 100644 index 0000000..33f3426 --- /dev/null +++ b/raspberry-kiosk/kiosk1.html @@ -0,0 +1,47 @@ + + + + Realraum Kiosk Seite + + + + + + + +
    +
    + +
    + + + +
    +
    +

    Sensordaten

    +
    + + + +
    Lädt ...
    Lädt ...
    +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    + +
    +

    Google+

    +
    Lädt ...
    +
    +
    + + diff --git a/raspberry-kiosk/kiosk2cal.html b/raspberry-kiosk/kiosk2cal.html new file mode 100644 index 0000000..6252fea --- /dev/null +++ b/raspberry-kiosk/kiosk2cal.html @@ -0,0 +1,22 @@ + + + + Realraum Kiosk Seite + + + + + + + +
    + +
    + +
    +
    +

    Veranstaltungskalender

    +
    Kalendar lädt ...
    +
    + +