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