From: Matthias Schmidt Date: Fri, 19 Aug 2016 14:52:44 +0000 (+0200) Subject: Add LanguageChooser.removeChooser() X-Git-Tag: 3.0.0_Beta_1~659 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=9b04441ea8436c7a0caa37a2f4f1bad7a44a9b8a;p=GitHub%2FWoltLab%2FWCF.git Add LanguageChooser.removeChooser() --- diff --git a/wcfsetup/install/files/js/WoltLabSuite/Core/Language/Chooser.js b/wcfsetup/install/files/js/WoltLabSuite/Core/Language/Chooser.js index 8752bbcdeb..7893402edb 100644 --- a/wcfsetup/install/files/js/WoltLabSuite/Core/Language/Chooser.js +++ b/wcfsetup/install/files/js/WoltLabSuite/Core/Language/Chooser.js @@ -281,6 +281,17 @@ define(['Dictionary', 'Language', 'Dom/Traverse', 'Dom/Util', 'ObjectMap', 'Ui/S return ~~this.getChooser(chooserId).element.value; }, + /** + * Removes the chooser with given id. + * + * @param {string} chooserId input element id + */ + removeChooser: function(chooserId) { + if (_choosers.has(chooserId)) { + _choosers.delete(chooserId); + } + }, + /** * Sets the language for a certain chooser. *