diff options
| author | M. Voerman <rekordc@gmail.com> | 2013-01-11 22:11:48 +0100 |
|---|---|---|
| committer | M. Voerman <rekordc@gmail.com> | 2013-01-11 22:11:48 +0100 |
| commit | bde105ec76493a7e32d83b881f1ee5a46ebac6df (patch) | |
| tree | 71fd6cc9a386868a458eb627265aaf74db6692cd | |
| parent | 47a3062b8682dd4b9494b585f87761124308d0af (diff) | |
| download | vdr-vipclient-bde105ec76493a7e32d83b881f1ee5a46ebac6df.tar.gz vdr-vipclient-bde105ec76493a7e32d83b881f1ee5a46ebac6df.tar.bz2 | |
timerlist changes
| -rw-r--r-- | index.html | 60 | ||||
| -rw-r--r-- | settings.js | 4 |
2 files changed, 54 insertions, 10 deletions
@@ -948,6 +948,7 @@ function setOSDtimer() { var x = toi.schedulerService.getBookingIds("SwitchOnly", 0, 0) if (x.length !== 0) { tijd = toi.schedulerService.getNextStartTime("SwitchOnly"); + alert ("XXXX" + tijd); date = new Date(tijd*1000); tijd = date.toUTCString(); tijd = new Date(tijd); @@ -1472,10 +1473,29 @@ function onKeyMenu(keyCode) { isSetupMenu = 0; mainmenu.style.opacity = 0; break; + case "Left": break; case "Right": break; + case "Up": + if (menu == 2) { + timerID = timerID - 1; + if (timerID < 0) { + timerID = timer.length; + } + InitMenu(menu); + } + break; + case "Down": + if (menu == 2) { + timerID = timerID + 1; + if (timerID == timer.length + 1) { + timerID = 0; + } + InitMenu(menu); + } + break; case "Red": if (menu == 1) { if(showClock == 0 ) { @@ -1556,7 +1576,6 @@ function onKeyMenu(keyCode) { break; case KEY_3: if (menu == 0) { - isTimerMenu = 1; LoadTimers(); menu = 2; } else if (menu == 1) { @@ -1636,20 +1655,42 @@ if(menu == 1) { if(menu == 2) { // Timers menu - mainmenu.innerHTML = "<h1><center style='font-size:" + fsMenuMain + ";color:white;'> Timers </center></h1><pre style='color:black;font-size:" + fsMenu + ";'>\n Press OK to remove a timer \n" + booking + "\n\n\n\n 0 - MainMenu </pre>"; -} + var booking = ""; + var x = timerID; + if (timer.length !== 0) { do { x = x + 1; } while (!timer[x] && (x < timer.length)) } + timerID = x - 1; + x = x - 1; + for (var i=0;i<10;i++) { + if (timer.length !== 0) { do { x = x + 1; } while (!timer[x] && (x < timer.length)) } + + if ( i == 0 ) { + booking = booking + "*"; + } else { + booking = booking + " "; + } + + if (timer.length > x) { + booking = booking + timer[x]; + } else { + booking = booking +"\n"; + } + } + + mainmenu.innerHTML = "<h1><center style='font-size:" + fsMenuMain + ";color:white;'> Timers </center></h1><pre style='color:black;font-size:" + fsMenu + ";'>\n Press OK to remove a timer \n" + booking + " 0 - MainMenu </pre>"; } +} // end of initmenu + function LoadTimers() { - booking = ""; + var booking = ""; var x = toi.schedulerService.getBookingIds("*", 0, 0); for (var i=0;i<x.length;i++) { var y = toi.schedulerService.getBooking(x[i]); - booking = booking + "ID " + x[i]; - booking = booking + " Type " + y.category; - //booking = booking + toi.schedulerService.getParameter(x[i], "Channel"); + booking = "ID " + x[i]; + booking = booking + " " + y.category; + booking = booking + " " + toi.schedulerService.getParameter(x[i], "Channel"); tijd = y.start; date = new Date(tijd*1000); tijd = date.toUTCString(); @@ -1668,10 +1709,12 @@ function LoadTimers() { booking = booking + " Duration " + y.duration; } - booking = booking + "\n" ; + timer[(x[i])] = booking + "\n" ; + } } + // End of Menu section // Media Player Section @@ -2076,6 +2119,7 @@ function onScheduledStop(event) { var timertype = event.booking.category; if ( timertype == "SwitchOnly") { toi.schedulerService.remove(event.booking.id); + setOSDtimer(); } else { try { mediaRecorder.close(); diff --git a/settings.js b/settings.js index 7af3388..402cb40 100644 --- a/settings.js +++ b/settings.js @@ -213,6 +213,6 @@ var recLink = new Array(); var recDesc = new Array(); var recDura = new Array(); -var isTimerMenu = 0; -var booking = ""; // used in TimerMenu +var timer = new Array(); +var timerID = 0; var nrMedia = 0; |
