Skip to content

Commit

Permalink
[TASK] Make sure colPos is present for flux:grid.column
Browse files Browse the repository at this point in the history
  • Loading branch information
outdoorsman committed Oct 1, 2018
1 parent 812ae1d commit 46d37ea
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 21 deletions.
2 changes: 1 addition & 1 deletion Resources/Private/Templates/Content/Accordion.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<v:condition.type.isArray value="{panels}">
<f:for each="{panels}" as="panel" iteration="iteration">
<flux:grid.row>
<flux:grid.column name="content.{iteration.index}" label="{f:if(condition: panel.panel.title, then: panel.panel.title, else: 'Content, panel #{iteration.cycle} ({panel.panel.id})')}" />
<flux:grid.column colPos="1" name="content.{iteration.index}" label="{f:if(condition: panel.panel.title, then: panel.panel.title, else: 'Content, panel #{iteration.cycle} ({panel.panel.id})')}" />
</flux:grid.row>
</f:for>
</v:condition.type.isArray>
Expand Down
2 changes: 1 addition & 1 deletion Resources/Private/Templates/Content/Carousel.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<f:for each="{element}" key="elementType" as="elementData">
<f:if condition="{0: elementType} == {0: 'content'}">
<flux:grid.row>
<flux:grid.column name="{elementData.id}" label="{v:l(key: 'flux.carousel.label.grid.column.prefix')}: {elementData.id}" />
<flux:grid.column colPos="1" name="{elementData.id}" label="{v:l(key: 'flux.carousel.label.grid.column.prefix')}: {elementData.id}" />
</flux:grid.row>
</f:if>
</f:for>
Expand Down
8 changes: 4 additions & 4 deletions Resources/Private/Templates/Content/FourColumn.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ <h3><v:l key="flux.grid4.label.customize.column.settings"/>:</h3>
</f:if>
<flux:grid>
<flux:grid.row>
<flux:grid.column style="width: 25%;border-right: 1px dotted #999;" name="column1" />
<flux:grid.column style="width: 25%;border-right: 1px dotted #999;" name="column2" />
<flux:grid.column style="width: 25%;border-right: 1px dotted #999;" name="column3" />
<flux:grid.column style="width: 25%;" name="column4" />
<flux:grid.column colPos="1" style="width: 25%;border-right: 1px dotted #999;" name="column1" />
<flux:grid.column colPos="2" style="width: 25%;border-right: 1px dotted #999;" name="column2" />
<flux:grid.column colPos="3" style="width: 25%;border-right: 1px dotted #999;" name="column3" />
<flux:grid.column colPos="4" style="width: 25%;" name="column4" />
</flux:grid.row>
</flux:grid>
</flux:form.sheet>
Expand Down
2 changes: 1 addition & 1 deletion Resources/Private/Templates/Content/Row.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<f:for each="{columns}" as="sectionObject" iteration="iteration">
<v:variable.set name="width" value="{sectionObject.column.class -> v:format.substring(start: 7)}" />
<v:variable.set name="percent" value="{width -> v:math.division(b: numberOfColumns) -> v:math.product(b: 100) -> v:math.round(decimals: 2)}" />
<flux:grid.column style="width: {percent}%" name="column{iteration.cycle}" label="{percent}%" />
<flux:grid.column colPos="1" style="width: {percent}%" name="column{iteration.cycle}" label="{percent}%" />
</f:for>
</v:condition.type.isArray>
</flux:grid.row>
Expand Down
12 changes: 6 additions & 6 deletions Resources/Private/Templates/Content/SixColumn.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ <h3><v:l key="flux.grid6.label.customize.column.settings"/>:</h3>
</f:if>
<flux:grid>
<flux:grid.row>
<flux:grid.column style="width: 16%;border-right: 1px dotted #999;" name="column1" />
<flux:grid.column style="width: 16%;border-right: 1px dotted #999;" name="column2" />
<flux:grid.column style="width: 16%;border-right: 1px dotted #999;" name="column3" />
<flux:grid.column style="width: 16%;border-right: 1px dotted #999;" name="column4" />
<flux:grid.column style="width: 16%;border-right: 1px dotted #999;" name="column5" />
<flux:grid.column style="width: 16%;" name="column6" />
<flux:grid.column colPos="1" style="width: 16%;border-right: 1px dotted #999;" name="column1" />
<flux:grid.column colPos="2" style="width: 16%;border-right: 1px dotted #999;" name="column2" />
<flux:grid.column colPos="3" style="width: 16%;border-right: 1px dotted #999;" name="column3" />
<flux:grid.column colPos="4" style="width: 16%;border-right: 1px dotted #999;" name="column4" />
<flux:grid.column colPos="5" style="width: 16%;border-right: 1px dotted #999;" name="column5" />
<flux:grid.column colPos="6" style="width: 16%;" name="column6" />
</flux:grid.row>
</flux:grid>
</flux:form.sheet>
Expand Down
2 changes: 1 addition & 1 deletion Resources/Private/Templates/Content/Tabs.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<f:if condition="{tabs}">
<v:condition.type.isArray value="{tabs}">
<f:for each="{tabs}" as="tab" iteration="iteration">
<flux:grid.column style="width: {v:math.division(b: '{tabs -> f:count()}', a: 100)}%"
<flux:grid.column colPos="1" style="width: {v:math.division(b: '{tabs -> f:count()}', a: 100)}%"
name="content.{iteration.index}" label="{tab.tab.title}" />
</f:for>
</v:condition.type.isArray>
Expand Down
9 changes: 6 additions & 3 deletions Resources/Private/Templates/Content/ThreeColumn.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ <h3><v:l key="flux.grid3.label.customize.column.settings"/>:</h3>
<f:else>
<flux:grid>
<flux:grid.row>
<flux:grid.column style="width: 33.333%;border-right: 1px dotted #999;" name="column1"/>
<flux:grid.column style="width: 33.333%;border-right: 1px dotted #999;" name="column2"/>
<flux:grid.column style="width: 33.333%;" name="column3"/>
<flux:grid.column colPos="1" style="width: 33.333%;border-right: 1px dotted #999;" name="column1"/>
<flux:grid.column colPos="2" style="width: 33.333%;border-right: 1px dotted #999;" name="column2"/>
<flux:grid.column colPos="3" style="width: 33.333%;" name="column3"/>
</flux:grid.row>
</flux:grid>
</f:else>
Expand Down Expand Up @@ -72,12 +72,15 @@ <h3><v:l key="flux.grid3.label.customize.column.settings"/>:</h3>
<flux:grid>
<flux:grid.row>
<flux:grid.column
colPos="1"
style="width: 33.333%;border-right: 1px dotted #999;" name="column1"
label="{v:l(key: 'flux.grid3.columns.column1')} ({settings.grid3.col1width})"/>
<flux:grid.column
colPos="2"
style="width: 33.333%;border-right: 1px dotted #999;" name="column2"
label="{v:l(key: 'flux.grid3.columns.column2')} ({settings.grid3.col2width})"/>
<flux:grid.column
colPos="3"
style="width: 33.333%;" name="column3"
label="{v:l(key: 'flux.grid3.columns.column3')} ({settings.grid3.col3width})"/>
</flux:grid.row>
Expand Down
8 changes: 4 additions & 4 deletions Resources/Private/Templates/Content/TwoColumn.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ <h3><v:l key="flux.grid2.label.customize.column.settings"/>:</h3>
<f:else>
<flux:grid>
<flux:grid.row>
<flux:grid.column style="width: 50%;border-right: 1px dotted #999;" name="column1"/>
<flux:grid.column style="width: 50%;" name="column2"/>
<flux:grid.column colPos="1" style="width: 50%;border-right: 1px dotted #999;" name="column1"/>
<flux:grid.column colPos="2" style="width: 50%;" name="column2"/>
</flux:grid.row>
</flux:grid>
</f:else>
Expand Down Expand Up @@ -55,8 +55,8 @@ <h3><v:l key="flux.grid2.label.customize.column.settings"/>:</h3>
default="col-sm-6" />
<flux:grid>
<flux:grid.row>
<flux:grid.column style="width: 50%;border-right: 1px dotted #999;" name="column1" label="{v:l(key: 'flux.grid2.columns.column1')} ({settings.grid2.col1width})" />
<flux:grid.column style="width: 50%;" name="column2" label="{v:l(key: 'flux.grid2.columns.column2')} ({settings.grid2.col2width})" />
<flux:grid.column colPos="1" style="width: 50%;border-right: 1px dotted #999;" name="column1" label="{v:l(key: 'flux.grid2.columns.column1')} ({settings.grid2.col1width})" />
<flux:grid.column colPos="2" style="width: 50%;" name="column2" label="{v:l(key: 'flux.grid2.columns.column2')} ({settings.grid2.col2width})" />
</flux:grid.row>
</flux:grid>
</f:section>
Expand Down

0 comments on commit 46d37ea

Please sign in to comment.