[BUGFIX] Generate notification action on rendering 06/61706/7
authorAndreas Fernandez <a.fernandez@scripting-base.de>
Sat, 14 Sep 2019 08:05:14 +0000 (10:05 +0200)
committerFrank Nägler <frank.naegler@typo3.org>
Tue, 17 Sep 2019 12:59:36 +0000 (14:59 +0200)
commit78955a67c7da23c839757b4509f11c637e5e88bb
tree5c9ea6f95c83b6c79f0b4587321245151d9abe7d
parentc39bdf422b1693f5da358a77bb8be357bc96c303
[BUGFIX] Generate notification action on rendering

Due to scoping issues if a notification is generated in an iframe, the
actions are now generated when the notification is rendered.

This requires a change how the payload is passed to the notification,
instead of the action instance it now contains the action type and the
callback. The action instance is generated by a factory class.

To bypass issues with browser's garbage collection that kicks in when an
iframe changes, the callback methods are stringified and immediately
recovered by eval().

Resolves: #89173
Releases: master
Change-Id: I45624a26bad1527f9d6222ad10e1f9a1384ee07e
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/61706
Tested-by: TYPO3com <noreply@typo3.com>
Tested-by: Tobi Kretschmann <tobi@tobishome.de>
Tested-by: Frank Nägler <frank.naegler@typo3.org>
Reviewed-by: Tobi Kretschmann <tobi@tobishome.de>
Reviewed-by: Steffen Frese <steffenf14@gmail.com>
Reviewed-by: Frank Nägler <frank.naegler@typo3.org>
Build/Sources/TypeScript/backend/Resources/Public/TypeScript/ActionButton/ActionEnum.ts [new file with mode: 0644]
Build/Sources/TypeScript/backend/Resources/Public/TypeScript/ActionButton/ActionFactory.ts [new file with mode: 0644]
Build/Sources/TypeScript/backend/Resources/Public/TypeScript/Notification.ts
Build/Sources/TypeScript/backend/Tests/NotificationTest.ts
typo3/sysext/backend/Classes/Notification/Action.php
typo3/sysext/backend/Classes/Notification/NotificationService.php
typo3/sysext/backend/Resources/Public/JavaScript/ActionButton/ActionEnum.js [new file with mode: 0644]
typo3/sysext/backend/Resources/Public/JavaScript/ActionButton/ActionFactory.js [new file with mode: 0644]
typo3/sysext/backend/Resources/Public/JavaScript/Notification.js
typo3/sysext/backend/Tests/JavaScript/NotificationTest.js
typo3/sysext/core/Documentation/Changelog/master/Feature-89061-IntroduceNotificationActions.rst