Skip to content

Commit

Permalink
Layout Editor: Saving region properties not working
Browse files Browse the repository at this point in the history
  • Loading branch information
maurofmferrao committed Oct 15, 2024
1 parent 614040e commit 8a8f385
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
10 changes: 5 additions & 5 deletions ui/src/editor-core/properties-panel.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,8 @@ PropertiesPanel.prototype.save = function(
target = app.selectedObject;
}

// Check if target is playlist
const isPlaylist =
(target.type === 'region' && target.subType === 'playlist');
// Check if target is region
const isRegion = target.type === 'region';

// Save original target
const originalTarget = target;
Expand Down Expand Up @@ -167,7 +166,8 @@ PropertiesPanel.prototype.save = function(
form.find('[name]');

// Filter out position related fields
formFieldsToSave = (isPlaylist) ? formFieldsToSave :
// if not region
formFieldsToSave = (isRegion) ? formFieldsToSave :
formFieldsToSave.filter('.tab-pane:not(#positionTab) [name]');

// Get form old data
Expand Down Expand Up @@ -632,7 +632,7 @@ PropertiesPanel.prototype.render = function(
// and exit transition
if (target.type === 'region') {
const regionType = (target.subType === 'frame') ?
'widget' : target.subType;
'widgetType' : target.subType;
dataToRender.regionType = propertiesPanelTrans[regionType];

if (
Expand Down
1 change: 1 addition & 0 deletions views/common.twig
Original file line number Diff line number Diff line change
Expand Up @@ -685,6 +685,7 @@
widgetInfo: {
widgetName: "{{ "Widget Name" |trans }}",
},
widgetType: "{{ "Widget" |trans }}",
elementName: "{{ "Element Name" |trans }}",
elementNameHelpText: "{{ "An optional name for this element" |trans }}",
elementGroupName: "{{ "Element Group Name" |trans }}",
Expand Down

0 comments on commit 8a8f385

Please sign in to comment.