Skip to content
Snippets Groups Projects
Commit 8d8050e5 authored by Andreas Wolf's avatar Andreas Wolf Committed by Andreas Fernandez
Browse files

[TASK] Rewrite DragUploader in TypeScript

Change-Id: If1aeff95d06e98e9c5a3725445bc616552c1eb14
Resolves: #82585
Releases: master
Reviewed-on: https://review.typo3.org/55295


Tested-by: default avatarTYPO3com <no-reply@typo3.com>
Reviewed-by: default avatarMathias Schreiber <mathias.schreiber@typo3.com>
Tested-by: default avatarMathias Schreiber <mathias.schreiber@typo3.com>
Reviewed-by: default avatarAndreas Fernandez <a.fernandez@scripting-base.de>
Tested-by: default avatarAndreas Fernandez <a.fernandez@scripting-base.de>
parent 111c29f9
No related merge requests found
......@@ -31,6 +31,21 @@ declare namespace TYPO3 {
public show(title: string, content: any, severity: number, buttons: any[], additionalCssClasses?: string[]): JQuery; // tslint:disable-line:max-line-length
public dismiss(): void;
}
export class Notification {
public readonly Notification: {
NOTICE: -2,
INFO: -1,
OK: 0,
WARNING: 1,
ERROR: 2
};
public notice(title: string, message: string, duration: Number): string;
public info(title: string, message: string, duration: Number): string;
public success(title: string, message: string, duration: Number): string;
public warning(title: string, message: string, duration: Number): string;
public error(title: string, message: string, duration: Number): string;
public showMessage(title: string, message: string, severity: Number, duration?: Number): string;
}
export class Severity {
public readonly notice: number;
public readonly info: number;
......@@ -59,6 +74,10 @@ declare module 'TYPO3/CMS/Backend/Modal' {
export = new TYPO3.CMS.Backend.Modal();
}
declare module 'TYPO3/CMS/Backend/Notification' {
export = new TYPO3.CMS.Backend.Notification();
}
declare module 'TYPO3/CMS/Backend/Severity' {
export = new TYPO3.CMS.Backend.Severity();
}
......@@ -67,6 +86,9 @@ declare module 'TYPO3/CMS/Backend/Severity' {
interface Window {
TYPO3: any;
$: any;
inline: {
delayedImportElement: (objectId: number, table: string, uid: number, type: string) => void
};
}
/**
......@@ -78,10 +100,32 @@ declare module 'TYPO3/CMS/Core/Contrib/imagesloaded.pkgd.min' {
}
declare module 'cm/lib/codemirror';
declare module 'moment';
declare module 'TYPO3/CMS/Backend/jsfunc.inline';
/**
* Options for the plugin.
* TODO fix this
*/
interface DragUploaderOptions {
/**
* CSS selector for the element where generated messages are inserted. (required)
*/
outputSelector: string;
/**
* Color of the message text. (optional)
*/
outputColor?: string;
}
interface JQueryTypedEvent<T extends Event> extends JQueryEventObject {
originalEvent: T;
}
/**
* Required to make jQuery plugins "available" in TypeScript
*/
interface JQuery {
clearable(): JQuery;
dragUploader(options?: DragUploaderOptions): JQuery;
}
This diff is collapsed.
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