From: Matthias Schmidt Date: Sun, 21 Mar 2021 09:47:20 +0000 (+0100) Subject: Remove obsolete JavaScript function X-Git-Tag: 5.4.0_Alpha_1~132^2~11 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=f61b2a9838e929f0a178644ae726ba61a4ff3652;p=GitHub%2FWoltLab%2FWCF.git Remove obsolete JavaScript function --- diff --git a/ts/WoltLabSuite/Core/Controller/Media/List.ts b/ts/WoltLabSuite/Core/Controller/Media/List.ts index 56b26e4790..4ccd92e3c9 100644 --- a/ts/WoltLabSuite/Core/Controller/Media/List.ts +++ b/ts/WoltLabSuite/Core/Controller/Media/List.ts @@ -64,23 +64,6 @@ function addButtonEventListeners(): void { }); } -/** - * Is triggered after media files have been deleted using the delete icon. - */ -function deleteCallback(objectIds?: number[]): void { - const tableRowCount = _tableBody.getElementsByTagName("tr").length; - if (objectIds === undefined) { - if (!tableRowCount) { - window.location.reload(); - } - } else if (objectIds.length === tableRowCount) { - // table is empty, reload page - window.location.reload(); - } else { - Clipboard.reload(); - } -} - /** * Is called when a media edit icon is clicked. */ diff --git a/wcfsetup/install/files/js/WoltLabSuite/Core/Controller/Media/List.js b/wcfsetup/install/files/js/WoltLabSuite/Core/Controller/Media/List.js index a032a41dd6..48bfbfe542 100644 --- a/wcfsetup/install/files/js/WoltLabSuite/Core/Controller/Media/List.js +++ b/wcfsetup/install/files/js/WoltLabSuite/Core/Controller/Media/List.js @@ -6,7 +6,7 @@ * @license GNU Lesser General Public License * @module WoltLabSuite/Core/Controller/Media/List */ -define(["require", "exports", "tslib", "../../Media/List/Upload", "../../Media/Clipboard", "../../Event/Handler", "../../Media/Editor", "../../Dom/Change/Listener", "../../Controller/Clipboard"], function (require, exports, tslib_1, Upload_1, MediaClipboard, EventHandler, Editor_1, DomChangeListener, Clipboard) { +define(["require", "exports", "tslib", "../../Media/List/Upload", "../../Media/Clipboard", "../../Event/Handler", "../../Media/Editor", "../../Dom/Change/Listener"], function (require, exports, tslib_1, Upload_1, MediaClipboard, EventHandler, Editor_1, DomChangeListener) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.init = void 0; @@ -15,7 +15,6 @@ define(["require", "exports", "tslib", "../../Media/List/Upload", "../../Media/C EventHandler = tslib_1.__importStar(EventHandler); Editor_1 = tslib_1.__importDefault(Editor_1); DomChangeListener = tslib_1.__importStar(DomChangeListener); - Clipboard = tslib_1.__importStar(Clipboard); const _mediaEditor = new Editor_1.default({ _editorSuccess: (media, oldCategoryId) => { if (media.categoryID != oldCategoryId) { @@ -51,24 +50,6 @@ define(["require", "exports", "tslib", "../../Media/List/Upload", "../../Media/C button.addEventListener("click", (ev) => edit(ev)); }); } - /** - * Is triggered after media files have been deleted using the delete icon. - */ - function deleteCallback(objectIds) { - const tableRowCount = _tableBody.getElementsByTagName("tr").length; - if (objectIds === undefined) { - if (!tableRowCount) { - window.location.reload(); - } - } - else if (objectIds.length === tableRowCount) { - // table is empty, reload page - window.location.reload(); - } - else { - Clipboard.reload(); - } - } /** * Is called when a media edit icon is clicked. */