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}} +
+ {{/if}} + {{#if isDeletable}}