summaryrefslogtreecommitdiff
path: root/smarttv-client/Javascript/Display.js
diff options
context:
space:
mode:
authorthlo <smarttv640@gmail.com>2013-05-01 18:21:27 +0200
committerthlo <t.lohmar@gmx.de>2013-05-01 18:21:27 +0200
commiteb44d51a9fdfc9be5a9b069b5bf5f45d93262504 (patch)
treec3c740dee0f1b977a098f688825b76606d3ab39f /smarttv-client/Javascript/Display.js
parent1f80c9528c5b83de6b301a1e845b2ed5b425bc30 (diff)
downloadvdr-plugin-smarttvweb-eb44d51a9fdfc9be5a9b069b5bf5f45d93262504.tar.gz
vdr-plugin-smarttvweb-eb44d51a9fdfc9be5a9b069b5bf5f45d93262504.tar.bz2
Widget v0.94
isNew indicator delete YT URLs Notification, when a recording is started / stopped Notification, when a timer is added / deleted HTTP based configuration.
Diffstat (limited to 'smarttv-client/Javascript/Display.js')
-rwxr-xr-xsmarttv-client/Javascript/Display.js32
1 files changed, 17 insertions, 15 deletions
diff --git a/smarttv-client/Javascript/Display.js b/smarttv-client/Javascript/Display.js
index 93a38ef..94743bd 100755
--- a/smarttv-client/Javascript/Display.js
+++ b/smarttv-client/Javascript/Display.js
@@ -324,6 +324,7 @@ Display.setVideoList = function(selected, first) {
if ((first_item+i) <0) {
// wrap around
idx = (first_item+i) + Data.getVideoCount();
+
res = Display.getDisplayTitle (Data.getCurrentItem().childs[(first_item+i) + Data.getVideoCount()]);
}
else if ((first_item+i) >= Data.getVideoCount()) {
@@ -589,7 +590,7 @@ Display.getDisplayTitle = function(item) {
var min = Display.getNumString (digi.getMinutes(), 2);
var d_str = mon + "/" + day + " " + hour + ":" + min;
- res.c1 = d_str;
+ res.c1 = d_str + ((item.payload.isnew == "true") ? " *" : "");
res.c2 = item.title;
}
break;
@@ -923,27 +924,28 @@ Display.handlerHideProgress = function() {
Display.handlerShowProgress = function() {
$("#overlay").fadeIn(400);
-
+ Main.log("************************ OL width= " + $("#olProgressBarBG").width());
+ var bar_width = $("#olProgressBarBG").width();
if (Player.isRecording == true) {
- $("#olRecProgressBar").show();
- var now = Display.GetEpochTime();
-//thlo var remaining = Math.round(((Player.startTime + Player.duration) - now) * 100/ Player.duration);
- var remaining = Math.round(((Player.startTime + Player.getDuration()) - now) * 100/ Player.getDuration());
- var elm = document.getElementById("olRecProgressBar");
- elm.style.display="block";
- elm.style.width = remaining + "%";
- elm.style.left = (100 - remaining) + "%";
+ if ((Player.startTime + Player.getDuration()) > now) {
+ // not done
+ $("#olRecProgressBar").show();
+ var now = Display.GetEpochTime();
+ var remaining_px = ((Player.startTime + Player.getDuration()) - now) * bar_width/ Player.getDuration();
+ var elm = document.getElementById("olRecProgressBar");
+ elm.style.display="block";
+ elm.style.width = remaining_px + "px";
+ elm.style.left = (bar_width - remaining_px) + "px";
+ }
+
}
else
$("#olRecProgressBar").hide();
-//thlo var timePercent = (Player.curPlayTime *100)/ Player.totalTime;
- var timePercent = (Player.curPlayTime *100)/ Player.getDuration();
+ var time_px = (Player.curPlayTime *bar_width)/ Player.getDuration();
+ document.getElementById("olProgressBar").style.width = time_px + "px";
- document.getElementById("olProgressBar").style.width = timePercent + "%";
-
-//thlo $("#olTimeInfo").text(Player.curPlayTimeStr + " / " + Player.totalTimeStr);
$("#olTimeInfo").text(Player.curPlayTimeStr + " / " + Player.getDurationStr());
var Digital=new Date();