From: Matthias Schmidt Date: Sun, 22 Jul 2012 09:44:21 +0000 (+0200) Subject: Makes it possible to use WCF.EditableItemList without search X-Git-Tag: 2.0.0_Beta_1~977^2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=0b9520f4e00b5e84a107d0549c5e2524af4e7919;p=GitHub%2FWoltLab%2FWCF.git Makes it possible to use WCF.EditableItemList without search --- diff --git a/wcfsetup/install/files/js/WCF.js b/wcfsetup/install/files/js/WCF.js index 2db76203fd..10260dd3c4 100755 --- a/wcfsetup/install/files/js/WCF.js +++ b/wcfsetup/install/files/js/WCF.js @@ -5753,7 +5753,9 @@ WCF.EditableItemList = Class.extend({ var $objectID = $element.data('objectID'); var $label = $element.data('label'); - this._search.removeExcludedSearchValue($label); + if (this._search) { + this._search.removeExcludedSearchValue($label); + } this._removeItem($objectID, $label); $element.remove(); @@ -5796,7 +5798,9 @@ WCF.EditableItemList = Class.extend({ var $listItem = $('
  • ' + data.label + '
  • ').data('objectID', data.objectID).data('label', data.label).appendTo(this._itemList); $listItem.click($.proxy(this._click, this)); - this._search.addExcludedSearchValue(data.label); + if (this._search) { + this._search.addExcludedSearchValue(data.label); + } this._addItem(data.objectID, data.label); return true;