From: Alexander Ebert Date: Sat, 17 May 2014 13:19:05 +0000 (+0200) Subject: Fixed tag handling X-Git-Tag: 2.0.7~30^2~2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=f8dcefd097759846871eb3ff7759bd4af0aa2c9d;p=GitHub%2FWoltLab%2FWCF.git Fixed tag handling --- diff --git a/wcfsetup/install/files/js/WCF.Tagging.js b/wcfsetup/install/files/js/WCF.Tagging.js index 0bdc34ac17..05315ee92c 100644 --- a/wcfsetup/install/files/js/WCF.Tagging.js +++ b/wcfsetup/install/files/js/WCF.Tagging.js @@ -96,10 +96,20 @@ WCF.Tagging.TagList = WCF.EditableItemList.extend({ data.label = data.label.substr(0, this._maxLength); } - var result = this._super(data); - $(this._itemList).find('.badge:not(tag)').addClass('tag'); + if (WCF.inArray(data.label, this._data)) { + return true; + } + + var $listItem = $('
  • ' + WCF.String.escapeHTML(data.label) + '
  • ').data('objectID', data.objectID).data('label', data.label).appendTo(this._itemList); + $listItem.click($.proxy(this._click, this)); + + if (this._search) { + this._search.addExcludedSearchValue(data.label); + } + + this._addItem(data.objectID, data.label); - return result; + return true; }, /**