more quote identeiifers fixessss
[Pman.Core] / widgets / ComboBoxLister.js
index c631dc0..fc2e55a 100644 (file)
@@ -63,8 +63,12 @@ Ext.extend(Ext.form.ComboBoxLister, Ext.form.ComboBox, {
         this.wrap.dom.appendChild(this.el.dom);
         this.outerWrap.dom.removeChild(this.trigger.dom);
         this.wrap.dom.appendChild(this.trigger.dom);
+         
+        this.trigger.setStyle('position','relative');
+        this.trigger.setStyle('left', '0px');
+        this.trigger.setStyle('top', '2px');
+        this.el.setStyle('vertical-align', 'text-bottom');
         
-        //this.trigger.setStyle('position', 'relative');
         //this.trigger.setStyle('vertical-align', 'top');
         if (this.adder) {
             
@@ -80,6 +84,33 @@ Ext.extend(Ext.form.ComboBoxLister, Ext.form.ComboBox, {
         //this.adder.on('click', this.onAddClick, _t);
         
     },
+    
+    
+    onResize: function(w, h){
+        Roo.form.ComboBox.superclass.onResize.apply(this, arguments);
+        
+        if(typeof w != 'number'){
+            // we do not handle it!?!?
+            return;
+        }
+        var tw = this.trigger.getWidth();
+        tw += this.addicon ? this.addicon.getWidth() : 0;
+        tw += this.editicon ? this.editicon.getWidth() : 0;
+        var x = w - tw;
+        this.el.setWidth( this.adjustWidth('input', x));
+            
+        this.trigger.setStyle('left', '0px');
+        
+        if(this.list && this.listWidth === undefined){
+            var lw = Math.max(x + this.trigger.getWidth(), this.minListWidth);
+            this.list.setWidth(lw);
+            this.innerList.setWidth(lw - this.list.getFrameWidth('lr'));
+        }
+        
+    
+        
+    },
+    
     addItem: function(rec)
     {
         if (this.items.indexOfKey(rec[this.idField]) > -1) {
@@ -140,7 +171,7 @@ Ext.extend(Ext.form.ComboBoxLister, Ext.form.ComboBox, {
         }
         var _this = this;
         Roo.each(v, function(l) {
-                _this.addItem(l);
+            _this.addItem(l);
         });
         
     },