Skip to content
Code-Schnipsel Gruppen Projekte
Commit 40061336 erstellt von Michael's avatar Michael
Dateien durchsuchen

refactor: infinity Brick. nachladen funktioniert immer noch nicht ganz gut

Übergeordneter be493e95
No related branches found
No related tags found
Keine zugehörigen Merge Requests gefunden
Pipeline #2332 übersprungen
......@@ -33,7 +33,9 @@ function ($brickId, $brickUID, $row) {
$Engine->assign(array(
'children' => $Infinite->getRow((int)$row),
'row' => (int)$row
'row' => (int)$row,
'this' => $Infinite,
'gridClass' =>$Infinite->getAttribute('gridClass')
));
return $Engine->fetch($Infinite->getRowTemplate());
......
......@@ -22,7 +22,7 @@ public function __construct($attributes = array())
{
$childrenPerRow = $this->getAttribute('childrenPerRow');
$rows = $this->getAttribute('rows');
// default options
$this->setAttributes(array(
'class' => 'quiqqer-bricks-children-infinite',
......@@ -51,8 +51,7 @@ public function getBody()
$Engine = QUI::getTemplateManager()->getEngine();
$children = '';
switch ($this->getAttribute('childrenPerRow'))
{
switch ($this->getAttribute('childrenPerRow')) {
case 2 :
$this->setAttribute('gridClass', 'grid-50');
break;
......@@ -69,6 +68,8 @@ public function getBody()
$this->setAttribute('gridClass', 'grid-25');
}
$this->setAttribute(
'data-qui-options-childrenperrow',
$this->getAttribute('childrenPerRow')
......@@ -79,15 +80,16 @@ public function getBody()
$Engine->assign(array(
'children' => $this->getRow($i),
'row' => $i,
'this' => $this
'this' => $this,
'gridClass' => $this->getAttribute('gridClass')
));
$children .= $Engine->fetch($this->getRowTemplate());
}
$Engine->assign(array(
'this' => $this,
'children' => $children
'this' => $this,
'children' => $children
));
return $Engine->fetch(dirname(__FILE__) . '/Infinite.html');
......
<div data-row="{$row}" class="quiqqer-bricks-children-infinite-row">
{foreach from=$children item=Child}
{assign var=gridClass value=$this->getAttribute('gridClass')}
<div class="{$gridClass} mobile-grid-50 quiqqer-bricks-children-infinite-child">
<article class="quiqqer-bricks-children-infinite-child-display">
{assign var=attrTitle value=$Child->getAttribute('title')|escape:"html"}
......
0% oder .
You are about to add 0 people to the discussion. Proceed with caution.
Bearbeitung dieser Nachricht zuerst beenden!
Bitte registrieren oder zum Kommentieren