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

fix: #62

Übergeordneter a1f5e6e4
No related branches found
No related tags found
Keine zugehörigen Merge Requests gefunden
......@@ -18,9 +18,9 @@ function ($brickId) {
$Brick = $BrickManager->getBrickById($brickId);
return array(
'attributes' => $Brick->getAttributes(),
'settings' => $Brick->getSettings(),
'customfields' => $Brick->getCustomFields(),
'attributes' => $Brick->getAttributes(),
'settings' => $Brick->getSettings(),
'customfields' => $Brick->getCustomFields(),
'availableSettings' => $BrickManager->getAvailableBrickSettingsByBrickType(
$Brick->getAttribute('type')
)
......
......@@ -174,6 +174,16 @@ define('package/quiqqer/bricks/bin/BrickEdit', [
})
});
// brick xml settings
var type = brick.attributes.type;
var data = bricks.filter(function (entry) {
return entry.control === type;
});
if (data.length && data[0].hasContent === 0) {
this.getCategory('content').hide();
}
this.refresh();
this.fireEvent('loaded', [this]);
......
......@@ -2,7 +2,7 @@
<quiqqer>
<bricks>
<!-- available standard bricks -->
<brick control="\QUI\Controls\Breadcrumb">
<brick control="\QUI\Controls\Breadcrumb" hasContent="0">
<title>
<locale group="quiqqer/bricks" var="brick.control.breadcrumb.title"/>
</title>
......
......@@ -79,7 +79,8 @@ public function __construct($params = array())
'height' => '',
'width' => '',
'classes' => '',
'frontendTitle' => ''
'frontendTitle' => '',
'hasContent' => 1
);
$this->setAttributes($default);
......
......@@ -121,8 +121,16 @@ public static function getTypeTemplateAreasFromXML($file, $siteType)
*/
public static function parseAreaToArray(\DOMElement $Brick, \DOMXPath $Path)
{
$control = $Brick->getAttribute('control');
$name = $Brick->getAttribute('name');
$control = $Brick->getAttribute('control');
$name = $Brick->getAttribute('name');
$hasContent = 1;
if ($Brick->hasAttribute('hasContent')
&& (int)$Brick->getAttribute('hasContent') === 0) {
$hasContent = 0;
}
$title = array();
$description = array();
......@@ -145,6 +153,7 @@ public static function parseAreaToArray(\DOMElement $Brick, \DOMXPath $Path)
return array(
'control' => $control,
'hasContent' => $hasContent,
'name' => $name,
'title' => $title,
'description' => $description,
......
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