Skip to content

Commit

Permalink
Elements: Weather PR clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
rubenberttpingol committed Jul 20, 2023
1 parent ec8d489 commit 4edb0eb
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 8 additions & 2 deletions modules/templates/forecast-elements.xml
Original file line number Diff line number Diff line change
Expand Up @@ -358,9 +358,15 @@ if (meta && meta.hasOwnProperty('Attribution')) {
<type>element</type>
<dataType>forecast</dataType>
<canRotate>true</canRotate>
<thumbnail>weather-date-thumb</thumbnail>
<thumbnail>weather-date</thumbnail>
<startWidth>420</startWidth>
<startHeight>100</startHeight>
<properties>
<property id="dateFormat" type="text">
<title>Date Format</title>
<default>MMM D</default>
</property>
</properties>
<onTemplateRender><![CDATA[
// Match all affected elements and get date div value
$(target).find('.date').each(function(_idx, dateEl){
Expand All @@ -374,7 +380,7 @@ $(target).find('.date').each(function(_idx, dateEl){
});
]]></onTemplateRender>
<assets>
<asset id="weather-date-thumb" type="path" cmsOnly="true" mimeType="image/png" path="/modules/assets/template-thumbnails/global/date.png" />
<asset id="weather-date" type="path" cmsOnly="true" mimeType="image/png" path="/modules/assets/template-thumbnails/forecast/elements/weather-date.png" />
</assets>
</template>
</templates>
4 changes: 2 additions & 2 deletions modules/templates/global-elements.xml
Original file line number Diff line number Diff line change
Expand Up @@ -198,9 +198,9 @@
<title>Date</title>
<default></default>
</property>
<property id="dateFormat" type="text">
<property id="dateFormat" type="text" variant="dateFormat">
<title>Date Format</title>
<default>DD/MM/YYYY HH:mm:ss</default>
<default>#DATE_FORMAT#</default>
</property>
<property id="fontFamily" type="fontSelector">
<title>Font Family</title>
Expand Down

0 comments on commit 4edb0eb

Please sign in to comment.