From 299a5ea9b7f0ddedc9030cf6a2150a351ebfd963 Mon Sep 17 00:00:00 2001 From: Reaby Date: Wed, 6 Feb 2019 17:55:04 +0200 Subject: [PATCH] fix for displaying webcontent --- data/default/slides.json | 26 +++++++++++++++++++++++++- public/js/display.js | 2 +- public/js/displayLite.js | 2 +- views/admin/link.twig | 7 +++++-- 4 files changed, 32 insertions(+), 5 deletions(-) diff --git a/data/default/slides.json b/data/default/slides.json index cc3ea98..8727309 100644 --- a/data/default/slides.json +++ b/data/default/slides.json @@ -5,7 +5,7 @@ "duration": null, "enabled": true, "displayTime": null, - "transition": "", + "transition": null, "type": "slide", "index": 0 }, @@ -28,5 +28,29 @@ "type": "slide", "transition": null, "index": 2 + }, + { + "uuid": "6a538b9f-cc1b-48bd-b3cd-a9a18fdf0428", + "name": "localhost", + "duration": null, + "enabled": true, + "displayTime": false, + "type": "webpage", + "webUrl": "http://localhost", + "zoom": 1, + "index": 3, + "transition": null + }, + { + "uuid": "04c227c6-eae8-4eaa-b0df-194fe6af30bc", + "name": "test", + "duration": null, + "enabled": true, + "displayTime": true, + "type": "webpage", + "webUrl": "http://localhost/test", + "zoom": 1, + "index": 4, + "transition": null } ] \ No newline at end of file diff --git a/public/js/display.js b/public/js/display.js index 0236856..473ad20 100644 --- a/public/js/display.js +++ b/public/js/display.js @@ -418,7 +418,7 @@ function displayWebPage(url) { var ifr = document.getElementById(getWebLayer()); ifr.contentWindow.location.href = url; $("#" + getWebLayer()).addClass("fadeIn").removeClass("fadeOut"); - + $("#" + getWebLayer(1)).addClass("fadeOut").removeClass("fadeIn"); layer++; if (layer > 1) { layer = 0; diff --git a/public/js/displayLite.js b/public/js/displayLite.js index 85cff3b..53c1aa5 100644 --- a/public/js/displayLite.js +++ b/public/js/displayLite.js @@ -289,7 +289,7 @@ function displayWebPage(url) { var ifr = document.getElementById(getWebLayer()); ifr.contentWindow.location.href = url; $("#" + getWebLayer()).addClass("fadeIn").removeClass("fadeOut"); - + $("#" + getWebLayer(1)).addClass("fadeOut").removeClass("fadeIn"); weblayer++; if (weblayer > 1) { weblayer = 0; diff --git a/views/admin/link.twig b/views/admin/link.twig index 6c46ac7..027690b 100644 --- a/views/admin/link.twig +++ b/views/admin/link.twig @@ -22,7 +22,7 @@
- +
@@ -52,7 +52,8 @@ if ($.isNumeric($("#duration").val())) { duration = parseInt($("#duration").val()); - }if ($.isNumeric($("#zoom").val())) { + } + if ($.isNumeric($("#zoom").val())) { zoom = parseFloat($("#zoom").val()); } @@ -76,6 +77,8 @@ socket.on("callback.webpage", function (data) { var json = data.json; + var zoom = json.zoom || 1; + $("#name").val(json.name); $("#weburl").val(json.webUrl); $("#zoom").val(json.zoom+"");