[BUGFIX] EM: Colorpicker in extension configuration is broken 16/19616/3
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:16:41 +0000 (22:16 +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/19616
Reviewed-by: Nicole Cordes
Tested-by: Nicole Cordes
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 cac1752..4081ce0 100644 (file)
@@ -88,14 +88,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) {
@@ -114,7 +114,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());
@@ -132,7 +132,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());
@@ -148,7 +148,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 = '';
@@ -174,7 +174,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());
                }
@@ -191,7 +191,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());
                }
@@ -208,7 +208,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());
                }
@@ -236,7 +236,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