[TASK] Get rid of inline JavaScript in new content element wizard
This patch cleans up the NewContentElementController, used for the "new content element wizard". All inline JavaScript is removed, in favour of a custom web component and an improved JavaScript module, handling the two modes (create content with known colPos and create content while selecting the desired colPos). Previously, the wizard was triggered by a t3js-* class. Since e.g. the fluid based page module related templates might be overridden in extension code, a fallback layer is present to still support this way of initialization in v11. Due to the necessary refactoring, some related bugs are fixed: * Accessing the wizard via the context menu now works correctly * The "saveAndClose" feature is now also respected in case the user has to choose the desired colPos * Using a custom wizard endpoint (mod.newContentElementWizard.override) does no longer initialize the TYPO3 related JavaScript, which previously led to a JavaScript TypeError * A duplicated clear "icon" in the elements filter is removed Resolves: #95277 Resolves: #95375 Resolves: #95376 Releases: master Change-Id: I6e9b260938c934222e479c1a93c69ba6f27eec4b Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/71318 Tested-by:core-ci <typo3@b13.com> Tested-by:
Oliver Hader <oliver.hader@typo3.org> Tested-by:
Benni Mack <benni@typo3.org> Reviewed-by:
Oliver Hader <oliver.hader@typo3.org> Reviewed-by:
Benni Mack <benni@typo3.org>
Showing
- Build/Sources/TypeScript/backend/Resources/Public/TypeScript/ContextMenuActions.ts 7 additions, 0 deletions...backend/Resources/Public/TypeScript/ContextMenuActions.ts
- Build/Sources/TypeScript/backend/Resources/Public/TypeScript/NewContentElementWizard.ts 89 additions, 37 deletions...nd/Resources/Public/TypeScript/NewContentElementWizard.ts
- Build/Sources/TypeScript/backend/Resources/Public/TypeScript/NewContentElementWizardButton.ts 68 additions, 0 deletions...ources/Public/TypeScript/NewContentElementWizardButton.ts
- Build/Sources/TypeScript/backend/Resources/Public/TypeScript/PageActions.ts 20 additions, 8 deletions...Script/backend/Resources/Public/TypeScript/PageActions.ts
- Build/Sources/TypeScript/backend/Resources/Public/TypeScript/Wizard/NewContentElement.ts 0 additions, 50 deletions...d/Resources/Public/TypeScript/Wizard/NewContentElement.ts
- typo3/sysext/backend/Classes/Controller/ContentElement/NewContentElementController.php 92 additions, 108 deletions...Controller/ContentElement/NewContentElementController.php
- typo3/sysext/backend/Classes/Controller/NewRecordController.php 8 additions, 5 deletions...sysext/backend/Classes/Controller/NewRecordController.php
- typo3/sysext/backend/Classes/Controller/PageLayoutController.php 1 addition, 0 deletions...ysext/backend/Classes/Controller/PageLayoutController.php
- typo3/sysext/backend/Classes/Tree/View/ContentCreationPagePositionMap.php 48 additions, 13 deletions...kend/Classes/Tree/View/ContentCreationPagePositionMap.php
- typo3/sysext/backend/Configuration/Backend/Routes.php 1 addition, 1 deletiontypo3/sysext/backend/Configuration/Backend/Routes.php
- typo3/sysext/backend/Configuration/Services.yaml 3 additions, 0 deletionstypo3/sysext/backend/Configuration/Services.yaml
- typo3/sysext/backend/Resources/Private/Partials/PageLayout/Grid/ColumnHeader.html 16 additions, 5 deletions...ources/Private/Partials/PageLayout/Grid/ColumnHeader.html
- typo3/sysext/backend/Resources/Private/Partials/PageLayout/Record.html 16 additions, 5 deletions...backend/Resources/Private/Partials/PageLayout/Record.html
- typo3/sysext/backend/Resources/Private/Templates/NewContentElement/Main.html 0 additions, 66 deletions...d/Resources/Private/Templates/NewContentElement/Main.html
- typo3/sysext/backend/Resources/Private/Templates/NewContentElement/MenuItem.html 21 additions, 32 deletions...sources/Private/Templates/NewContentElement/MenuItem.html
- typo3/sysext/backend/Resources/Private/Templates/NewContentElement/PositionMap.html 6 additions, 0 deletions...rces/Private/Templates/NewContentElement/PositionMap.html
- typo3/sysext/backend/Resources/Private/Templates/NewContentElement/Wizard.html 30 additions, 0 deletions...Resources/Private/Templates/NewContentElement/Wizard.html
- typo3/sysext/backend/Resources/Public/JavaScript/ContextMenuActions.js 1 addition, 1 deletion...backend/Resources/Public/JavaScript/ContextMenuActions.js
- typo3/sysext/backend/Resources/Public/JavaScript/NewContentElementWizard.js 1 addition, 1 deletion...nd/Resources/Public/JavaScript/NewContentElementWizard.js
- typo3/sysext/backend/Resources/Public/JavaScript/NewContentElementWizardButton.js 13 additions, 0 deletions...ources/Public/JavaScript/NewContentElementWizardButton.js
Please register or sign in to comment