From: Cyperghost Date: Thu, 20 Jun 2024 09:14:00 +0000 (+0200) Subject: Remove the TODO, this cannot be implemented because the browser only allows the call... X-Git-Tag: 6.1.0_Alpha_1~41^2~36 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=853e241e1f9c28510a59562cc25bf911b7cc8300;p=GitHub%2FWoltLab%2FWCF.git Remove the TODO, this cannot be implemented because the browser only allows the call `....click()` in the case of a `click` event. --- diff --git a/ts/WoltLabSuite/Core/Form/Builder/Field/Controller/FileProcessor.ts b/ts/WoltLabSuite/Core/Form/Builder/Field/Controller/FileProcessor.ts index 1e8b8f4a93..7a975b77e3 100644 --- a/ts/WoltLabSuite/Core/Form/Builder/Field/Controller/FileProcessor.ts +++ b/ts/WoltLabSuite/Core/Form/Builder/Field/Controller/FileProcessor.ts @@ -113,10 +113,7 @@ export class FileProcessor { replaceButton.classList.add("button", "small"); replaceButton.textContent = getPhrase("wcf.global.button.replace"); replaceButton.addEventListener("click", () => { - // TODO show dialog if the user really wants to replace the file. - // the old will be deleted this.#replaceElement = element; - // add to context an extra attribute that the replace button is clicked. // after the dialog is closed or the file is selected, the context will be reset to his old value. // this is necessary as the serverside validation will otherwise fail. diff --git a/wcfsetup/install/files/js/WoltLabSuite/Core/Form/Builder/Field/Controller/FileProcessor.js b/wcfsetup/install/files/js/WoltLabSuite/Core/Form/Builder/Field/Controller/FileProcessor.js index 05e83a6bf5..4e51558888 100644 --- a/wcfsetup/install/files/js/WoltLabSuite/Core/Form/Builder/Field/Controller/FileProcessor.js +++ b/wcfsetup/install/files/js/WoltLabSuite/Core/Form/Builder/Field/Controller/FileProcessor.js @@ -94,8 +94,6 @@ define(["require", "exports", "WoltLabSuite/Core/Language", "WoltLabSuite/Core/A replaceButton.classList.add("button", "small"); replaceButton.textContent = (0, Language_1.getPhrase)("wcf.global.button.replace"); replaceButton.addEventListener("click", () => { - // TODO show dialog if the user really wants to replace the file. - // the old will be deleted this.#replaceElement = element; // add to context an extra attribute that the replace button is clicked. // after the dialog is closed or the file is selected, the context will be reset to his old value.