From 22a8512a4e0ede913631576c508dd60641634601 Mon Sep 17 00:00:00 2001 From: "M. Voerman" Date: Wed, 17 Apr 2013 18:25:00 +0200 Subject: Info in timer menu with blue --- index.html | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 51 insertions(+), 2 deletions(-) (limited to 'index.html') diff --git a/index.html b/index.html index 5d34a55..6a4a350 100644 --- a/index.html +++ b/index.html @@ -1555,6 +1555,10 @@ function onKeyTeletext(keyCode) { function onKeyMenu(keyCode) { switch(keyCode) { case "BrowserBack": + if (menu == 5 && osdepginfo.style.opacity == 1) { + osdepginfo.style.opacity = 0; + break; + } if (menu !== 0) { if (menu == 3 ) { isFullscreen = 0; play(channels[currChan]); isFullscreen = 1;MPDListener = 0;} menu = 0; @@ -1565,6 +1569,7 @@ function onKeyMenu(keyCode) { if (menu == 3 ) { play(channels[currChan]);MPDListener = 0;} isSetupMenu = 0; mainmenu.style.opacity = 0; + osdepginfo.style.opacity = 0; break; case "Left": @@ -1607,6 +1612,7 @@ function onKeyMenu(keyCode) { InitMenu(menu); } } else if (menu == 5) { + osdepginfo.style.opacity = 0; mainmenu.innerHTML = "

Timers

\n\n\n
PLEASE WAIT
"; DeleteTimers(); setTimeout("LoadTimersServer();InitMenu(menu);",100); @@ -1619,7 +1625,12 @@ function onKeyMenu(keyCode) { case "Blue": if (menu == 0) { RestartPortal(); - } + } else if (menu == 5) { + // Show EPG info Timer + ShowTimerInfo(); + osdepginfo.style.opacity = 1 - osdepginfo.style.opacity; + } + break; case "MediaRewind": break; @@ -1828,9 +1839,10 @@ function onKeyMenu(keyCode) { function InitMenu(menu) { +osdepginfo.style.opacity = 0; + if(menu == 0) { // Main Menu mainmenu.innerHTML = "

MainMenu \n ( " + Version + " )

   1 - Settings \n   2 - Timers\n   3 - EPG\n   4 - Server : Recordings\n   5 - Server : Timers\n   6 - Server : EPG\n   7 - Server : Media Directory\n\n   9 - MPD Server Connection\n\n   BLUE - Restart Portal 
"; -// mainmenu.innerHTML = "

MainMenu \n ( " + Version + " )

   1 - Settings \n   2 - Recordings\n   3 - Timers\n   4 - EPG\n   5 - Server : Recordings\n   6 - Server : Timers\n   7 - Server : EPG\n   8 - Server : Media Directory\n   9 - MPD Server Connection\n\n   BLUE - Restart Portal 
"; } @@ -1987,6 +1999,8 @@ try { } else { timersDays[i] = timersDays[i] + "\uE003\uE003\uE003"; } + timersEvnt[i] = x[i].getElementsByTagName("param")[8].childNodes[0].nodeValue; // event_id + timersChan[i] = x[i].getElementsByTagName("param")[11].childNodes[0].nodeValue; // channel_id timersName[i] = x[i].getElementsByTagName("param")[15].childNodes[0].nodeValue + fill; if (timersFlag[i] == "1") { timers[i] = "\uE003\uE00C\uE003"; @@ -2008,6 +2022,41 @@ try { } } + +function ShowTimerInfo() { + //Like Show EPG Info + //setup some dummy vars + var info1 = ""; var info2 = ""; var info3 = ""; var info4=""; + + if (timersEvnt[timerID] > 0) { + + try { + xmlhttp=new XMLHttpRequest(); + xmlhttp.open("GET",(RestFulAPI + "/events/" + timersChan[timerID] + "/" + timersEvnt[timerID] + ".xml?" + new Date().getTime()),false); + xmlhttp.send(); + xmlDoc=xmlhttp.responseXML; + var x=xmlDoc.getElementsByTagName("event"); + // x[0].getElementsByTagName("param")[1].childNodes[0].nodeValue --> Title + // x[0].getElementsByTagName("param")[2].childNodes[0].nodeValue --> Short_text + // x[0].getElementsByTagName("param")[3].childNodes[0].nodeValue --> Description + // x[0].getElementsByTagName("param")[5].childNodes[0].nodeValue --> ChannelsName + + info1 = x[0].getElementsByTagName("param")[1].childNodes[0].nodeValue; + info2 = x[0].getElementsByTagName("param")[5].childNodes[0].nodeValue; + info4 = x[0].getElementsByTagName("param")[3].childNodes[0].nodeValue; + info3 = x[0].getElementsByTagName("param")[2].childNodes[0].nodeValue + "

"; + + } catch(e) { + alert("Get EPG problem: " + e); + + } + } else { + info3 = " NO INFO "; + } + osdepginfo.innerHTML = "

" + Left(info1,60) + "\n " + timersDays[timerID] + " " + 
+	timersStrt[timerID] + " - " + timersStop[timerID] + "\n" + info2 + "\n 

" + info3 + Left(info4,750) + "

" ; +} + // End of Menu section // MPD Section -- cgit v1.2.3