diff --git a/typo3/sysext/backend/Classes/ClickMenu/ClickMenu.php b/typo3/sysext/backend/Classes/ClickMenu/ClickMenu.php index 6cf5c0be2d70e77a1a2de51ee03dfe4d64d9d89a..7b36f7605870023d04d986358f355b7ff8c6d91f 100644 --- a/typo3/sysext/backend/Classes/ClickMenu/ClickMenu.php +++ b/typo3/sysext/backend/Classes/ClickMenu/ClickMenu.php @@ -72,12 +72,6 @@ class ClickMenu { */ public $disabledItems = array(); - // If TRUE, the context sensitive menu will not appear in the top frame, only as a layer. - /** - * @todo Define visibility - */ - public $dontDisplayTopFrameCM = 0; - // If TRUE, Show icons on the left. /** * @todo Define visibility @@ -181,13 +175,11 @@ class ClickMenu { * * @return boolean * @todo Define visibility + * @deprecated since TYPO3 6.0, will be removed in 6.2 as there is no click menu in the topframe anymore (no topframe at all actually) */ public function doDisplayTopFrameCM() { - if ($this->ajax) { - return FALSE; - } else { - return !$GLOBALS['SOBE']->doc->isCMlayers() || !$this->dontDisplayTopFrameCM; - } + \TYPO3\CMS\Core\Utility\GeneralUtility::logDeprecatedFunction(); + return FALSE; } /*************************************** @@ -1007,8 +999,7 @@ class ClickMenu { * **************************************/ /** - * Prints the items from input $menuItems array - both as topframe menu AND the JS section for writing to the div-layers. - * Of course the topframe menu will appear only if $this->doDisplayTopFrameCM() returns TRUE + * Prints the items from input $menuItems array - as JS section for writing to the div-layers. * * @param array $menuItems Array * @param string $item HTML code for the element which was clicked - shown in the end of the horizontal menu in topframe after the close-button. @@ -1021,34 +1012,6 @@ class ClickMenu { $menuItems = $this->enableDisableItems($menuItems); // Clean up spacers: $menuItems = $this->cleanUpSpacers($menuItems); - // Adding topframe part (horizontal clickmenu) - if ($this->doDisplayTopFrameCM()) { - $out .= ' - - <!-- - Table, which contains the click menu when shown in the top frame of the backend: - --> - <table border="0" cellpadding="0" cellspacing="0" id="typo3-CSM-top"> - <tr> - - <!-- Items: --> - <td class="c-item">' . implode(('</td> - <td><img' . \TYPO3\CMS\Backend\Utility\IconUtility::skinImg($this->PH_backPath, 'gfx/acm_spacer2.gif', 'width="8" height="12"') . ' alt="" /></td> - <td class="c-item">'), $this->menuItemsForTopFrame($menuItems)) . '</td> - - <!-- Close button: --> - <td class="c-closebutton"><a href="#" onclick="hideCM();return false;">' . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-document-close', array( - 'title' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.close', 1) - )) . '</a></td> - - <!-- The item of the clickmenu: --> - <td class="c-itemicon">' . $item . '</td> - </tr> - </table> - '; - // Set remaining BACK_PATH to blank (if any) - $out = str_replace($this->PH_backPath, '', $out); - } // Adding JS part: $out .= $this->printLayerJScode($menuItems); // Return the content @@ -1089,7 +1052,8 @@ class ClickMenu { if (top.content && top.content' . $frameName . ' && top.content' . $frameName . '.Clickmenu) { top.content' . $frameName . '.Clickmenu.populateData(unescape("' . GeneralUtility::rawurlencodeJS($CMtable) . '"),' . $this->cmLevel . '); } - ' . (!$this->doDisplayTopFrameCM() ? 'hideCM();' : '')); + hideCM(); + '); return $script; } } @@ -1378,11 +1342,7 @@ class ClickMenu { * @todo Define visibility */ public function isCMlayers() { - if ($this->ajax) { - return !$this->CB; - } else { - return $GLOBALS['SOBE']->doc->isCMlayers() && !$this->CB; - } + return !$this->CB; } /** @@ -1399,4 +1359,4 @@ class ClickMenu { } -?> \ No newline at end of file +?> diff --git a/typo3/sysext/backend/Classes/Controller/ClickMenuController.php b/typo3/sysext/backend/Classes/Controller/ClickMenuController.php index e0b3394b6e7603d05fbef9d777e39aeff3a067a2..766ce70a2b504c8328cc99ef8915534579ecedb3 100644 --- a/typo3/sysext/backend/Classes/Controller/ClickMenuController.php +++ b/typo3/sysext/backend/Classes/Controller/ClickMenuController.php @@ -55,12 +55,6 @@ class ClickMenuController { */ public $extClassArray = array(); - // If set, then the clickmenu will NOT display in the top frame. - /** - * @todo Define visibility - */ - public $dontDisplayTopFrameCM = 0; - /** * Constructor function for script class. * @@ -97,10 +91,7 @@ class ClickMenuController { $this->doc->backPath = $GLOBALS['BACK_PATH']; } // Setting mode for display and background image in the top frame - $this->dontDisplayTopFrameCM = $this->doc->isCMlayers() && !$GLOBALS['BE_USER']->getTSConfigVal('options.contextMenu.options.alwaysShowClickMenuInTopFrame'); - if ($this->dontDisplayTopFrameCM) { - $this->doc->bodyTagId .= '-notop'; - } + // Setting clickmenu timeout $secs = \TYPO3\CMS\Core\Utility\MathUtility::forceIntegerInRange($GLOBALS['BE_USER']->getTSConfigVal('options.contextMenu.options.clickMenuTimeOut'), 1, 100, 5); // default is 5 @@ -175,7 +166,6 @@ class ClickMenuController { // Set internal vars in clickmenu object: $clickMenu->clipObj = $clipObj; $clickMenu->extClassArray = $this->extClassArray; - $clickMenu->dontDisplayTopFrameCM = $this->dontDisplayTopFrameCM; $clickMenu->backPath = $this->backPath; // Start page if (!$this->ajax) { diff --git a/typo3/sysext/backend/Classes/Controller/FileSystemNavigationFrameController.php b/typo3/sysext/backend/Classes/Controller/FileSystemNavigationFrameController.php index f864a435b715d2553a33a8e89faff923a7dde8f7..9b2c99aaa4c89739cae5d12e13919ae3054c335a 100644 --- a/typo3/sysext/backend/Classes/Controller/FileSystemNavigationFrameController.php +++ b/typo3/sysext/backend/Classes/Controller/FileSystemNavigationFrameController.php @@ -169,7 +169,7 @@ class FileSystemNavigationFrameController { // Adding javascript for drag & drop activation and highlighting $this->content .= $this->doc->wrapScriptTags(' ' . ($this->doHighlight ? 'Tree.highlightActiveItem("", top.fsMod.navFrameHighlightedID["file"]);' : '') . ' - ' . (!$this->doc->isCMlayers() ? 'Tree.activateDragDrop = false;' : 'Tree.registerDragDropHandlers();')); + Tree.registerDragDropHandlers();'); // Setting up the buttons and markers for docheader $docHeaderButtons = $this->getButtons(); $markers = array( @@ -239,4 +239,4 @@ class FileSystemNavigationFrameController { } -?> \ No newline at end of file +?> diff --git a/typo3/sysext/backend/Classes/Controller/PageTreeNavigationController.php b/typo3/sysext/backend/Classes/Controller/PageTreeNavigationController.php index 9b4b8f03f147fe08b6fd329fcb3e39b8ca884095..722d58df7b03c1952eede4d64b3dca4f91f1d09f 100644 --- a/typo3/sysext/backend/Classes/Controller/PageTreeNavigationController.php +++ b/typo3/sysext/backend/Classes/Controller/PageTreeNavigationController.php @@ -178,7 +178,7 @@ class PageTreeNavigationController { // Adding javascript for drag & drop activation and highlighting $this->content .= $this->doc->wrapScriptTags(' ' . ($this->doHighlight ? 'Tree.highlightActiveItem("",top.fsMod.navFrameHighlightedID["web"]);' : '') . ' - ' . (!$this->doc->isCMlayers() ? 'Tree.activateDragDrop = false;' : 'Tree.registerDragDropHandlers();')); + Tree.registerDragDropHandlers();'); // Setting up the buttons and markers for docheader $docHeaderButtons = $this->getButtons(); $markers = array( @@ -329,4 +329,4 @@ class PageTreeNavigationController { } -?> \ No newline at end of file +?> diff --git a/typo3/sysext/backend/Classes/Template/DocumentTemplate.php b/typo3/sysext/backend/Classes/Template/DocumentTemplate.php index abbb73001a62121e008455f186a769008686d07e..42d96f8698f07fcbaa4a4f1b1ae80d72e15148da 100644 --- a/typo3/sysext/backend/Classes/Template/DocumentTemplate.php +++ b/typo3/sysext/backend/Classes/Template/DocumentTemplate.php @@ -1521,7 +1521,7 @@ class DocumentTemplate { $this->loadJavascriptLib('js/clickmenu.js'); $this->JScodeArray['clickmenu'] = ' Clickmenu.clickURL = "' . $this->backPath . 'alt_clickmenu.php"; - Clickmenu.ajax = ' . ($this->isCMLayers() ? 'true' : 'false') . ';'; + Clickmenu.ajax = true;'; } /**