From e8943979b23221d325697dde753842a5ced569d4 Mon Sep 17 00:00:00 2001 From: thlo Date: Tue, 3 Sep 2013 18:41:33 +0200 Subject: * Image Viewer for Media Folder (press enter on an Image) * Timer GUI improvements * 3D interaction Improvements. --- smarttv-client/Javascript/Display.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'smarttv-client/Javascript/Display.js') diff --git a/smarttv-client/Javascript/Display.js b/smarttv-client/Javascript/Display.js index c0b1093..62e3412 100755 --- a/smarttv-client/Javascript/Display.js +++ b/smarttv-client/Javascript/Display.js @@ -168,7 +168,7 @@ Display.getNumString =function(num, fmt) { }; Display.selectItem = function (item) { - +// item.setAttribute("class", "style_menuItemSelected"); item.style.color = "black"; item.style.background = "white"; item.style.background = "-webkit-linear-gradient(top, rgba(246,248,249,1) 0%,rgba(229,235,238,1) 50%,rgba(215,222,227,1) 51%,rgba(245,247,249,1) 100%)"; @@ -178,6 +178,7 @@ Display.selectItem = function (item) { }; Display.unselectItem = function (item) { +// item.setAttribute("class", "style_menuItem"); item.style.color = "white"; // item.style.backgroundColor = "transparent"; item.style.background = "transparent"; @@ -1035,7 +1036,7 @@ OverlayHandler.prototype.checkHideCallback = function () { var now = Display.GetEpochTime(); if (now >= this.hideTime) { - this.olDelay = 3000; +// this.olDelay = 3000; if (this.hideCallback) { this.hideCallback(); } -- cgit v1.2.3 From c10639b7ed6cc898fad009fbcd2ef17b01d15d3b Mon Sep 17 00:00:00 2001 From: thlo Date: Sat, 14 Sep 2013 18:16:29 +0200 Subject: Additions to previous commit. --- smarttv-client/Javascript/Display.js | 32 +++++++++++++++++++++++++++++--- 1 file changed, 29 insertions(+), 3 deletions(-) (limited to 'smarttv-client/Javascript/Display.js') diff --git a/smarttv-client/Javascript/Display.js b/smarttv-client/Javascript/Display.js index 62e3412..b1f7d37 100755 --- a/smarttv-client/Javascript/Display.js +++ b/smarttv-client/Javascript/Display.js @@ -47,6 +47,11 @@ Display.init = function() this.popupOlHandler.init(Display.handlerShowPopup, Display.handlerHidePopup); this.infoOlHandler.init(Display.handlerShowInfo, Display.handlerHideInfo); this.infoOlHandler.olDelay = Config.infoTimeout; + + // Different popup behavior during config phase; + this.popupOlHandler.olDelay = 30*1000; + $("#popup").css("height", "300px"); + // end if (!this.statusDiv) { success = false; @@ -277,7 +282,7 @@ Display.tuneLeftSide = function() { res.w3 = "5%"; switch (Main.state) { case Main.eLIVE: - res.w1 = "5%"; + res.w1 = "7%"; res.w2 = "25%"; res.w3 = "65%"; break; @@ -901,9 +906,26 @@ Display.handlerHideInfo = function() { * Popup handlers */ Display.showPopup = function(text) { - var oldHTML = document.getElementById("popup").innerHTML; - Display.putInnerHTML(document.getElementById("popup"), oldHTML + "
" + text); +// var oldHTML = document.getElementById("popup").innerHTML; +// Display.putInnerHTML(document.getElementById("popup"), oldHTML + "
" + text); + + if (text == "") + this.popupOlHandler.show(); + + var elm = $("

", {text: text}); + $("#popup").append(elm); this.popupOlHandler.show(); + + Display.scrollPopup (); +}; + +Display.scrollPopup = function () { + var t = $('#popup').children().last().position().top; + var h = $('#popup').children().last().outerHeight(); + if ((t + h) > $("#popup").height()) { + $("#popup").animate ({scrollTop: $("#popup").scrollTop() + t + h - $("#popup").height()}, 200); + } + }; Display.handlerShowPopup = function() { @@ -912,6 +934,10 @@ Display.handlerShowPopup = function() { }; Display.handlerHidePopup = function() { + $("#popup").css("height", "100px"); + + $('#popup').children().each(function() { $(this).remove(); }); + document.getElementById("popup").style.display="none"; Display.putInnerHTML(document.getElementById("popup"), ""); }; -- cgit v1.2.3