From 844e6560708767d5bd3d89a66fe37fd00c599825 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Thu, 12 Apr 2012 19:00:10 +0200 Subject: [PATCH] Fixed clipboard selection --- wcfsetup/install/files/js/WCF.js | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/wcfsetup/install/files/js/WCF.js b/wcfsetup/install/files/js/WCF.js index 6dea51ddda..bffd54e080 100644 --- a/wcfsetup/install/files/js/WCF.js +++ b/wcfsetup/install/files/js/WCF.js @@ -953,19 +953,19 @@ WCF.Clipboard = { var $container = $containers[$typeName]; var $list = $container.children('ul'); if ($list.length == 0) { - $list = $('').appendTo($container); + $list = $('').appendTo($container); } var $editor = data.items[$typeName]; - var $label = $('
  • ' + $editor.label + '
  • ').appendTo($list); - var $itemList = $('
      ').appendTo($label); - - $label.click(function() { $itemList.toggleClass('open'); }); + var $label = $('
    1. ' + $editor.label + '
    2. ').appendTo($list); + var $itemList = $('').appendTo($label); + + $label.click(function() { $list.toggleClass('dropdownOpen'); }); // create editor items for (var $itemIndex in $editor.items) { var $item = $editor.items[$itemIndex]; - var $listItem = $('
    3. ' + $item.label + '
    4. ').appendTo($itemList); + var $listItem = $('
    5. ' + $item.label + '
    6. ').appendTo($itemList); $listItem.data('objectType', $typeName); $listItem.data('actionName', $item.actionName).data('parameters', $item.parameters); $listItem.data('internalData', $item.internalData).data('url', $item.url).data('type', $typeName); @@ -989,9 +989,7 @@ WCF.Clipboard = { * Closes the clipboard editor item list. */ _closeLists: function() { - $('.jsClipboardEditor ul ol').each(function(index, list) { - $(this).removeClass('open'); - }); + $('.jsClipboardEditor ul').removeClass('dropdownOpen') }, /** -- 2.20.1