Skip to content

Commit

Permalink
Bugfix/4.0.7 last fixes (#2369)
Browse files Browse the repository at this point in the history
* Turn No Data message into a rich text input
relates to xibosignageltd/xibo-private#612

* Add to Groups fails for stencil groups
relates to xibosignageltd/xibo-private#618

* Removal of rougue variable
relates to xibosignageltd/xibo-private#618
  • Loading branch information
maurofmferrao authored Feb 12, 2024
1 parent 8944246 commit 4952e07
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 3 deletions.
2 changes: 1 addition & 1 deletion modules/templates/article-static.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1285,7 +1285,7 @@ $(target).xiboLayoutAnimate(properties);
</test>
</visibility>
</property>
<property id="noDataMessage" type="code" allowLibraryRefs="true" variant="html">
<property id="noDataMessage" type="richText" allowLibraryRefs="true" variant="html">
<title>No data message</title>
<helpText>A message to display when no data is returned from the source</helpText>
</property>
Expand Down
2 changes: 1 addition & 1 deletion modules/templates/dataset-static.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3289,7 +3289,7 @@ $(target).xiboLayoutAnimate(properties);
</test>
</visibility>
</property>
<property id="noDataMessage" type="code" allowLibraryRefs="true" variant="html">
<property id="noDataMessage" type="richText" allowLibraryRefs="true" variant="html">
<title>No data message</title>
<helpText>A message to display when no data is returned from the source</helpText>
<visibility>
Expand Down
18 changes: 18 additions & 0 deletions ui/src/layout-editor/viewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -1515,9 +1515,27 @@ Viewer.prototype.renderElement = function(
if (
$canvasRegionContainer.find(`#${element.groupId}`).length == 0
) {
// Get element group type
const groupElements = Object.values(element.group.elements);
let elementGroupType = 'global';

groupElements.every((el) => {
// If we found a type other than global
// save it and stop
if (el.elementType != 'global') {
elementGroupType = el.elementType;
// Break the loop
return false;
}

// Keep going
return true;
});

$canvasRegionContainer.append(
viewerElementGroupTemplate({
element: element,
elementGroupType: elementGroupType,
trans: viewerTrans,
}),
);
Expand Down
2 changes: 1 addition & 1 deletion ui/src/templates/viewer-element-group.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
data-type="element-group"
data-region-id="{{element.regionId}}"
data-widget-id="{{element.widgetId}}"
data-element-type="{{element.elementType}}"
data-element-type="{{elementGroupType}}"
>
<div class="designer-element-group-elements"></div>
<div class="group-edit-btn viewer-object-select" title="{{trans.editGroup}}">
Expand Down

0 comments on commit 4952e07

Please sign in to comment.