[TASK] Remove inline JS from Permissions Module 78/57078/2
authorTymoteusz Motylewski <t.motylewski@gmail.com>
Mon, 28 May 2018 21:39:15 +0000 (23:39 +0200)
committerAndreas Fernandez <a.fernandez@scripting-base.de>
Tue, 29 May 2018 05:55:56 +0000 (07:55 +0200)
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>
typo3/sysext/beuser/Classes/Controller/PermissionController.php
typo3/sysext/beuser/Resources/Private/Templates/Permission/Index.html

index 76afc9f..c601bec 100644 (file)
@@ -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());
index 726a6b8..c792938 100644 (file)
@@ -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">