From 53edc9208fb35616b973e403bb3e84a18212b108 Mon Sep 17 00:00:00 2001 From: Ruben Pingol <128448242+rubenberttpingol@users.noreply.github.com> Date: Wed, 6 Nov 2024 21:27:05 +0800 Subject: [PATCH] Layout Preview: Interactive Actions (#2794) * WIP: Implementing XLR interactive actions * Layout Preview: Revert unnecessary variable * Layout Preview: XLR Interactive Actions relates to xibosignage/xibo#3502 * Layout Preview: XLR Fix - remove iframe pointer events to enable clickability relates to xibosignage/xibo#3502 --- modules/layout-renderer.twig | 2 +- package-lock.json | 5 +++++ package.json | 1 + ui/bundle_preview.js | 4 ++-- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/modules/layout-renderer.twig b/modules/layout-renderer.twig index 63a0f98751..e9537006cb 100644 --- a/modules/layout-renderer.twig +++ b/modules/layout-renderer.twig @@ -57,7 +57,7 @@ (function($){ $(document).ready(function(){ var xiboLayoutRenderer = new XiboLayoutRenderer({{ layoutObj|json_encode()|raw }}, {{ xlrOptions|json_encode()|raw }}); - + xiboLayoutRenderer.init().then(function(xlr) { xlr.playSchedules(xlr); }); diff --git a/package-lock.json b/package-lock.json index 678ee2bd43..3d43ee4efa 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3863,6 +3863,11 @@ "integrity": "sha512-oxnCNGj88fL+xzV+dacXs44HcDwf1ovs3AuEzvP7mqXw7fQntqIhQ1BRmynh4qEKQSSSRSWVyXRjmTbZIX9V2Q==", "dev": true }, + "@xibosignage/xibo-layout-renderer": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@xibosignage/xibo-layout-renderer/-/xibo-layout-renderer-1.0.4.tgz", + "integrity": "sha512-kW0dTJWIYA3nOjdgn+Rjw7d+To3jsE1sb0z89A+9ovtLqpVkZHpkhgtXs+j7GcxemAqOH70WASb83KTbHGFBbg==" + }, "@xtuc/ieee754": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/@xtuc/ieee754/-/ieee754-1.2.0.tgz", diff --git a/package.json b/package.json index 7cdf3de11f..c94c5ab424 100644 --- a/package.json +++ b/package.json @@ -61,6 +61,7 @@ "dependencies": { "@fortawesome/fontawesome-free": "^5.13.0", "@mapbox/leaflet-pip": "^1.1.0", + "@xibosignage/xibo-layout-renderer": "^1.0.4", "ajax-bootstrap-select": "^1.4.5", "ajv": "^6.12.2", "blueimp-file-upload": "^9.34.0", diff --git a/ui/bundle_preview.js b/ui/bundle_preview.js index 550fdb3abe..7c266c0315 100644 --- a/ui/bundle_preview.js +++ b/ui/bundle_preview.js @@ -22,8 +22,8 @@ window.jQuery = window.$ = require('jquery'); // XLR -require('xibo-layout-renderer/dist/styles.css'); +import '@xibosignage/xibo-layout-renderer/dist/styles.css'; -import XiboLayoutRenderer from 'xibo-layout-renderer'; +import XiboLayoutRenderer from '@xibosignage/xibo-layout-renderer'; window.XiboLayoutRenderer = XiboLayoutRenderer;