From 853e241e1f9c28510a59562cc25bf911b7cc8300 Mon Sep 17 00:00:00 2001 From: Cyperghost Date: Thu, 20 Jun 2024 11:14:00 +0200 Subject: [PATCH] Remove the TODO, this cannot be implemented because the browser only allows the call `....click()` in the case of a `click` event. --- .../Core/Form/Builder/Field/Controller/FileProcessor.ts | 3 --- .../Core/Form/Builder/Field/Controller/FileProcessor.js | 2 -- 2 files changed, 5 deletions(-) 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. -- 2.20.1