From b3524514d34156df661718b546d6edd3fb0f2a0a Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Tue, 17 Jul 2012 20:35:58 +0200 Subject: [PATCH] Fixed WCF.InlineEditor divider behavior The InlineEditor now longer appends divider if no previous items exist or the previous item was a divider. --- wcfsetup/install/files/js/WCF.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/wcfsetup/install/files/js/WCF.js b/wcfsetup/install/files/js/WCF.js index d7889adc0e..29e23db4f1 100755 --- a/wcfsetup/install/files/js/WCF.js +++ b/wcfsetup/install/files/js/WCF.js @@ -4534,17 +4534,22 @@ WCF.InlineEditor = Class.extend({ // validate options var $hasOptions = false; + var $lastElementType = ''; for (var $i = 0, $length = this._options.length; $i < $length; $i++) { var $option = this._options[$i]; if ($option.optionName === 'divider') { - $('
  • ' + $option.label + '
  • ').appendTo(this._dropdowns[$elementID]); $listItem.data('elementID', $elementID).data('optionName', $option.optionName).click($.proxy(this._click, this)); $hasOptions = true; + $lastElementType = $option.optionName; } } -- 2.20.1