diff --git a/ui/src/layout-editor/main.js b/ui/src/layout-editor/main.js index ffe9157c45..f11594397b 100644 --- a/ui/src/layout-editor/main.js +++ b/ui/src/layout-editor/main.js @@ -3067,6 +3067,14 @@ lD.openContextMenu = function(obj, position = {x: 0, y: 0}) { } else if (target.data('action') == 'editPlaylist') { // Open playlist editor lD.openPlaylistEditor(layoutObject.playlists.playlistId, layoutObject); + } else if (target.data('action') == 'editFrame') { + // Select widget frame to edit it + const $viewerRegion = + lD.viewer.DOMObject.find('#' + layoutObject.id); + lD.selectObject({ + target: lD.viewer.DOMObject.find('#' + layoutObject.id), + }); + lD.viewer.selectElement($viewerRegion); } else if (target.data('action') == 'Ungroup') { // Get widget const elementsWidget = diff --git a/ui/src/layout-editor/region.js b/ui/src/layout-editor/region.js index 9deae241d9..5033322cf5 100644 --- a/ui/src/layout-editor/region.js +++ b/ui/src/layout-editor/region.js @@ -33,6 +33,7 @@ const Region = function(id, data, {backgroundColor = '#aaa'} = {}) { this.isDeletable = data.isDeletable; this.isPermissionsModifiable = data.isPermissionsModifiable; this.isPlaylist = data.type === 'playlist'; + this.isFrame = data.type === 'frame'; // Interactive actions this.actions = data.actions; diff --git a/ui/src/templates/context-menu.hbs b/ui/src/templates/context-menu.hbs index 94be66b58c..af4a86d964 100644 --- a/ui/src/templates/context-menu.hbs +++ b/ui/src/templates/context-menu.hbs @@ -79,6 +79,12 @@ {{/if}} + {{#if isFrame}} +
+ {{trans.options}} +
+ {{/if}} + {{#if isDeletable}}
{{trans.delete}} diff --git a/ui/src/templates/forms/region.hbs b/ui/src/templates/forms/region.hbs index dde133237e..da3e230697 100644 --- a/ui/src/templates/forms/region.hbs +++ b/ui/src/templates/forms/region.hbs @@ -9,12 +9,17 @@
{{> inputs/hidden id="type" value=region.type customClass="region-input" }} {{> inputs/text value=region.name id="name" title=trans.region.name helpText=trans.region.nameHelpText customClass="region-input" }} - {{> inputs/text value=region.syncKey id="syncKey" title=trans.region.syncKey helpText=trans.region.syncKeyHelpText customClass="region-input" }} - {{> inputs/checkbox value=(getOption region.regionOptions "loop") id="loop" title=trans.region.loop helpText=trans.region.loopHelpText customClass="region-input" }} - {{> inputs/message messageType="info" title=trans.region.loopMessage1}} - {{> inputs/message messageType="info" title=trans.region.loopMessage2}} - {{> inputs/message messageType="info" title=trans.region.loopMessage3}} - {{> inputs/message messageType="info" title=trans.region.loopMessage4}} + + {{#eq region.type 'playlist' }} + {{> inputs/text value=region.syncKey id="syncKey" title=trans.region.syncKey helpText=trans.region.syncKeyHelpText customClass="region-input" }} + {{/eq}} + + {{#eq region.type 'frame' }} + {{> inputs/checkbox value=(getOption region.regionOptions "loop") id="loop" title=trans.region.loop helpText=trans.region.loopHelpText customClass="region-input" }} + {{> inputs/message messageType="info" title=trans.region.loopMessage1}} + {{> inputs/message messageType="info" title=trans.region.loopMessage2}} + {{> inputs/message messageType="info" title=trans.region.loopMessage3}} + {{/eq}}
{{> inputs/number value=region.zIndex id="zIndex" title=trans.region.layer helpText=trans.region.layerHelpText customClass="position-input" }} diff --git a/views/common.twig b/views/common.twig index 48f67b065c..7732f1c4a4 100644 --- a/views/common.twig +++ b/views/common.twig @@ -446,6 +446,7 @@ editTransOut: "{{ "Edit Transition Out" |trans }}", editPermissions: "{{ "Edit Sharing" |trans }}", editPlaylist: "{{ "Edit Playlist" |trans }}", + options: "{% trans "Options" %}", moveLeft: "{{ "Move one step left" |trans }}", moveRight: "{{ "Move one step right" |trans }}", moveTopLeft: "{{ "Move to the top left" |trans }}", @@ -576,11 +577,10 @@ syncKey: "{{ "Content Synchronisation Key" |trans }}", syncKeyHelpText: "{{ "If this layout is scheduled using a synchronised event, this key will be used to match with other layouts in the same event." |trans }}", loop: "{{ "Loop?" |trans }}", - loopHelpText: "{{ "If there is only one item in this %region.type% should it loop?" |trans }}", - loopMessage1: "{{ "When should the %regionType% Loop be enabled?" |trans }}", - loopMessage2: "{{ "* If your %regionType% contains more than one Widget, Loop should not be enabled." |trans }}", - loopMessage3: "{{ "* If your %regionType% contains one Widget, and that Widget is a 'fixed' item (eg Text), Loop should not be enabled." |trans }}", - loopMessage4: "{{ "* If your %regionType% contains one Widget, and that Widget needs to update periodically (eg RSS Ticker Widget), Loop can be enabled ONLY if the Widget needs to update MORE frequently than the duration of the overall Layout." |trans }}", + loopHelpText: "{{ "Enable Widget loop?" |trans }}", + loopMessage1: "{{ "When should the Widget Loop be enabled?" |trans }}", + loopMessage2: "{{ "* If the Widget is a 'fixed' item (eg Text), Loop should not be enabled." |trans }}", + loopMessage3: "{{ "* If the Widget needs to update periodically (eg RSS Ticker Widget), Loop can be enabled ONLY if the Widget needs to update MORE frequently than the duration of the overall Layout." |trans }}", layer: "{{ "Layer" |trans }}", layerHelpText: "{{ "The layering order of this %regionType% (z-index). Advanced use only." |trans }}", top: "{{ "Top" |trans }}",