From ff1601ff458b0e7cbe7fb854994624396653d347 Mon Sep 17 00:00:00 2001 From: Tymoteusz Motylewski <t.motylewski@gmail.com> Date: Mon, 28 May 2018 23:39:15 +0200 Subject: [PATCH] [TASK] Remove inline JS from Permissions Module Resolves: #85107 Releases: master Change-Id: I218ae9ae3a2eb6bcd23eef2073bf8b11139d58bc Reviewed-on: https://review.typo3.org/57078 Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl> Tested-by: TYPO3com <no-reply@typo3.com> Reviewed-by: Joerg Boesche <typo3@joergboesche.de> Tested-by: Joerg Boesche <typo3@joergboesche.de> Reviewed-by: Andreas Fernandez <a.fernandez@scripting-base.de> Tested-by: Andreas Fernandez <a.fernandez@scripting-base.de> --- .../beuser/Classes/Controller/PermissionController.php | 10 +--------- .../Resources/Private/Templates/Permission/Index.html | 2 +- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/typo3/sysext/beuser/Classes/Controller/PermissionController.php b/typo3/sysext/beuser/Classes/Controller/PermissionController.php index 76afc9f7a728..c601becd62e3 100644 --- a/typo3/sysext/beuser/Classes/Controller/PermissionController.php +++ b/typo3/sysext/beuser/Classes/Controller/PermissionController.php @@ -126,15 +126,7 @@ class PermissionController extends ActionController if ($view instanceof BackendTemplateView) { $view->getModuleTemplate()->getPageRenderer()->loadRequireJsModule('TYPO3/CMS/Beuser/Permissions'); $view->getModuleTemplate()->getPageRenderer()->loadRequireJsModule('TYPO3/CMS/Backend/Tooltip'); - $view->getModuleTemplate()->addJavaScriptCode( - 'jumpToUrl', - ' - function jumpToUrl(URL) { - window.location.href = URL; - return false; - } - ' - ); + $this->registerDocHeaderButtons(); $this->view->getModuleTemplate()->getDocHeaderComponent()->setMetaInformation($this->pageInfo); $this->view->getModuleTemplate()->setFlashMessageQueue($this->controllerContext->getFlashMessageQueue()); diff --git a/typo3/sysext/beuser/Resources/Private/Templates/Permission/Index.html b/typo3/sysext/beuser/Resources/Private/Templates/Permission/Index.html index 726a6b8bb79d..c792938846b8 100644 --- a/typo3/sysext/beuser/Resources/Private/Templates/Permission/Index.html +++ b/typo3/sysext/beuser/Resources/Private/Templates/Permission/Index.html @@ -11,7 +11,7 @@ <div class="form-group"> <label for="depth"><f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang_mod_permission.xlf:Depth" />:</label> - <f:form.select class="form-control" id="depth" value="{depth}" options="{depthOptions}" additionalAttributes="{onchange: 'jumpToUrl(\'{depthBaseUrl}\'.replace(\'__DEPTH__\', this.options[this.selectedIndex].value), this);'}" /> + <f:form.select class="form-control" id="depth" value="{depth}" options="{depthOptions}" additionalAttributes="{onchange: 'TYPO3.Permissions.jumpToUrl(\'{depthBaseUrl}\'.replace(\'__DEPTH__\', this.options[this.selectedIndex].value), this);'}" /> </div> <div class="panel panel-default panel-space"> -- GitLab