Roo/form/ComboBox.js
authorAlan Knowles <alan@akbkhome.com>
Wed, 11 Aug 2010 06:32:06 +0000 (14:32 +0800)
committerAlan Knowles <alan@akbkhome.com>
Wed, 11 Aug 2010 06:32:06 +0000 (14:32 +0800)
Roo/form/ComboBox.js

index f6a7bae..e14c06b 100644 (file)
@@ -397,10 +397,18 @@ Roo.extend(Roo.form.ComboBox, Roo.form.TriggerField, {
                 {tag: 'img', src: Roo.BLANK_IMAGE_URL, cls: 'x-form-combo-add' });  
        
             this.addicon.on('click', function(e) {
-                this.fireEvent('adderclick', this, e);
+                this.fireEvent('add', this, e);
+            }, this);
+        }
+        if (typeof(this.events.edit.listeners) != 'undefined') {
+            
+            this.addicon = this.wrap.createChild(
+                {tag: 'img', src: Roo.BLANK_IMAGE_URL, cls: 'x-form-combo-edit' });  
+       
+            this.addicon.on('click', function(e) {
+                this.fireEvent('edit', this, e);
             }, this);
         }
-