this._previousXhr = undefined;
Listener_1.default.trigger();
// fix anchor tags generated through WCF::getAnchor()
- document.querySelectorAll("a[href*=\"#\"]").forEach((link) => {
+ document.querySelectorAll('a[href*="#"]').forEach((link) => {
let href = link.href;
if (href.indexOf("AJAXProxy") !== -1 || href.indexOf("ajax-proxy") !== -1) {
href = href.substr(href.indexOf("#"));
DomChangeListener.trigger();
// fix anchor tags generated through WCF::getAnchor()
- document.querySelectorAll("a[href*=\"#\"]").forEach((link: HTMLAnchorElement) => {
+ document.querySelectorAll('a[href*="#"]').forEach((link: HTMLAnchorElement) => {
let href = link.href;
if (href.indexOf("AJAXProxy") !== -1 || href.indexOf("ajax-proxy") !== -1) {
href = href.substr(href.indexOf("#"));
Object.defineProperty(Template, "callbacks", {
enumerable: false,
configurable: false,
- get: function() {
+ get: function () {
throw new Error("WCF.Template.callbacks is no longer supported");
},
- set: function(_value) {
+ set: function (_value) {
throw new Error("WCF.Template.callbacks is no longer supported");
},
});
// value may contain the placeholder `{$objectId}`
submitFieldName: "",
},
- opts
+ opts,
) as ItemListOptions;
const form = DomTraverse.parentByTag(element, "FORM") as HTMLFormElement;
enableVisibilityFilter: true,
filterPosition: "bottom",
},
- options
+ options,
) as FilterOptions;
if (this._options.filterPosition !== "top") {
// value may contain the placeholder `{$objectId}`
submitFieldName: "",
},
- opts
+ opts,
) as ItemListStaticOptions;
const form = DomTraverse.parentByTag(element, "FORM") as HTMLFormElement;
if (!options.isCSV) {
if (!options.submitFieldName.length && typeof options.callbackSubmit !== "function") {
throw new Error(
- "Expected a valid function for option 'callbackSubmit', a non-empty value for option 'submitFieldName' or enabling the option 'submitFieldCSV'."
+ "Expected a valid function for option 'callbackSubmit', a non-empty value for option 'submitFieldName' or enabling the option 'submitFieldCSV'.",
);
}
isSimpleSorting: false,
additionalParameters: {},
},
- opts
+ opts,
) as SortableListOptions;
UiScreen.on("screen-sm-md", {
this._options.offset,
options,
this._options.isSimpleSorting,
- this._options.additionalParameters
+ this._options.additionalParameters,
);
}
export function open(callback: CallbackSelect): void {
if (!uiStyleFontAwesome) {
throw new Error(
- "Missing icon data, please include the template before calling this method using `{include file='fontAwesomeJavaScript'}`."
+ "Missing icon data, please include the template before calling this method using `{include file='fontAwesomeJavaScript'}`.",
);
}
if (this.tabs.has(name)) {
throw new Error(
"Tab names must be unique, li[data-name='" +
- name +
- "'] (tab menu id: '" +
- containerId +
- "') exists more than once.",
+ name +
+ "'] (tab menu id: '" +
+ containerId +
+ "') exists more than once.",
);
}
if (this.isLegacy) {
this.container.dataset.isLegacy = "true";
- this.tabs.forEach(function(tab, name) {
+ this.tabs.forEach(function (tab, name) {
tab.setAttribute("aria-controls", name);
});
}
}
if (preselect === true) {
- this.tabs.forEach(function(tab) {
+ this.tabs.forEach(function (tab) {
if (
!selectTab &&
!DomUtil.isHidden(tab) &&
() => {
window.location.hash = `#${this.containerId}`;
window.location.reload();
- }
+ },
);
}
class CacheData {
private readonly cache = new Map<number, string>();
- constructor(readonly pageCount: number, readonly title: string) {
- }
+ constructor(readonly pageCount: number, readonly title: string) {}
has(pageNo: number): boolean {
return this.cache.has(pageNo);
// url for uploading file
url: `index.php?ajax-upload/&t=${window.SECURITY_TOKEN}`,
},
- options
+ options,
) as UploadOptions;
this._options.url = Core.convertLegacyUrl(this._options.url);
_data: ResponseData,
_responseText: string,
_xhr: XMLHttpRequest,
- _requestOptions: RequestOptions
+ _requestOptions: RequestOptions,
): boolean {
// This should be an abstract method, but cannot be marked as such for backwards compatibility.
_data: ResponseData,
_responseText: string,
_xhr: XMLHttpRequestEventTarget,
- _requestOptions: RequestOptions
+ _requestOptions: RequestOptions,
): void {
// This should be an abstract method, but cannot be marked as such for backwards compatibility.
}