diff options
author | thlo <t.lohmar@gmx.de> | 2013-09-14 18:16:29 +0200 |
---|---|---|
committer | thlo <t.lohmar@gmx.de> | 2013-09-14 18:16:29 +0200 |
commit | 3c8b0c290160d11f75b01047e672ed3dbbbf12b8 (patch) | |
tree | 8834ed92f2cacbbd3d4233b7654a7fa6aaaba920 | |
parent | 230591c0f2f0398e444d8fb7642b518e55cf663e (diff) | |
download | vdr-plugin-smarttvweb-3c8b0c290160d11f75b01047e672ed3dbbbf12b8.tar.gz vdr-plugin-smarttvweb-3c8b0c290160d11f75b01047e672ed3dbbbf12b8.tar.bz2 |
Additions to previous commit.
-rwxr-xr-x | smarttv-client/Javascript/Display.js | 32 |
1 files changed, 29 insertions, 3 deletions
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 + "<br>" + text);
+// var oldHTML = document.getElementById("popup").innerHTML;
+// Display.putInnerHTML(document.getElementById("popup"), oldHTML + "<br>" + text);
+
+ if (text == "")
+ this.popupOlHandler.show();
+
+ var elm = $("<p>", {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"), "");
};
|