more quote identeiifers fixessss
[Pman.Core] / widgets / ComboBoxAdder.js
index 3b12eb2..5e441af 100644 (file)
@@ -5,41 +5,21 @@
  * old combobox adder.. 
  * this is all incorporated into the new combobox, however the API is different..
  * 
- * 
+ * to make this work on the new combo, you just implement a 'add' handler.
  */
 
-
-
-
 
 Ext.form.ComboBoxAdder = function(config){
     
-    Ext.form.ComboBoxAdder.superclass.constructor.call(this, config);
-    this.on('select', function(cb, rec, ix) {
-        cb.lastData = rec.data;
-    });
-    this.addEvents({
-        'adderclick' : true
-    });
+    if (typeof(config.listeners.adderclick) != 'undefined') {
+        config.listeners.add = config.listeners.adderclick;
+    }
+   Ext.form.ComboBoxAdder.superclass.constructor.call(this, config);  
 }
  
-Ext.extend(Ext.form.ComboBoxAdder, Ext.form.ComboBox, { 
-    lastData : false,
-    //onAddClick: function() { },
-    
-    onRender : function(ct, position) 
-    {
-        Ext.form.ComboBoxAdder.superclass.onRender.call(this, ct, position); 
-        this.adder = this.wrap.createChild(
-            {tag: 'img', src: Ext.BLANK_IMAGE_URL, cls: 'x-form-adder' });  
-        var _t = this;
-        this.adder.on('click', function(e) {
-            _t.fireEvent('adderclick', this, e);
-        }, _t);
-        //this.adder.on('click', this.onAddClick, _t);
-    }
-    
-});
+Ext.extend(Ext.form.ComboBoxAdder, Ext.form.ComboBox);