From 9b04441ea8436c7a0caa37a2f4f1bad7a44a9b8a Mon Sep 17 00:00:00 2001 From: Matthias Schmidt Date: Fri, 19 Aug 2016 16:52:44 +0200 Subject: [PATCH] Add LanguageChooser.removeChooser() --- .../files/js/WoltLabSuite/Core/Language/Chooser.js | 11 +++++++++++ 1 file changed, 11 insertions(+) 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. * -- 2.20.1