From f8dcefd097759846871eb3ff7759bd4af0aa2c9d Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Sat, 17 May 2014 15:19:05 +0200 Subject: [PATCH] Fixed tag handling --- wcfsetup/install/files/js/WCF.Tagging.js | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) 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; }, /** -- 2.20.1