Removes last child from inline editor dropdown if it is a divider
authorMatthias Schmidt <gravatronics@live.com>
Tue, 5 Feb 2013 13:20:14 +0000 (14:20 +0100)
committerMatthias Schmidt <gravatronics@live.com>
Tue, 5 Feb 2013 13:20:14 +0000 (14:20 +0100)
wcfsetup/install/files/js/WCF.js

index ac0fde47d5d371bfa62d103c4d219c35586bc1c9..7c9637bdde761b01abdee8f051b57887f18bc653 100755 (executable)
@@ -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;