Review main Merged

71318[TASK] Get rid of inline JavaScript in new content element wizard

Oli Bartsch CR +2 V +2 Hard +491 −381 updated 10/02/21, 13:41

Commit message

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

Review

  • Code review CR +2

    Imported before Forger kept the single votes, the next import adds them.

  • Verified V +2

    Imported before Forger kept the single votes, the next import adds them.

Issues 3

Files 25

Show 5 more files