Add LanguageChooser.removeChooser()
authorMatthias Schmidt <gravatronics@live.com>
Fri, 19 Aug 2016 14:52:44 +0000 (16:52 +0200)
committerMatthias Schmidt <gravatronics@live.com>
Fri, 19 Aug 2016 14:52:46 +0000 (16:52 +0200)
wcfsetup/install/files/js/WoltLabSuite/Core/Language/Chooser.js

index 8752bbcdebf8067b3f4ece6b56ec05f15cb9ad2f..7893402edb84982c9ff194ef1b9f0be0c4437e6b 100644 (file)
@@ -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.
                 *