Commit 146220ca authored by Oliver Hader's avatar Oliver Hader Committed by Oliver Hader
Browse files

[TASK] Streamline FormEngine AJAX TypeScript sources

Resolves: #96014
Releases: master
Change-Id: Ia6fea96a2af2572f5e2c0115aed99c514a168b8d
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/72215


Tested-by: core-ci's avatarcore-ci <typo3@b13.com>
Tested-by: Oliver Hader's avatarOliver Hader <oliver.hader@typo3.org>
Reviewed-by: Oliver Hader's avatarOliver Hader <oliver.hader@typo3.org>
parent a0b14653
......@@ -151,6 +151,7 @@ class FlexFormSectionContainer {
const sectionContainer = document.querySelector(dataset.target);
sectionContainer.insertAdjacentElement('beforeend', createdContainer);
// @todo deprecate or remove with TYPO3 v12.0
if (data.scriptCall && data.scriptCall.length > 0) {
$.each(data.scriptCall, function (index: number, value: string): void {
// eslint-disable-next-line no-eval
......
......@@ -27,7 +27,7 @@ interface Message {
message: string;
}
interface Response {
export interface AjaxDispatcherResponse {
hasErrors: boolean;
messages: Message[];
stylesheetFiles: string[];
......@@ -93,7 +93,7 @@ export class AjaxDispatcher {
return context;
}
private processResponse(json: Response): Response {
private processResponse(json: AjaxDispatcherResponse): AjaxDispatcherResponse {
if (json.hasErrors) {
for (const message of json.messages) {
Notification.error(message.title, message.message);
......
......@@ -11,11 +11,13 @@
* The TYPO3 project - inspiring people to share!
*/
export interface InlineResponseInterface {
import {AjaxDispatcherResponse} from 'TYPO3/CMS/Backend/FormEngine/InlineRelation/AjaxDispatcher';
export interface InlineResponseInterface extends AjaxDispatcherResponse{
data: string;
inlineData?: InlineData;
scriptCall?: Array<string>;
stylesheetFiles?: Array<string>;
inlineData: InlineData;
scriptCall: Array<string>;
stylesheetFiles: Array<string>;
compilerInput?: CompilerInput,
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment