diff --git a/qui/controls/elements/Select.js b/qui/controls/elements/Select.js index 0b6741bf2556dbe628c78c14b5d9f2239e086d35..c0b01235d8d1097c63af00ce909de1eee384aa30 100644 --- a/qui/controls/elements/Select.js +++ b/qui/controls/elements/Select.js @@ -12,7 +12,7 @@ * @require Ajax * @require Locale * - * @event onAddItem [ this, id ] + * @event onAddItem [ this, id, SelectItem ] * @event onChange [ this ] * @event onSearchButtonClick [ this, Button ] * @event onCreate [ this ] @@ -446,7 +446,6 @@ define('qui/controls/elements/Select', [ } }).inject(DropDown); - new Element('span', { 'class': data[i].icon || this.getAttribute('icon'), styles : { @@ -479,7 +478,7 @@ define('qui/controls/elements/Select', [ } require([this.getAttribute('child')], function (Child) { - new Child({ + var NewItem = new Child({ id : id, Parent: this, events: { @@ -489,10 +488,9 @@ define('qui/controls/elements/Select', [ this.$values.push(id); - this.fireEvent('addItem', [this, id]); + this.fireEvent('addItem', [this, id, NewItem]); this.$refreshValues(); this.refresh(); - }.bind(this)); return this;