Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not possible to set loop on a frame (i.e. video) #2177

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions ui/src/layout-editor/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand Down
1 change: 1 addition & 0 deletions ui/src/layout-editor/region.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
6 changes: 6 additions & 0 deletions ui/src/templates/context-menu.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,12 @@
</div>
{{/if}}

{{#if isFrame}}
<div class="context-menu-btn editFrameBtn" data-title="{{trans.options}}" data-action="editFrame" data-toggle="tooltip" data-container=".context-menu" data-placement="bottom">
<i class="fa fa-cog"></i><span>{{trans.options}}</span>
</div>
{{/if}}

{{#if isDeletable}}
<div class="context-menu-btn deleteBtn" data-title="{{trans.delete}}" data-action="Delete" data-toggle="tooltip" data-container=".context-menu" data-placement="bottom">
<i class="fa fa-trash"></i><span>{{trans.delete}}</span>
Expand Down
17 changes: 11 additions & 6 deletions ui/src/templates/forms/region.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,17 @@
<div class="tab-pane active" id="generalTab">
{{> 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}}
</div>
<div class="tab-pane" id="positioningTab">
{{> inputs/number value=region.zIndex id="zIndex" title=trans.region.layer helpText=trans.region.layerHelpText customClass="position-input" }}
Expand Down
10 changes: 5 additions & 5 deletions views/common.twig
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}",
Expand Down Expand Up @@ -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 }}",
Expand Down
Loading