[TASK] Reduce inline JavaScript for refreshing backend components 75/64675/9
authorBenjamin Franzke <bfr@qbus.de>
Wed, 3 Jun 2020 18:41:26 +0000 (20:41 +0200)
committerOliver Hader <oliver.hader@typo3.org>
Wed, 15 Jul 2020 22:02:53 +0000 (00:02 +0200)
commit451633f5b8adfcbb0331b3ba8a6ccb1c9573460e
tree02540aa0cd35ac33bf0a79a0a4a84f4700c1c2da
parentefd86093edc4e7b917e8d43e946a6a6f447dccdb
[TASK] Reduce inline JavaScript for refreshing backend components

Left-hand module menu and top toolbar are refreshed using inline
JavaScript when e.g. an extension is de-/activated in extension
manager or users switch their backend language in setup module.

A new module `ImmediateActionElement` is introduced that
implements the Custom HTML Element `<typo3-immediate-action action="…">`.
The element immediately dispatches the action passed via the
action attribute once attached to the DOM.

We therefore drop the (currently unused) data-dispatch-immediately
attribute which was introduced in #91015, as we opt for a more
streamlined custom HTML element implementation now.

Resolves: #91191
Releases: master, 10.4
Change-Id: I2724c51da3ea9aea0556ac63e834368e48866dd4
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/64675
Tested-by: TYPO3com <noreply@typo3.com>
Tested-by: Oliver Hader <oliver.hader@typo3.org>
Reviewed-by: Oliver Hader <oliver.hader@typo3.org>
Build/Sources/TypeScript/backend/Resources/Public/TypeScript/ActionDispatcher.ts
Build/Sources/TypeScript/backend/Resources/Public/TypeScript/Element/ImmediateActionElement.ts [new file with mode: 0644]
Build/Sources/TypeScript/backend/Tests/Element/ImmediateActionElementTest.ts [new file with mode: 0644]
typo3/sysext/backend/Classes/Template/ModuleTemplate.php
typo3/sysext/backend/Resources/Public/JavaScript/ActionDispatcher.js
typo3/sysext/backend/Resources/Public/JavaScript/Element/ImmediateActionElement.js [new file with mode: 0644]
typo3/sysext/backend/Tests/JavaScript/Element/ImmediateActionElementTest.js [new file with mode: 0644]
typo3/sysext/extensionmanager/Classes/ViewHelpers/Be/TriggerViewHelper.php
typo3/sysext/setup/Classes/Controller/SetupModuleController.php