Fixes bug when working with multiple WCF.EditableItemList objects
authorMatthias Schmidt <gravatronics@live.com>
Wed, 26 Dec 2012 12:59:02 +0000 (13:59 +0100)
committerMatthias Schmidt <gravatronics@live.com>
Wed, 26 Dec 2012 12:59:02 +0000 (13:59 +0100)
Currently, `WCF.EditableItemList._data` is shared between multiple objects which has the unexpected effect that you find objects of the second list in the first list.

wcfsetup/install/files/js/WCF.js

index 05d692e19f4c6ad4348e4b9d64c6f318122a7b5d..bfa222d56df648a378cfa2c90746ad0184c66879 100755 (executable)
@@ -6627,6 +6627,7 @@ WCF.EditableItemList = Class.extend({
        init: function(itemListSelector, searchInputSelector) {
                this._itemList = $(itemListSelector);
                this._searchInput = $(searchInputSelector);
+               this._data = { };
                
                if (!this._itemList.length || !this._searchInput.length) {
                        console.debug("[WCF.EditableItemList] Item list and/or search input do not exist, aborting.");