Skip to content

Commit

Permalink
Merge pull request #50 from oveleon/develop
Browse files Browse the repository at this point in the history
Merge develop
  • Loading branch information
doishub authored Aug 13, 2021
2 parents 66dda0a + 7d5d75f commit 8a0253e
Show file tree
Hide file tree
Showing 9 changed files with 51 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/Resources/contao/classes/Sync.php
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ public function importStyleManagerFile(array $arrFiles)
$strName = $archive->item($a)->getAttribute('title');
$strValue = $archive->item($a)->nodeValue;

if($strName === 'id')
if($strName === 'id' || strtolower($strValue) === 'null')
{
continue;
}
Expand Down
11 changes: 10 additions & 1 deletion src/Resources/contao/dca/tl_style_manager_archive.php
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@
// Palettes
'palettes' => array
(
'default' => '{title_legend},title,identifier;{config_legend},groupAlias,sorting'
'default' => '{title_legend},title,identifier;{config_legend},groupAlias,sorting;desc'
),

// Fields
Expand All @@ -130,6 +130,15 @@
'eval' => array('mandatory'=>true, 'maxlength'=>255, 'tl_class'=>'w50'),
'sql' => "varchar(255) NOT NULL default ''"
),
'desc' => array
(
'label' => &$GLOBALS['TL_LANG']['tl_style_manager_archive']['desc'],
'exclude' => true,
'search' => true,
'inputType' => 'textarea',
'eval' => array('style'=>'height:60px', 'decodeEntities'=>true, 'tl_class'=>'clr'),
'sql' => "text NULL"
),
'identifier' => array
(
'label' => &$GLOBALS['TL_LANG']['tl_style_manager_archive']['identifier'],
Expand Down
10 changes: 9 additions & 1 deletion src/Resources/contao/languages/de/tl_style_manager_archive.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,14 @@
<source>Title or category name.</source>
<target>Titel oder Kategoriename.</target>
</trans-unit>
<trans-unit id="tl_style_manager_archive.desc.0">
<source>Description</source>
<target>Beschreibung</target>
</trans-unit>
<trans-unit id="tl_style_manager_archive.desc.1">
<source>Here you can enter a description for your CSS groups contained in this category. The description is displayed above the fields.</source>
<target>Hier kannst du eine Beschreibung für deine in dieser Kategorie enthaltenen CSS-Gruppen hinterlegen. Die Beschreibung wird oberhalb der Felder angezeigt.</target>
</trans-unit>
<trans-unit id="tl_style_manager_archive.identifier.0">
<source>Identifier</source>
<target>Kennung</target>
Expand All @@ -112,7 +120,7 @@
</trans-unit>
<trans-unit id="tl_style_manager_archive.sorting.1">
<source>Enter a freely definable number here to define the sort index. This is used to determine the order of the categories in the backend.</source>
<target>Geben Sie hier frei definierbare Zahl ein, um den Sortierindex zu definieren. Dieser dient dazu, die Reihenfolge der Kategorien im Backend zu bestimmen.</target>
<target>Geben Sie hier eine frei definierbare Zahl ein, um den Sortierindex zu definieren. Dieser dient dazu, die Reihenfolge der Kategorien im Backend zu bestimmen.</target>
</trans-unit>
</body>
</file>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,12 @@
<trans-unit id="tl_style_manager_archive.title.1">
<source>Title or category name.</source>
</trans-unit>
<trans-unit id="tl_style_manager_archive.desc.0">
<source>Description</source>
</trans-unit>
<trans-unit id="tl_style_manager_archive.desc.1">
<source>Here you can enter a description for your CSS groups contained in this category. The description is displayed above the fields.</source>
</trans-unit>
<trans-unit id="tl_style_manager_archive.identifier.0">
<source>Identifier</source>
</trans-unit>
Expand Down
1 change: 1 addition & 0 deletions src/Resources/contao/models/StyleManagerArchiveModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
* @property integer $id
* @property integer $tstamp
* @property string $title
* @property string $desc
* @property string $identifier
* @property string $groupAlias
* @property string $description
Expand Down
5 changes: 4 additions & 1 deletion src/Resources/contao/widgets/ComponentStyleSelect.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ public function generate()
$arrArchives[ $objStyleArchives->id ] = array(
'title' => $objStyleArchives->title,
'identifier' => $objStyleArchives->identifier,
'desc' => $objStyleArchives->desc,
'group' => $objStyleArchives->groupAlias,
'model' => $objStyleArchives->current()
);
Expand Down Expand Up @@ -192,6 +193,7 @@ public function generate()
{
$arrCollection[ $collectionAlias ] = array(
'label' => $arrArchives[ $objStyleGroups->pid ]['title'],
'desc' => $arrArchives[ $objStyleGroups->pid ]['desc'],
'group' => $groupAlias,
'fields' => array()
);
Expand Down Expand Up @@ -264,8 +266,9 @@ public function generate()
$group['label']
);

$arrContent[ $index ] = sprintf('<div id="tab-%s" class="tab-content">%s</div>',
$arrContent[ $index ] = sprintf('<div id="tab-%s" class="tab-content">%s%s</div>',
$identifier,
(trim($group['desc']) ? '<div class="long desc">' . $this->replaceInsertTags(nl2br($group['desc'])) . '</div>' : ''),
implode("", $group['fields'])
);

Expand Down
11 changes: 9 additions & 2 deletions src/Resources/public/stylemanager.css
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,15 @@
content: "";
display: table;
}
.widget.stylemanager .tab-content > div.desc {
padding-top: 13px;
padding-bottom: 20px;
margin-bottom: 7px;
min-height: auto;
color: #4c4c4c;
line-height: 1.3;
border-bottom: 1px solid #e6e6e8;
}
.widget.stylemanager .tab-content > hr {
float: left;
clear: both;
Expand Down Expand Up @@ -152,5 +161,3 @@
width: calc(100% - 30px);
}
}

/*# sourceMappingURL=stylemanager.css.map */
2 changes: 1 addition & 1 deletion src/Resources/public/stylemanager.css.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions src/Resources/public/stylemanager.scss
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,16 @@
display: table;
}
}

&.desc{
padding-top: 13px;
padding-bottom: 20px;
margin-bottom: 7px;
min-height: auto;
color: #4c4c4c;
line-height: 1.3;
border-bottom: 1px solid #e6e6e8;
}
}

> hr{
Expand Down

0 comments on commit 8a0253e

Please sign in to comment.