From 268b47ada5f5d35583e8d98e3aa4d8ca539f1791 Mon Sep 17 00:00:00 2001 From: Helmut Hackbarth Date: Wed, 27 Apr 2022 19:36:38 +0200 Subject: [PATCH] New release v5.1.11 --- Classes/Command/CustomScss.php | 3 +-- Classes/Components/Card.php | 1 + Classes/Controller/ConfigController.php | 3 +-- Classes/DataProcessing/BootstrapProcessor.php | 2 +- Classes/Helper/ClassHelper.php | 3 +++ Configuration/TypoScript/constants.typoscript | 3 +++ Resources/Private/Backend/Templates/Config/List.html | 2 +- ext_emconf.php | 2 +- 8 files changed, 12 insertions(+), 7 deletions(-) diff --git a/Classes/Command/CustomScss.php b/Classes/Command/CustomScss.php index 6e58e3de..bc2cdae0 100644 --- a/Classes/Command/CustomScss.php +++ b/Classes/Command/CustomScss.php @@ -152,8 +152,7 @@ protected function execute(InputInterface $input, OutputInterface $output) GeneralUtility::writeFile($customFile, $customContent); # Custom -# $customDir = 'fileadmin/T3SB/Resources/Public/SCSS/'; - $customDir = $settings['customScssPath'] ? $settings['customScssPath'] : 'fileadmin/T3SB/Resources/Public/SCSS/'; + $customDir = !empty($settings['customScssPath']) ? $settings['customScssPath'] : 'fileadmin/T3SB/Resources/Public/SCSS/'; $customPath = GeneralUtility::getFileAbsFileName($customDir); $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable('pages'); diff --git a/Classes/Components/Card.php b/Classes/Components/Card.php index f9c32e04..c4bb265b 100644 --- a/Classes/Components/Card.php +++ b/Classes/Components/Card.php @@ -113,6 +113,7 @@ public function getProcessedData(array $processedData, array $flexconf): array } // class $cardClass = 'card'; + $cardClass = $processedData['class']; $cardClass .= !empty($parentflexconf['equalHeight']) ? ' h-100' : ''; if ( $processedData['data']['tx_t3sbootstrap_textcolor'] ) { diff --git a/Classes/Controller/ConfigController.php b/Classes/Controller/ConfigController.php index 22f0f99d..f721a842 100644 --- a/Classes/Controller/ConfigController.php +++ b/Classes/Controller/ConfigController.php @@ -461,7 +461,7 @@ protected function overrideConfig(): array public function getCustomScss( string $file ): array { $assignedOptions = []; - $customScssDir = 'fileadmin/T3SB/Resources/Public/SCSS/'; + $customScssDir = !empty($this->settings['customScssPath']) ? $this->settings['customScssPath'] : 'fileadmin/T3SB/Resources/Public/SCSS/'; $customScssFilePath = GeneralUtility::getFileAbsFileName($customScssDir); $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable('pages'); $result = $queryBuilder @@ -503,7 +503,6 @@ public function getCustomScss( string $file ): array } else { $scss = !empty($arguments[$file]) ? $arguments[$file] : ''; } - if ($scss) { $assignedOptions[$file] = $scss; $handle = fopen($customScssFile, 'w') or die('Cannot open file: '.$customScssFile); diff --git a/Classes/DataProcessing/BootstrapProcessor.php b/Classes/DataProcessing/BootstrapProcessor.php index aa9e55f1..4e7c9a46 100644 --- a/Classes/DataProcessing/BootstrapProcessor.php +++ b/Classes/DataProcessing/BootstrapProcessor.php @@ -300,7 +300,7 @@ public function process(ContentObjectRenderer $cObj, array $contentObjectConfigu (int)$processorConfiguration['defaultHeaderType'], $processorConfiguration['contentMarginTop'], $extConf['animateCss'], $parentCType); // trim header - $processedData['data']['header'] = trim($processedData['data']['header']); + $processedData['data']['header'] = !empty($processedData['data']['header']) ? trim($processedData['data']['header']) : ''; $processedData['style'] .= ' '.$processedData['data']['tx_t3sbootstrap_extra_style']; $processedData['style'] = trim($processedData['style']); diff --git a/Classes/Helper/ClassHelper.php b/Classes/Helper/ClassHelper.php index e396e4bc..2145b781 100644 --- a/Classes/Helper/ClassHelper.php +++ b/Classes/Helper/ClassHelper.php @@ -21,6 +21,9 @@ class ClassHelper implements SingletonInterface */ public function getDefaultClass(array $data, array $flexconf, string $cTypeClass): string { + + + // class if ( $cTypeClass ) { $class = 'fsc-default ce-'. $data['CType']; diff --git a/Configuration/TypoScript/constants.typoscript b/Configuration/TypoScript/constants.typoscript index 0051cab8..7cc70538 100644 --- a/Configuration/TypoScript/constants.typoscript +++ b/Configuration/TypoScript/constants.typoscript @@ -196,6 +196,9 @@ bootstrap.config.darkMode = 0 # include print template bootstrap.print.enable = 0 +# Custom path to your custom.scss files: e.g.: fileadmin/T3SB/Resources/Public/SCSS/ (clear cache and run the Scheduler). +bootstrap.customScssPath = + # disable default CSS - t3sbootstrap.css bootstrap.config.disableDefaultCss = 0 diff --git a/Resources/Private/Backend/Templates/Config/List.html b/Resources/Private/Backend/Templates/Config/List.html index a43c5cbd..941450ac 100644 --- a/Resources/Private/Backend/Templates/Config/List.html +++ b/Resources/Private/Backend/Templates/Config/List.html @@ -148,7 +148,7 @@

Configuration

- You can override default Bootstrap variables in fileadmin/T3SB/Resources/Public/SCSS/custom-variables.scss + You can override default Bootstrap variables in {settings.customScssPath} without modifying source files.
Clean up temporary files in typo3temp/assets/t3sbootstrap/css/ after edit this file!

diff --git a/ext_emconf.php b/ext_emconf.php index 0426a652..055e053f 100644 --- a/ext_emconf.php +++ b/ext_emconf.php @@ -19,7 +19,7 @@ 'state' => 'stable', 'clearCacheOnLoad' => true, 'author_company' => 't3solution', - 'version' => '5.1.10', + 'version' => '5.1.11', 'constraints' => [ 'depends' => [ 'typo3' => '10.4.18-11.9.99',