[TASK] Remove rollover functionality from TMENU
[Packages/TYPO3.CMS.git] / typo3 / sysext / frontend / Classes / ContentObject / Menu / TextMenuContentObject.php
index b3d673f..417a69a 100644 (file)
@@ -102,33 +102,7 @@ class TextMenuContentObject extends \TYPO3\CMS\Frontend\ContentObject\Menu\Abstr
                                if (strlen($titleAttrValue)) {
                                        $this->I['linkHREF']['title'] = $titleAttrValue;
                                }
-                               // Make link:
-                               if ($this->I['val']['RO']) {
-                                       $this->I['theName'] = $this->imgNamePrefix . $this->I['uid'] . $this->I['INPfix'];
-                                       $over = '';
-                                       $out = '';
-                                       if ($this->I['val']['beforeROImg']) {
-                                               $over .= $this->WMfreezePrefix . 'over(\'' . $this->I['theName'] . 'before\');';
-                                               $out .= $this->WMfreezePrefix . 'out(\'' . $this->I['theName'] . 'before\');';
-                                       }
-                                       if ($this->I['val']['afterROImg']) {
-                                               $over .= $this->WMfreezePrefix . 'over(\'' . $this->I['theName'] . 'after\');';
-                                               $out .= $this->WMfreezePrefix . 'out(\'' . $this->I['theName'] . 'after\');';
-                                       }
-                                       $this->I['linkHREF']['onMouseover'] = $over;
-                                       $this->I['linkHREF']['onMouseout'] = $out;
-                                       if ($over || $out) {
-                                               $GLOBALS['TSFE']->setJS('mouseOver');
-                                       }
-                                       // Change background color:
-                                       if ($this->I['val']['RO_chBgColor']) {
-                                               $this->addJScolorShiftFunction();
-                                               $chBgP = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode('|', $this->I['val']['RO_chBgColor']);
-                                               $this->I['linkHREF']['onMouseover'] .= 'changeBGcolor(\'' . $chBgP[2] . $this->I['uid'] . '\', \'' . $chBgP[0] . '\');';
-                                               $this->I['linkHREF']['onMouseout'] .= 'changeBGcolor(\'' . $chBgP[2] . $this->I['uid'] . '\', \'' . $chBgP[1] . '\');';
-                                       }
-                                       $this->extProc_RO($key);
-                               }
+
                                // Calling extra processing function
                                $this->extProc_beforeLinking($key);
                                // stdWrap for doNotLinkIt
@@ -213,16 +187,8 @@ class TextMenuContentObject extends \TYPO3\CMS\Frontend\ContentObject\Menu\Abstr
                $res = '';
                if ($imgInfo = $this->WMcObj->getImgResource($this->I['val'][$pref . 'Img'], $this->I['val'][$pref . 'Img.'])) {
                        $imgInfo[3] = \TYPO3\CMS\Core\Utility\GeneralUtility::png_to_gif_by_imagemagick($imgInfo[3]);
-                       if ($this->I['val']['RO'] && $this->I['val'][$pref . 'ROImg'] && !$this->I['spacer']) {
-                               $imgROInfo = $this->WMcObj->getImgResource($this->I['val'][$pref . 'ROImg'], $this->I['val'][$pref . 'ROImg.']);
-                               $imgROInfo[3] = \TYPO3\CMS\Core\Utility\GeneralUtility::png_to_gif_by_imagemagick($imgROInfo[3]);
-                               if ($imgROInfo) {
-                                       $theName = $this->imgNamePrefix . $this->I['uid'] . $this->I['INPfix'] . $pref;
-                                       $name = ' ' . $this->nameAttribute . '="' . $theName . '"';
-                                       $GLOBALS['TSFE']->JSImgCode .= LF . $theName . '_n=new Image(); ' . $theName . '_n.src = "' . $GLOBALS['TSFE']->absRefPrefix . $imgInfo[3] . '"; ';
-                                       $GLOBALS['TSFE']->JSImgCode .= LF . $theName . '_h=new Image(); ' . $theName . '_h.src = "' . $GLOBALS['TSFE']->absRefPrefix . $imgROInfo[3] . '"; ';
-                               }
-                       }
+                       $theName = $this->imgNamePrefix . $this->I['uid'] . $this->I['INPfix'] . $pref;
+                       $name = ' ' . $this->nameAttribute . '="' . $theName . '"';
                        $GLOBALS['TSFE']->imagesOnPage[] = $imgInfo[3];
                        $res = '<img' . ' src="' . $GLOBALS['TSFE']->absRefPrefix . $imgInfo[3] . '"' . ' width="' . $imgInfo[0] . '"' . ' height="' . $imgInfo[1] . '"' . $name . ($this->I['val'][$pref . 'ImgTagParams'] ? ' ' . $this->I['val'][($pref . 'ImgTagParams')] : '') . \TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::getBorderAttr(' border="0"');
                        if (!strstr($res, 'alt="')) {
@@ -242,28 +208,6 @@ class TextMenuContentObject extends \TYPO3\CMS\Frontend\ContentObject\Menu\Abstr
                }
        }
 
-       /**
-        * Adds a JavaScript function to the $GLOBALS['TSFE']->additionalJavaScript array
-        *
-        * @return void
-        * @access private
-        * @see writeMenu()
-        * @todo Define visibility
-        */
-       public function addJScolorShiftFunction() {
-               $GLOBALS['TSFE']->additionalJavaScript['TMENU:changeBGcolor()'] = '
-                       function changeBGcolor(id,color) {      //
-                               if (document.getElementById && document.getElementById(id)) {
-                                       document.getElementById(id).style.background = color;
-                                       return true;
-                               } else if (document.layers && document.layers[id]) {
-                                       document.layers[id].bgColor = color;
-                                       return true;
-                               }
-                       }
-               ';
-       }
-
        /**
         * Called right before the traversing of $this->result begins.
         * Can be used for various initialization
@@ -277,19 +221,6 @@ class TextMenuContentObject extends \TYPO3\CMS\Frontend\ContentObject\Menu\Abstr
 
        }
 
-       /**
-        * Called after all processing for RollOver of an element has been done.
-        *
-        * @param integer Pointer to $this->menuArr[$key] where the current menu element record is found
-        * @return void
-        * @access private
-        * @see writeMenu()
-        * @todo Define visibility
-        */
-       public function extProc_RO($key) {
-
-       }
-
        /**
         * Called right before the creation of the link for the menu item
         *