Skip to content

Commit

Permalink
xiboImageRender not working for templates and elements (xibosignage#2358
Browse files Browse the repository at this point in the history
  • Loading branch information
maurofmferrao authored Feb 8, 2024
1 parent c8c662b commit ba96c20
Show file tree
Hide file tree
Showing 18 changed files with 86 additions and 83 deletions.
2 changes: 1 addition & 1 deletion modules/forecastio.xml
Original file line number Diff line number Diff line change
Expand Up @@ -219,8 +219,8 @@ if (daysNum > 0) {
}
// Handle images and scaling
$(target).find("img").xiboImageRender(properties);
$content.xiboLayoutScaler(properties);
$(target).find("img").xiboImageRender(properties);
]]></onRender>
<assets>
<asset id="animate" type="path" mimeType="text/css" path="/modules/assets/forecastio/animate.css"></asset>
Expand Down
2 changes: 1 addition & 1 deletion modules/templates/article-elements.xml
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ if (
</template>
<template>
<id>article_image</id>
<extends override="url" with="data.image">global-image</extends>
<extends override="url" with="data.image">global_image</extends>
<title>Image</title>
<type>element</type>
<dataType>article</dataType>
Expand Down
12 changes: 5 additions & 7 deletions modules/templates/article-static.xml
Original file line number Diff line number Diff line change
Expand Up @@ -142,10 +142,9 @@ for (var index = 0; index < items.length; index++) {
}
// Render
$(target).find('img').xiboImageRender(properties);
$(target).xiboLayoutScaler(properties);
$(target).xiboTextRender(properties, $(target).find('#content > *'));
$(target).find('img').xiboImageRender(properties);
]]></onTemplateRender>
<onTemplateVisible><![CDATA[
// Start effects for this template
Expand Down Expand Up @@ -254,9 +253,9 @@ if (
}
// Render
$(target).find('img').xiboImageRender(properties);
$(target).xiboLayoutScaler(properties);
$(target).xiboTextRender(properties, $(target).find('#content > .image, #content > .copyright'));
$(target).find('img').xiboImageRender(properties);
]]></onTemplateRender>
<onTemplateVisible><![CDATA[
// Start effects for this template
Expand Down Expand Up @@ -473,9 +472,9 @@ if (
}
// Render
$(target).find('img').xiboImageRender(properties);
$(target).xiboLayoutScaler(properties);
$(target).xiboTextRender(properties, $(target).find('#content > .image, #content > .copyright'));
$(target).find('img').xiboImageRender(properties);
]]></onTemplateRender>
<onTemplateVisible><![CDATA[
// Start effects for this template
Expand Down Expand Up @@ -676,9 +675,9 @@ if (
}
// Render
$(target).find('img').xiboImageRender(properties);
$(target).xiboLayoutScaler(properties);
$(target).xiboTextRender(properties, $(target).find('#content > .image, #content > .copyright'));
$(target).find('img').xiboImageRender(properties);
]]></onTemplateRender>
<onTemplateVisible><![CDATA[
// Start effects for this template
Expand Down Expand Up @@ -1442,10 +1441,9 @@ if (
}
// Render
$(target).find('img').xiboImageRender(properties);
$(target).xiboLayoutScaler(properties);
$(target).xiboTextRender(properties, $(target).find('#content > *'));
$(target).find('img').xiboImageRender(properties);
]]></onTemplateRender>
<onTemplateVisible><![CDATA[
// Start effects for this template
Expand Down
2 changes: 1 addition & 1 deletion modules/templates/currency-elements.xml
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ if (elementData !== null && elementData.hasOwnProperty('ChangeStyle')) {
</template>
<template>
<id>currency_logo</id>
<extends override="url" with="data.NameShort">global-image</extends>
<extends override="url" with="data.NameShort">global_image</extends>
<title>Currency Logo</title>
<type>element</type>
<dataType>currency</dataType>
Expand Down
6 changes: 3 additions & 3 deletions modules/templates/currency-static.xml
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@
// target: The target element to render
// items: The items to render
// properties: The properties for the widget
$(target).find('img').xiboImageRender(properties);
$(target).xiboLayoutScaler(properties);
// Get body
Expand All @@ -117,6 +116,7 @@ if (templateItems.length > 0) {
// Hide container
$(body).hide();
}
$(target).find('img').xiboImageRender(properties);
]]></onTemplateRender>
<onTemplateVisible><![CDATA[
// Start effects for this template
Expand Down Expand Up @@ -335,7 +335,6 @@ body {
// target: The target element to render
// items: The items to render
// properties: The properties for the widget
$(target).find("img").xiboImageRender(properties);
$(target).xiboLayoutScaler(properties);
// Get items
Expand All @@ -352,6 +351,7 @@ if (templateItems.length > 0) {
// Hide container
$(body).hide();
}
$(target).find("img").xiboImageRender(properties);
]]></onTemplateRender>
<onTemplateVisible><![CDATA[
// Start effects for this template
Expand Down Expand Up @@ -613,7 +613,6 @@ body {
// target: The target element to render
// items: The items to render
// properties: The properties for the widget
$(target).find("img").xiboImageRender(properties);
$(target).xiboLayoutScaler(properties);
// Get template items
Expand All @@ -623,6 +622,7 @@ var templateItems = $(target).find(".template-item");
var body = $(target).find(".template-container");
$(target).find("#content").xiboFinanceRender(properties, templateItems, body);
$(target).find("img").xiboImageRender(properties);
]]></onTemplateRender>
<onTemplateVisible><![CDATA[
// Start effects for this template
Expand Down
2 changes: 1 addition & 1 deletion modules/templates/dataset-elements.xml
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@
</template>
<template>
<id>dataset_data_img</id>
<extends override="url">global-image</extends>
<extends override="url">global_image</extends>
<title>Image</title>
<type>element</type>
<dataType>dataset</dataType>
Expand Down
57 changes: 28 additions & 29 deletions modules/templates/dataset-static.xml
Original file line number Diff line number Diff line change
Expand Up @@ -254,11 +254,11 @@ $datasetTableContainer.appendTo($(target).find('#content'));
// Scale the layout
$(target).xiboLayoutScaler(properties);
// Image render
$datasetTableContainer.find('img').xiboImageRender(properties);
// Call render
$datasetTableContainer.dataSetRender(properties);
// Image render
$datasetTableContainer.find('img').xiboImageRender(properties);
]]></onTemplateRender>
<assets>
<asset id="empty" type="path" mimeType="image/png" cmsOnly="true" path="/modules/assets/template-thumbnails/dataset/0-empty.png" />
Expand Down Expand Up @@ -800,11 +800,11 @@ $datasetTableContainer.appendTo($(target).find('#content'));
// Scale the layout
$(target).xiboLayoutScaler(properties);
// Image render
$datasetTableContainer.find('img').xiboImageRender(properties);
// Call render
$datasetTableContainer.dataSetRender(properties);
// Image render
$datasetTableContainer.find('img').xiboImageRender(properties);
]]></onTemplateRender>
<assets>
<asset id="empty" type="path" mimeType="image/png" cmsOnly="true" path="/modules/assets/template-thumbnails/dataset/0-empty.png" />
Expand Down Expand Up @@ -1082,11 +1082,11 @@ $datasetTableContainer.appendTo($(target).find('#content'));
// Scale the layout
$(target).xiboLayoutScaler(properties);
// Image render
$datasetTableContainer.find('img').xiboImageRender(properties);
// Call render
$datasetTableContainer.dataSetRender(properties);
// Image render
$datasetTableContainer.find('img').xiboImageRender(properties);
]]></onTemplateRender>
<assets>
<asset id="light-green" type="path" mimeType="image/png" cmsOnly="true" path="/modules/assets/template-thumbnails/dataset/1-light-green.png" />
Expand Down Expand Up @@ -1355,11 +1355,11 @@ $datasetTableContainer.appendTo($(target).find('#content'));
// Scale the layout
$(target).xiboLayoutScaler(properties);
// Image render
$datasetTableContainer.find('img').xiboImageRender(properties);
// Call render
$datasetTableContainer.dataSetRender(properties);
// Image render
$datasetTableContainer.find('img').xiboImageRender(properties);
]]></onTemplateRender>
<assets>
<asset id="simple-round-table" type="path" mimeType="image/png" cmsOnly="true" path="/modules/assets/template-thumbnails/dataset/2-simple-round-table.png" />
Expand Down Expand Up @@ -1626,11 +1626,11 @@ $datasetTableContainer.appendTo($(target).find('#content'));
// Scale the layout
$(target).xiboLayoutScaler(properties);
// Image render
$datasetTableContainer.find('img').xiboImageRender(properties);
// Call render
$datasetTableContainer.dataSetRender(properties);
// Image render
$datasetTableContainer.find('img').xiboImageRender(properties);
]]></onTemplateRender>
<assets>
<asset id="transparent-blue" type="path" mimeType="image/png" cmsOnly="true" path="/modules/assets/template-thumbnails/dataset/3-transparent-blue.png" />
Expand Down Expand Up @@ -1895,11 +1895,11 @@ $datasetTableContainer.appendTo($(target).find('#content'));
// Scale the layout
$(target).xiboLayoutScaler(properties);
// Image render
$datasetTableContainer.find('img').xiboImageRender(properties);
// Call render
$datasetTableContainer.dataSetRender(properties);
// Image render
$datasetTableContainer.find('img').xiboImageRender(properties);
]]></onTemplateRender>
<assets>
<asset id="orange-grey-striped" type="path" mimeType="image/png" cmsOnly="true" path="/modules/assets/template-thumbnails/dataset/4-orange-grey-striped.png" />
Expand Down Expand Up @@ -2162,11 +2162,11 @@ $datasetTableContainer.appendTo($(target).find('#content'));
// Scale the layout
$(target).xiboLayoutScaler(properties);
// Image render
$datasetTableContainer.find('img').xiboImageRender(properties);
// Call render
$datasetTableContainer.dataSetRender(properties);
// Image render
$datasetTableContainer.find('img').xiboImageRender(properties);
]]></onTemplateRender>
<assets>
<asset id="split-rows-" type="path" mimeType="image/png" cmsOnly="true" path="/modules/assets/template-thumbnails/dataset/5-split-rows-.png" />
Expand Down Expand Up @@ -2424,11 +2424,11 @@ $datasetTableContainer.appendTo($(target).find('#content'));
// Scale the layout
$(target).xiboLayoutScaler(properties);
// Image render
$datasetTableContainer.find('img').xiboImageRender(properties);
// Call render
$datasetTableContainer.dataSetRender(properties);
// Image render
$datasetTableContainer.find('img').xiboImageRender(properties);
]]></onTemplateRender>
<assets>
<asset id="dark-round" type="path" mimeType="image/png" cmsOnly="true" path="/modules/assets/template-thumbnails/dataset/6-dark-round.png" />
Expand Down Expand Up @@ -2728,11 +2728,11 @@ $datasetTableContainer.appendTo($(target).find('#content'));
// Scale the layout
$(target).xiboLayoutScaler(properties);
// Image render
$datasetTableContainer.find('img').xiboImageRender(properties);
// Call render
$datasetTableContainer.dataSetRender(properties);
// Image render
$datasetTableContainer.find('img').xiboImageRender(properties);
]]></onTemplateRender>
<assets>
<asset id="pill-colored" type="path" mimeType="image/png" cmsOnly="true" path="/modules/assets/template-thumbnails/dataset/7-pill-colored.png" />
Expand Down Expand Up @@ -3487,10 +3487,9 @@ if (
}
// Render
$(target).find('img').xiboImageRender(properties);
$(target).xiboLayoutScaler(properties);
$(target).xiboTextRender(properties, $(target).find('#content > *'));
$(target).find('img').xiboImageRender(properties);
]]></onTemplateRender>
<onTemplateVisible><![CDATA[
// Start effects for this template
Expand Down
Loading

0 comments on commit ba96c20

Please sign in to comment.