mirror of
https://github.com/gantry/gantry5.git
synced 2026-08-19 01:15:04 -05:00
Fixed rendering issue in layout if all blocks next to each other are Fixed Size and some of them have nothing in them
This commit is contained in:
+4
-1
@@ -1,8 +1,11 @@
|
||||
# 5.2.15
|
||||
## XX/XX/2016
|
||||
|
||||
1. [Common](#common)
|
||||
3. [](#bugfix)
|
||||
- Fixed rendering issue in layout if all blocks next to each other are `Fixed Size` and some of them have nothing in them
|
||||
2. [Joomla](#joomla)
|
||||
1. [](#new)
|
||||
2. [](#improved)
|
||||
- Enable HTML5 document support from Joomla
|
||||
|
||||
# 5.2.14
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
{% endfor %}
|
||||
{% endset %}
|
||||
|
||||
{% if html|trim %}
|
||||
{% if segment.attributes.sticky or html|trim %}
|
||||
{% set classes = segment.attributes.class ? ' ' ~ segment.attributes.class|e %}
|
||||
{% set attr_extra = '' %}
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
{% endfor %}
|
||||
{% endset %}
|
||||
|
||||
{% if offcanvas|trim %}
|
||||
{% if segment.attributes.sticky or offcanvas|trim %}
|
||||
<div id="g-offcanvas" {{ attr_class|raw }}{{ attr_extra|raw }} data-g-offcanvas-swipe="{{ segment.attributes.swipe|default('1') }}" data-g-offcanvas-css3="{{ segment.attributes.css3animation|default('1') }}">
|
||||
{{ offcanvas|raw }}
|
||||
</div>
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
{% endif %}
|
||||
{% endset %}
|
||||
|
||||
{% if html|trim %}
|
||||
{% if segment.attributes.sticky or html|trim %}
|
||||
{% if boxed is not null and (boxed == 0 or boxed == 2) %}
|
||||
{% set html %}
|
||||
<div class="g-container">{{ html|raw }}</div>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
{% endfor %}
|
||||
{% endset %}
|
||||
|
||||
{% if html|trim %}
|
||||
{% if segment.attributes.sticky or html|trim %}
|
||||
{% set id = segment.attributes.id|default('g-' ~ segment.id) %}
|
||||
{% set attr_extra = '' %}
|
||||
|
||||
|
||||
@@ -477,17 +477,25 @@ trait ThemeTrait
|
||||
* Action is needed before displaying the layout as it recalculates block widths based on the visible content.
|
||||
*
|
||||
* @param array $items
|
||||
* @param bool $temporary
|
||||
* @param bool $sticky
|
||||
* @internal
|
||||
*/
|
||||
protected function prepareLayout(array &$items)
|
||||
protected function prepareLayout(array &$items, $temporary = false, $sticky = false)
|
||||
{
|
||||
foreach ($items as $i => &$item) {
|
||||
// Non-numeric items are meta-data which should be ignored.
|
||||
if (((string)(int) $i !== (string) $i) || !is_object($item)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!empty($item->children)) {
|
||||
$this->prepareLayout($item->children);
|
||||
$fixed = true;
|
||||
foreach ($item->children as $child) {
|
||||
$fixed &= !empty($child->attributes->fixed);
|
||||
}
|
||||
|
||||
$this->prepareLayout($item->children, $fixed, $temporary);
|
||||
}
|
||||
|
||||
// TODO: remove hard coded types.
|
||||
@@ -508,6 +516,11 @@ trait ThemeTrait
|
||||
break;
|
||||
|
||||
default:
|
||||
if ($sticky) {
|
||||
$item->attributes->sticky = 1;
|
||||
break;
|
||||
}
|
||||
|
||||
if (empty($item->children)) {
|
||||
unset($items[$i]);
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user