From 4c5cfd1ab61b45040c3b2141254963883a559f15 Mon Sep 17 00:00:00 2001 From: Matthias Schmidt Date: Tue, 5 Feb 2013 14:20:14 +0100 Subject: [PATCH] Removes last child from inline editor dropdown if it is a divider --- wcfsetup/install/files/js/WCF.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/wcfsetup/install/files/js/WCF.js b/wcfsetup/install/files/js/WCF.js index ac0fde47d5..7c9637bdde 100755 --- a/wcfsetup/install/files/js/WCF.js +++ b/wcfsetup/install/files/js/WCF.js @@ -5608,6 +5608,12 @@ WCF.InlineEditor = Class.extend({ if ($hasOptions) { this._dropdowns[$elementID].parent('span').addClass('dropdownOpen'); + + // if last child is divider, remove it + var $lastChild = this._dropdowns[$elementID].children().last(); + if ($lastChild.hasClass('dropdownDivider')) { + $lastChild.remove(); + } } return false; -- 2.20.1