[BUGFIX] EM: Colorpicker in extension configuration is broken 27/19627/2
authorWouter Wolters <typo3@wouterwolters.nl>
Fri, 5 Apr 2013 18:25:21 +0000 (20:25 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Fri, 5 Apr 2013 20:18:53 +0000 (22:18 +0200)
The colorpicker in extension configruation is broken. This is
because of missing images.

Also this fixes an issue with duplicate ID tags on a page. Which
causes some problem when CSS is defined on the same name.

Change-Id: I5c3b7005cd0f1df9399c0e1506bd8d408d661743
Fixes: #46021
Fixes: #46953
Releases: 6.1, 6.0
Reviewed-on: https://review.typo3.org/19627
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
typo3/sysext/extensionmanager/Classes/ViewHelpers/Form/TypoScriptConstantsViewHelper.php
typo3/sysext/extensionmanager/Resources/Public/Contrib/Farbtastic/marker.png [new file with mode: 0644]
typo3/sysext/extensionmanager/Resources/Public/Contrib/Farbtastic/mask.png [new file with mode: 0644]
typo3/sysext/extensionmanager/Resources/Public/Contrib/Farbtastic/wheel.png [new file with mode: 0644]

index bd7da58..3533974 100644 (file)
@@ -90,14 +90,14 @@ class TypoScriptConstantsViewHelper extends \TYPO3\CMS\Fluid\Core\ViewHelper\Abs
                $this->tag->setTagName('input');
                $this->tag->addAttribute('type', 'text');
                $this->tag->addAttribute('name', $this->getName($configuration));
-               $this->tag->addAttribute('id', $configuration->getName());
+               $this->tag->addAttribute('id', 'em-' . $configuration->getName());
                $doc = $this->getDocInstance();
                $pageRenderer = $doc->getPageRenderer();
                $pageRenderer->addCssFile('sysext/extensionmanager/Resources/Public/Contrib/Farbtastic/farbtastic.css');
                $pageRenderer->addJsFile('sysext/extensionmanager/Resources/Public/Contrib/Farbtastic/farbtastic.js');
                $pageRenderer->addJsInlineCode('colorpicker', '
                        jQuery(document).ready(function() {
-                               jQuery(".colorPicker").farbtastic("#' . $configuration->getName() . '");
+                               jQuery(".colorPicker").farbtastic("#em-' . $configuration->getName() . '");
                        });
                ');
                if ($configuration->getValue() !== NULL) {
@@ -116,7 +116,7 @@ class TypoScriptConstantsViewHelper extends \TYPO3\CMS\Fluid\Core\ViewHelper\Abs
                $this->tag->setTagName('input');
                $this->tag->addAttribute('type', 'text');
                $this->tag->addAttribute('name', $this->getName($configuration));
-               $this->tag->addAttribute('id', $configuration->getName());
+               $this->tag->addAttribute('id', 'em-' . $configuration->getName());
                $this->tag->addAttribute('class', 'offset');
                if ($configuration->getValue() !== NULL) {
                        $this->tag->addAttribute('value', $configuration->getValue());
@@ -134,7 +134,7 @@ class TypoScriptConstantsViewHelper extends \TYPO3\CMS\Fluid\Core\ViewHelper\Abs
                $this->tag->setTagName('input');
                $this->tag->addAttribute('type', 'text');
                $this->tag->addAttribute('name', $this->getName($configuration));
-               $this->tag->addAttribute('id', $configuration->getName());
+               $this->tag->addAttribute('id', 'em-' . $configuration->getName());
                $this->tag->addAttribute('class', 'wrap');
                if ($configuration->getValue() !== NULL) {
                        $this->tag->addAttribute('value', $configuration->getValue());
@@ -150,7 +150,7 @@ class TypoScriptConstantsViewHelper extends \TYPO3\CMS\Fluid\Core\ViewHelper\Abs
         */
        protected function renderOptionSelect(\TYPO3\CMS\Extensionmanager\Domain\Model\ConfigurationItem $configuration) {
                $this->tag->addAttribute('name', $this->getName($configuration));
-               $this->tag->addAttribute('id', $configuration->getName());
+               $this->tag->addAttribute('id', 'em-' . $configuration->getName());
                $this->tag->setTagName('select');
                $optionValueArray = $configuration->getGeneric();
                $output = '';
@@ -176,7 +176,7 @@ class TypoScriptConstantsViewHelper extends \TYPO3\CMS\Fluid\Core\ViewHelper\Abs
                $this->tag->addAttribute('type', 'number');
                $this->tag->addAttribute('min', '0');
                $this->tag->addAttribute('name', $this->getName($configuration));
-               $this->tag->addAttribute('id', $configuration->getName());
+               $this->tag->addAttribute('id', 'em-' . $configuration->getName());
                if ($configuration->getValue() !== NULL) {
                        $this->tag->addAttribute('value', $configuration->getValue());
                }
@@ -193,7 +193,7 @@ class TypoScriptConstantsViewHelper extends \TYPO3\CMS\Fluid\Core\ViewHelper\Abs
                $this->tag->setTagName('input');
                $this->tag->addAttribute('type', 'number');
                $this->tag->addAttribute('name', $this->getName($configuration));
-               $this->tag->addAttribute('id', $configuration->getName());
+               $this->tag->addAttribute('id', 'em-' . $configuration->getName());
                if ($configuration->getValue() !== NULL) {
                        $this->tag->addAttribute('value', $configuration->getValue());
                }
@@ -214,7 +214,7 @@ class TypoScriptConstantsViewHelper extends \TYPO3\CMS\Fluid\Core\ViewHelper\Abs
                $this->tag->setTagName('input');
                $this->tag->addAttribute('type', 'text');
                $this->tag->addAttribute('name', $this->getName($configuration));
-               $this->tag->addAttribute('id', $configuration->getName());
+               $this->tag->addAttribute('id', 'em-' . $configuration->getName());
                if ($configuration->getValue() !== NULL) {
                        $this->tag->addAttribute('value', $configuration->getValue());
                }
@@ -242,7 +242,7 @@ class TypoScriptConstantsViewHelper extends \TYPO3\CMS\Fluid\Core\ViewHelper\Abs
                $this->tag->addAttribute('type', 'checkbox');
                $this->tag->addAttribute('name', $this->getName($configuration));
                $this->tag->addAttribute('value', 1);
-               $this->tag->addAttribute('id', $configuration->getName());
+               $this->tag->addAttribute('id', 'em-' . $configuration->getName());
                if ($configuration->getValue() == 1) {
                        $this->tag->addAttribute('checked', 'checked');
                }
diff --git a/typo3/sysext/extensionmanager/Resources/Public/Contrib/Farbtastic/marker.png b/typo3/sysext/extensionmanager/Resources/Public/Contrib/Farbtastic/marker.png
new file mode 100644 (file)
index 0000000..3929bbb
Binary files /dev/null and b/typo3/sysext/extensionmanager/Resources/Public/Contrib/Farbtastic/marker.png differ
diff --git a/typo3/sysext/extensionmanager/Resources/Public/Contrib/Farbtastic/mask.png b/typo3/sysext/extensionmanager/Resources/Public/Contrib/Farbtastic/mask.png
new file mode 100644 (file)
index 0000000..b0a4d40
Binary files /dev/null and b/typo3/sysext/extensionmanager/Resources/Public/Contrib/Farbtastic/mask.png differ
diff --git a/typo3/sysext/extensionmanager/Resources/Public/Contrib/Farbtastic/wheel.png b/typo3/sysext/extensionmanager/Resources/Public/Contrib/Farbtastic/wheel.png
new file mode 100644 (file)
index 0000000..97b343d
Binary files /dev/null and b/typo3/sysext/extensionmanager/Resources/Public/Contrib/Farbtastic/wheel.png differ