From a203335d279323918ab8bfeb9df550d6c6337430 Mon Sep 17 00:00:00 2001 From: Matthias Schmidt Date: Mon, 5 Aug 2013 11:28:14 +0200 Subject: [PATCH] Adds possibility to remove dropdowns Fixes #1426 --- wcfsetup/install/files/js/WCF.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/wcfsetup/install/files/js/WCF.js b/wcfsetup/install/files/js/WCF.js index 75bca5ae7e..e05b5107a6 100755 --- a/wcfsetup/install/files/js/WCF.js +++ b/wcfsetup/install/files/js/WCF.js @@ -831,6 +831,19 @@ WCF.Dropdown = { } }, + /** + * Removes the dropdown with the given container id. + * + * @param string containerID + */ + removeDropdown: function(containerID) { + if (this._menus[containerID]) { + $(this._menus[containerID]).remove(); + delete this._menus[containerID]; + delete this._dropdowns[containerID]; + } + }, + /** * Initializes a dropdown fragment which behaves like a usual dropdown * but is not controlled by a trigger element. -- 2.20.1