requestData: RequestData
) => void;
export type CallbackUploadProgress = (event: ProgressEvent) => void;
-export type CallbackSetup = () => RequestOptions;
+export type AjaxCallbackSetup = () => RequestOptions;
export interface AjaxCallbackObject {
_ajaxFailure?: CallbackFailure;
_ajaxProgress?: CallbackProgress;
_ajaxSuccess: CallbackSuccess;
_ajaxUploadProgress?: CallbackUploadProgress;
- _ajaxSetup: CallbackSetup;
+ _ajaxSetup: AjaxCallbackSetup;
}
export interface RequestOptions {
*/
import * as Ajax from "./Ajax";
-import { AjaxCallbackObject, CallbackSetup, ResponseData } from "./Ajax/Data";
+import { AjaxCallbackObject, AjaxCallbackSetup, ResponseData } from "./Ajax/Data";
class BackgroundQueue implements AjaxCallbackObject {
private _invocations = 0;
}
}
- _ajaxSetup(): ReturnType<CallbackSetup> {
+ _ajaxSetup(): ReturnType<AjaxCallbackSetup> {
return {
url: this._url,
ignoreError: true,
*/
import * as Ajax from "../../Ajax";
-import { AjaxCallbackObject, CallbackSetup } from "../../Ajax/Data";
+import { AjaxCallbackObject, AjaxCallbackSetup } from "../../Ajax/Data";
class UiArticleMarkAllAsRead implements AjaxCallbackObject {
constructor() {
document.querySelectorAll(".articleList .newMessageBadge").forEach((el) => el.remove());
}
- _ajaxSetup(): ReturnType<CallbackSetup> {
+ _ajaxSetup(): ReturnType<AjaxCallbackSetup> {
return {
data: {
actionName: "markAllAsRead",
import * as Ajax from "../../Ajax";
-import { AjaxCallbackObject, CallbackSetup, DatabaseObjectActionResponse } from "../../Ajax/Data";
-import { DialogCallbackObject, CallbackSetup as DialogSetup } from "../Dialog/Data";
+import { AjaxCallbackObject, AjaxCallbackSetup, DatabaseObjectActionResponse } from "../../Ajax/Data";
+import { DialogCallbackObject, DialogCallbackSetup } from "../Dialog/Data";
import DomUtil from "../../Dom/Util";
import * as Language from "../../Language";
import * as StringUtil from "../../StringUtil";
}
}
- _ajaxSetup(): ReturnType<CallbackSetup> {
+ _ajaxSetup(): ReturnType<AjaxCallbackSetup> {
return {
data: {
actionName: "search",
};
}
- _dialogSetup(): ReturnType<DialogSetup> {
+ _dialogSetup(): ReturnType<DialogCallbackSetup> {
return {
id: "wcfUiArticleSearch",
options: {
import * as Core from "../Core";
import * as Language from "../Language";
import UiDialog from "./Dialog";
-import { DialogCallbackObject, CallbackSetup as DialogSetup } from "./Dialog/Data";
+import { DialogCallbackObject, DialogCallbackSetup } from "./Dialog/Data";
class UiConfirmation implements DialogCallbackObject {
private _active = false;
this.confirmButton.focus();
}
- _dialogSetup(): ReturnType<DialogSetup> {
+ _dialogSetup(): ReturnType<DialogCallbackSetup> {
return {
id: "wcfSystemConfirmation",
options: {
import * as Environment from "../Environment";
import * as EventHandler from "../Event/Handler";
import UiDropdownSimple from "./Dropdown/Simple";
-import { CallbackSetup } from "../Ajax/Data";
+import { AjaxCallbackSetup } from "../Ajax/Data";
let _activeDialog: string | null = null;
let _callbackFocus: (event: FocusEvent) => void;
return id.toString();
},
- _ajaxSetup(): ReturnType<CallbackSetup> {
+ _ajaxSetup(): ReturnType<AjaxCallbackSetup> {
return {};
},
};
export type DialogHtml = DocumentFragment | string | null;
-export type CallbackSetup = () => DialogSettings;
+export type DialogCallbackSetup = () => DialogSettings;
export type CallbackSubmit = () => void;
export interface DialogCallbackObject {
- _dialogSetup: CallbackSetup;
+ _dialogSetup: DialogCallbackSetup;
_dialogSubmit?: CallbackSubmit;
}
*/
import * as Ajax from "../../Ajax";
-import { AjaxCallbackObject, CallbackSetup, DatabaseObjectActionResponse } from "../../Ajax/Data";
+import { AjaxCallbackObject, AjaxCallbackSetup, DatabaseObjectActionResponse } from "../../Ajax/Data";
import * as Core from "../../Core";
import DomChangeListener from "../../Dom/Change/Listener";
import * as Language from "../../Language";
Core.triggerEvent(this.target, "change");
}
- _ajaxSetup(): ReturnType<CallbackSetup> {
+ _ajaxSetup(): ReturnType<AjaxCallbackSetup> {
return {
url: "index.php?ajax-file-delete/&t=" + window.SECURITY_TOKEN,
};
* @module WoltLabSuite/Core/Ui/Page/JumpTo
*/
-import { DialogCallbackObject, CallbackSetup as DialogSetup } from "../Dialog/Data";
+import { DialogCallbackObject, DialogCallbackSetup } from "../Dialog/Data";
import * as Language from "../../Language";
import UiDialog from "../Dialog";
UiDialog.close(this);
}
- _dialogSetup(): ReturnType<DialogSetup> {
+ _dialogSetup(): ReturnType<DialogCallbackSetup> {
const source = `<dl>
<dt><label for="jsPaginationPageNo">${Language.get("wcf.page.jumpTo")}</label></dt>
<dd>
import * as Ajax from "../../Ajax";
-import { AjaxCallbackObject, CallbackSetup, DatabaseObjectActionResponse } from "../../Ajax/Data";
-import { DialogCallbackObject, CallbackSetup as DialogSetup } from "../Dialog/Data";
+import { AjaxCallbackObject, AjaxCallbackSetup, DatabaseObjectActionResponse } from "../../Ajax/Data";
+import { DialogCallbackObject, DialogCallbackSetup } from "../Dialog/Data";
import DomUtil from "../../Dom/Util";
import * as Language from "../../Language";
import * as StringUtil from "../../StringUtil";
}
}
- _ajaxSetup(): ReturnType<CallbackSetup> {
+ _ajaxSetup(): ReturnType<AjaxCallbackSetup> {
return {
data: {
actionName: "search",
};
}
- _dialogSetup(): ReturnType<DialogSetup> {
+ _dialogSetup(): ReturnType<DialogCallbackSetup> {
return {
id: "wcfUiPageSearch",
options: {
import * as StringUtil from "../../../StringUtil";
import DomUtil from "../../../Dom/Util";
import UiDialog from "../../Dialog";
-import { DialogCallbackObject, CallbackSetup as DialogSetup } from "../../Dialog/Data";
+import { DialogCallbackObject, DialogCallbackSetup } from "../../Dialog/Data";
import UiPageSearchInput from "./Input";
import { DatabaseObjectActionResponse } from "../../../Ajax/Data";
UiDialog.close(this);
}
- _dialogSetup(): ReturnType<DialogSetup> {
+ _dialogSetup(): ReturnType<DialogCallbackSetup> {
return {
id: "wcfUiPageSearchHandler",
options: {
import * as Core from "../../Core";
import DomUtil from "../../Dom/Util";
import UiDropdownSimple from "../Dropdown/Simple";
-import { CallbackSetup, DatabaseObjectActionPayload, DatabaseObjectActionResponse } from "../../Ajax/Data";
+import { AjaxCallbackSetup, DatabaseObjectActionPayload, DatabaseObjectActionResponse } from "../../Ajax/Data";
import AjaxRequest from "../../Ajax/Request";
import { CallbackDropdownInit, CallbackSelect, SearchInputOptions } from "./Data";
return listItem;
}
- _ajaxSetup(): ReturnType<CallbackSetup> {
+ _ajaxSetup(): ReturnType<AjaxCallbackSetup> {
return {
data: this.ajaxPayload,
};
import * as Core from "../Core";
import {
AjaxCallbackObject,
- CallbackSetup,
+ AjaxCallbackSetup,
DatabaseObjectActionPayload,
DatabaseObjectActionResponse,
} from "../Ajax/Data";
});
}
- _ajaxSetup(): ReturnType<CallbackSetup> {
+ _ajaxSetup(): ReturnType<AjaxCallbackSetup> {
return {
data: this.ajaxPayload,
};
import * as Ajax from "../../../Ajax";
-import { AjaxCallbackObject, RequestOptions } from "../../../Ajax/Data";
+import { AjaxCallbackObject, AjaxCallbackSetup } from "../../../Ajax/Data";
import * as Core from "../../../Core";
import * as Language from "../../../Language";
import DomUtil from "../../../Dom/Util";
}
}
- _ajaxSetup(): RequestOptions {
+ _ajaxSetup(): ReturnType<AjaxCallbackSetup> {
return {
data: {
className: "wcf\\data\\user\\activity\\event\\UserActivityEventAction",
*/
import * as Ajax from "../../../Ajax";
-import { AjaxCallbackObject, ResponseData } from "../../../Ajax/Data";
+import { AjaxCallbackObject, AjaxCallbackSetup, ResponseData } from "../../../Ajax/Data";
import DomUtil from "../../../Dom/Util";
import * as EventHandler from "../../../Event/Handler";
import * as Language from "../../../Language";
UiNotification.show();
}
- _ajaxSetup() {
+ _ajaxSetup(): ReturnType<AjaxCallbackSetup> {
return {
data: {
actionName: "deleteCoverPhoto",
*/
import * as Ajax from "../../Ajax";
-import { AjaxCallbackObject, CallbackSetup } from "../../Ajax/Data";
+import { AjaxCallbackObject, AjaxCallbackSetup } from "../../Ajax/Data";
import * as Core from "../../Core";
-import { DialogCallbackObject, CallbackSetup as DialogSetup } from "../Dialog/Data";
+import { DialogCallbackObject, DialogCallbackSetup } from "../Dialog/Data";
import DomUtil from "../../Dom/Util";
import * as Language from "../../Language";
import * as StringUtil from "../../StringUtil";
UiNotification.show();
}
- _ajaxSetup(): ReturnType<CallbackSetup> {
+ _ajaxSetup(): ReturnType<AjaxCallbackSetup> {
return {
data: {
className: "wcf\\data\\user\\UserAction",
};
}
- _dialogSetup(): ReturnType<DialogSetup> {
+ _dialogSetup(): ReturnType<DialogCallbackSetup> {
return {
id: "wcfUiUserEditor",
options: {
import DomUtil from "../../Dom/Util";
import UiDialog from "../Dialog";
import UiPagination from "../Pagination";
-import { AjaxCallbackObject, CallbackSetup, DatabaseObjectActionResponse } from "../../Ajax/Data";
-import { DialogCallbackObject, DialogData, CallbackSetup as DialogSetup } from "../Dialog/Data";
+import { AjaxCallbackObject, AjaxCallbackSetup, DatabaseObjectActionResponse } from "../../Ajax/Data";
+import { DialogCallbackObject, DialogData, DialogCallbackSetup } from "../Dialog/Data";
/**
* @constructor
this.showPage();
}
- _ajaxSetup(): ReturnType<CallbackSetup> {
+ _ajaxSetup(): ReturnType<AjaxCallbackSetup> {
return {
data: {
actionName: "getGroupedUserList",
};
}
- _dialogSetup(): ReturnType<DialogSetup> {
+ _dialogSetup(): ReturnType<DialogCallbackSetup> {
return {
id: DomUtil.getUniqueId(),
options: {
*/
import * as Ajax from "../../../../../Ajax";
-import { AjaxCallbackObject, RequestOptions, ResponseData } from "../../../../../Ajax/Data";
+import { AjaxCallbackObject, AjaxCallbackSetup, ResponseData } from "../../../../../Ajax/Data";
abstract class UiUserProfileMenuItemAbstract implements AjaxCallbackObject {
protected readonly _button = document.createElement("a");
/**
* Returns the default Ajax request data
*/
- _ajaxSetup(): RequestOptions {
+ _ajaxSetup(): ReturnType<AjaxCallbackSetup> {
// This should be an abstract method, but cannot be marked as such for backwards compatibility.
throw new Error("Implement me!");
import * as Language from "../../../../../Language";
-import { RequestOptions, ResponseData } from "../../../../../Ajax/Data";
+import { AjaxCallbackSetup, ResponseData } from "../../../../../Ajax/Data";
import * as UiNotification from "../../../../Notification";
import UiUserProfileMenuItemAbstract from "./Abstract";
UiNotification.show();
}
- _ajaxSetup(): RequestOptions {
+ _ajaxSetup(): ReturnType<AjaxCallbackSetup> {
return {
data: {
className: "wcf\\data\\user\\follow\\UserFollowAction",
import * as Language from "../../../../../Language";
-import { RequestOptions, ResponseData } from "../../../../../Ajax/Data";
+import { AjaxCallbackSetup, ResponseData } from "../../../../../Ajax/Data";
import * as UiNotification from "../../../../Notification";
import UiUserProfileMenuItemAbstract from "./Abstract";
UiNotification.show();
}
- _ajaxSetup(): RequestOptions {
+ _ajaxSetup(): ReturnType<AjaxCallbackSetup> {
return {
data: {
className: "wcf\\data\\user\\ignore\\UserIgnoreAction",
*/
import * as Ajax from "../../../Ajax";
-import { AjaxCallbackObject, CallbackSetup, DatabaseObjectActionResponse } from "../../../Ajax/Data";
-import { DialogCallbackObject, DialogData, CallbackSetup as DialogSetup } from "../../Dialog/Data";
+import { AjaxCallbackObject, AjaxCallbackSetup, DatabaseObjectActionResponse } from "../../../Ajax/Data";
+import { DialogCallbackObject, DialogData, DialogCallbackSetup } from "../../Dialog/Data";
import DomChangeListener from "../../../Dom/Change/Listener";
import UiDialog from "../../Dialog";
import UiPagination from "../../Pagination";
this.showPage();
}
- _ajaxSetup(): ReturnType<CallbackSetup> {
+ _ajaxSetup(): ReturnType<AjaxCallbackSetup> {
return {
data: {
actionName: "getGroupedUserTrophyList",
};
}
- _dialogSetup(): ReturnType<DialogSetup> {
+ _dialogSetup(): ReturnType<DialogCallbackSetup> {
return {
id: "userTrophyListOverlay",
options: {