Commit 7e085b40 authored by Benni Mack's avatar Benni Mack Committed by Morton Jonuschat
Browse files

[TASK] Streamline JavaScript calls to ModuleMenu reload

There are several versions (partly legacy) of how to
trigger a reload of the Module Menu. This is now
streamlined.

Additionally the NewContentElementController does
not reload the module menu anymore on loading.

Resolves: #72024
Releases: master
Change-Id: I58fc274f22d0312b0616e20e379225f77540fbb3
Reviewed-on: https://review.typo3.org/45088

Reviewed-by: Andreas Fernandez's avatarAndreas Fernandez <typo3@scripting-base.de>
Reviewed-by: Frank Nägler's avatarFrank Nägler <frank.naegler@typo3.org>
Tested-by: Frank Nägler's avatarFrank Nägler <frank.naegler@typo3.org>
Reviewed-by: default avatarMorton Jonuschat <m.jonuschat@mojocode.de>
Tested-by: default avatarMorton Jonuschat <m.jonuschat@mojocode.de>
parent ac66cdb4
......@@ -239,14 +239,8 @@ class NewContentElementController extends AbstractModule
$this->moduleTemplate->addJavaScriptCode(
'NewContentElementWizardInlineJavascript',
'
function goToalt_doc() { //
function goToalt_doc() {
' . $this->onClickEvent . '
}
if(top.refreshMenu) {
top.refreshMenu();
} else {
top.TYPO3ModuleMenu.refreshMenu();
}'
);
......
......@@ -261,6 +261,7 @@ Ext.onReady(function() {
top.list_frame = top.list.getIframe();
top.nav_frame = TYPO3.Backend.NavigationContainer.PageTree;
// not in use anymore
top.TYPO3ModuleMenu = TYPO3.ModuleMenu.App;
top.content = {
nav_frame: TYPO3.Backend.NavigationContainer.PageTree,
......
......@@ -49,7 +49,7 @@ class TriggerViewHelper extends \TYPO3\CMS\Fluid\ViewHelpers\Be\AbstractBackendV
if (!empty($triggers[AbstractController::TRIGGER_RefreshModuleMenu])) {
$pageRenderer->addJsInlineCode(
AbstractController::TRIGGER_RefreshModuleMenu,
'if (top.TYPO3ModuleMenu.refreshMenu) { top.TYPO3ModuleMenu.refreshMenu(); }'
'if (top && top.TYPO3.ModuleMenu.App) { top.TYPO3.ModuleMenu.App.refreshMenu(); }'
);
}
return '';
......
......@@ -366,10 +366,8 @@ class SetupModuleController extends AbstractModule
$this->content .= '<form action="' . BackendUtility::getModuleUrl('user_setup') . '" method="post" id="SetupModuleController" name="usersetup" enctype="multipart/form-data">';
if ($this->languageUpdate) {
$this->moduleTemplate->addJavaScriptCode('languageUpdate', '
if (top.refreshMenu) {
top.refreshMenu();
} else {
top.TYPO3ModuleMenu.refreshMenu();
if (top && top.TYPO3.ModuleMenu.App) {
top.TYPO3.ModuleMenu.App.refreshMenu();
}
');
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment