[TASK] Avoid inline JavaScript generated by BackendUtility:viewOnClick
Inline JavaScript produced by BackendUtility:viewOnClick is substituted with markup based instructions and static JavaScript event handlers. // basically delivers window.open(generatedUri) BackendUtility::viewOnClick($pageId, $backPath, $rootLine, $section, $viewUri, $getVars, $switchFocus); can be substituted with e.g. \TYPO3\CMS\Backend\Routing\PreviewUriBuilder::create($pageId, $viewUri) ->withRootLine($rootLine) ->withSection($section) ->withAdditionalQueryParameters($getVars) ->serializeDispatcherAttributes([ PreviewUriBuilder::OPTION_SWITCH_FOCUS => $switchFocus, ]); which results in the following HTML data attributes (data can be retrieved as array of complete element as well) data-dispatch-action="TYPO3.WindowManager.localOpen" data-dispatch-args="["https://...",null,"previewWin"]" Resolves: #91123 Releases: master Change-Id: Iedd9bfe60827977677ee68e2c948c63e359abf84 Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/64243 Tested-by:Andreas Fernandez <a.fernandez@scripting-base.de> Tested-by:
TYPO3com <noreply@typo3.com> Tested-by:
Benni Mack <benni@typo3.org> Reviewed-by:
Andreas Fernandez <a.fernandez@scripting-base.de> Reviewed-by:
Benni Mack <benni@typo3.org>
Showing
- Build/Sources/TypeScript/backend/Resources/Public/TypeScript/ActionDispatcher.ts 5 additions, 11 deletions...t/backend/Resources/Public/TypeScript/ActionDispatcher.ts
- Build/Sources/TypeScript/backend/Resources/Public/TypeScript/Element/ImmediateActionElement.ts 16 additions, 3 deletions...urces/Public/TypeScript/Element/ImmediateActionElement.ts
- Build/Sources/TypeScript/backend/Resources/Public/TypeScript/Utility.ts 14 additions, 0 deletions...TypeScript/backend/Resources/Public/TypeScript/Utility.ts
- Build/Sources/TypeScript/backend/Resources/Public/TypeScript/WindowManager.ts 63 additions, 0 deletions...ript/backend/Resources/Public/TypeScript/WindowManager.ts
- Build/Sources/TypeScript/workspaces/Resources/Public/TypeScript/Backend.ts 7 additions, 6 deletions...eScript/workspaces/Resources/Public/TypeScript/Backend.ts
- Build/types/TYPO3/index.d.ts 1 addition, 0 deletionsBuild/types/TYPO3/index.d.ts
- typo3/sysext/backend/Classes/Controller/ContentElement/ElementInformationController.php 5 additions, 2 deletions...ontroller/ContentElement/ElementInformationController.php
- typo3/sysext/backend/Classes/Controller/EditDocumentController.php 19 additions, 38 deletions...ext/backend/Classes/Controller/EditDocumentController.php
- typo3/sysext/backend/Classes/Controller/NewRecordController.php 5 additions, 5 deletions...sysext/backend/Classes/Controller/NewRecordController.php
- typo3/sysext/backend/Classes/Controller/Page/NewMultiplePagesController.php 5 additions, 1 deletion...nd/Classes/Controller/Page/NewMultiplePagesController.php
- typo3/sysext/backend/Classes/Controller/Page/SortSubPagesController.php 5 additions, 1 deletion...ackend/Classes/Controller/Page/SortSubPagesController.php
- typo3/sysext/backend/Classes/Controller/PageLayoutController.php 6 additions, 9 deletions...ysext/backend/Classes/Controller/PageLayoutController.php
- typo3/sysext/backend/Classes/Routing/PreviewUriBuilder.php 324 additions, 0 deletionstypo3/sysext/backend/Classes/Routing/PreviewUriBuilder.php
- typo3/sysext/backend/Classes/View/BackendLayout/Grid/LanguageColumn.php 7 additions, 9 deletions...ackend/Classes/View/BackendLayout/Grid/LanguageColumn.php
- typo3/sysext/backend/Classes/View/PageLayoutView.php 6 additions, 9 deletionstypo3/sysext/backend/Classes/View/PageLayoutView.php
- typo3/sysext/backend/Resources/Private/Partials/PageLayout/LanguageColumns.html 1 addition, 1 deletion...esources/Private/Partials/PageLayout/LanguageColumns.html
- typo3/sysext/backend/Resources/Private/Templates/ContentElement/ElementInformation.html 1 addition, 1 deletion.../Private/Templates/ContentElement/ElementInformation.html
- typo3/sysext/backend/Resources/Public/JavaScript/ActionDispatcher.js 1 addition, 1 deletion...t/backend/Resources/Public/JavaScript/ActionDispatcher.js
- typo3/sysext/backend/Resources/Public/JavaScript/Element/ImmediateActionElement.js 1 addition, 1 deletion...urces/Public/JavaScript/Element/ImmediateActionElement.js
- typo3/sysext/backend/Resources/Public/JavaScript/Utility.js 1 addition, 1 deletiontypo3/sysext/backend/Resources/Public/JavaScript/Utility.js
Please register or sign in to comment