• Oliver Bartsch's avatar
    [TASK] Get rid of inline JavaScript in new content element wizard · 71924929
    Oliver Bartsch authored and Benni Mack's avatar Benni Mack committed
    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's avatarcore-ci <typo3@b13.com>
    Tested-by: Oliver Hader's avatarOliver Hader <oliver.hader@typo3.org>
    Tested-by: Benni Mack's avatarBenni Mack <benni@typo3.org>
    Reviewed-by: Oliver Hader's avatarOliver Hader <oliver.hader@typo3.org>
    Reviewed-by: Benni Mack's avatarBenni Mack <benni@typo3.org>
    71924929