Skip to content
Code-Schnipsel Gruppen Projekte
Commit f334ee75 erstellt von Henning Leutz's avatar Henning Leutz :martial_arts_uniform:
Dateien durchsuchen

fix: default values bei infinite children slider

Übergeordneter a9b8fd1e
No related branches found
No related tags found
Keine zugehörigen Merge Requests gefunden
Pipeline #2522 übersprungen
......@@ -32,10 +32,10 @@ function ($brickId, $brickUID, $row) {
$Infinite = new Infinite($settings);
$Engine->assign(array(
'children' => $Infinite->getRow((int)$row),
'row' => (int)$row,
'this' => $Infinite,
'gridClass' =>$Infinite->getAttribute('gridClass')
'children' => $Infinite->getRow((int)$row),
'row' => (int)$row,
'this' => $Infinite,
'gridClass' => $Infinite->getAttribute('gridClass')
));
return $Engine->fetch($Infinite->getRowTemplate());
......
......@@ -50,37 +50,45 @@ public function getBody()
{
$Engine = QUI::getTemplateManager()->getEngine();
$children = '';
$rows = $this->getAttribute('rows');
switch ($this->getAttribute('childrenPerRow')) {
case 2 :
case 2:
$this->setAttribute('gridClass', 'grid-50');
break;
case 3 :
case 3:
$this->setAttribute('gridClass', 'grid-33');
break;
case 4 :
case 4:
$this->setAttribute('gridClass', 'grid-25');
break;
case 5 :
case 5:
$this->setAttribute('gridClass', 'grid-20');
break;
default :
default:
$this->setAttribute('gridClass', 'grid-25');
}
$this->setAttribute(
'data-qui-options-childrenperrow',
$this->getAttribute('childrenPerRow')
);
for ($i = 0, $len = (int)$this->getAttribute('rows'); $i < $len; $i++) {
$rows = (int)$rows;
if (empty($rows)) {
$rows = 1;
}
for ($i = 0, $len = $rows; $i < $len; $i++) {
$Engine->assign(array(
'children' => $this->getRow($i),
'row' => $i,
'this' => $this,
'children' => $this->getRow($i),
'row' => $i,
'this' => $this,
'gridClass' => $this->getAttribute('gridClass')
));
......
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