Skip to content
Snippets Groups Projects
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: default avatarcore-ci <typo3@b13.com>
Tested-by: default avatarOliver Hader <oliver.hader@typo3.org>
Reviewed-by: default avatarOliver Hader <oliver.hader@typo3.org>
parent a0b14653
Branches
Tags
No related merge requests found
...@@ -151,6 +151,7 @@ class FlexFormSectionContainer { ...@@ -151,6 +151,7 @@ class FlexFormSectionContainer {
const sectionContainer = document.querySelector(dataset.target); const sectionContainer = document.querySelector(dataset.target);
sectionContainer.insertAdjacentElement('beforeend', createdContainer); sectionContainer.insertAdjacentElement('beforeend', createdContainer);
// @todo deprecate or remove with TYPO3 v12.0
if (data.scriptCall && data.scriptCall.length > 0) { if (data.scriptCall && data.scriptCall.length > 0) {
$.each(data.scriptCall, function (index: number, value: string): void { $.each(data.scriptCall, function (index: number, value: string): void {
// eslint-disable-next-line no-eval // eslint-disable-next-line no-eval
......
...@@ -27,7 +27,7 @@ interface Message { ...@@ -27,7 +27,7 @@ interface Message {
message: string; message: string;
} }
interface Response { export interface AjaxDispatcherResponse {
hasErrors: boolean; hasErrors: boolean;
messages: Message[]; messages: Message[];
stylesheetFiles: string[]; stylesheetFiles: string[];
...@@ -93,7 +93,7 @@ export class AjaxDispatcher { ...@@ -93,7 +93,7 @@ export class AjaxDispatcher {
return context; return context;
} }
private processResponse(json: Response): Response { private processResponse(json: AjaxDispatcherResponse): AjaxDispatcherResponse {
if (json.hasErrors) { if (json.hasErrors) {
for (const message of json.messages) { for (const message of json.messages) {
Notification.error(message.title, message.message); Notification.error(message.title, message.message);
......
...@@ -11,11 +11,13 @@ ...@@ -11,11 +11,13 @@
* The TYPO3 project - inspiring people to share! * 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; data: string;
inlineData?: InlineData; inlineData: InlineData;
scriptCall?: Array<string>; scriptCall: Array<string>;
stylesheetFiles?: Array<string>; stylesheetFiles: Array<string>;
compilerInput?: CompilerInput, compilerInput?: CompilerInput,
} }
......
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