Roo/bootstrap/ComboBox.js
[roojs1] / Roo / bootstrap / ComboBox.js
index cec713c..4d6be4a 100644 (file)
@@ -1730,6 +1730,7 @@ Roo.extend(Roo.bootstrap.ComboBox, Roo.bootstrap.TriggerField, {
         this.hasFocus = false;
         
         if(this.tickable){
+            
             this.okBtn.hide();
             this.cancelBtn.hide();
             this.trigger.show();
@@ -1862,7 +1863,11 @@ Roo.extend(Roo.bootstrap.ComboBox, Roo.bootstrap.TriggerField, {
     
     onSearchFieldClick : function(e)
     {
+        Roo.log('in???');
+        Roo.log([this.hasFocus, e.getTarget().nodeName.toLowerCase() ]);
+        
         if(this.hasFocus && !this.disabled && e.getTarget().nodeName.toLowerCase() != 'button'){
+            Roo.log('onSearchFieldClick');
             this.onTickableFooterButtonClick(e, false, false);
             return;
         }
@@ -1968,8 +1973,6 @@ Roo.extend(Roo.bootstrap.ComboBox, Roo.bootstrap.TriggerField, {
     {   
         var dv = ''; // display value
         
-        Roo.log(o);
-        
         if (this.displayField) {
             dv = !o || typeof(o[this.displayField]) == 'undefined' ? '' : o[this.displayField];
         } else {
@@ -2837,6 +2840,14 @@ Roo.extend(Roo.bootstrap.ComboBox, Roo.bootstrap.TriggerField, {
             
             var default_text = '-- SELECT --';
             
+            if(this.placeholder.length){
+                default_text = this.placeholder;
+            }
+            
+            if(this.emptyTitle.length){
+                default_text += ' - ' + this.emptyTitle + ' -';
+            }
+            
             var opt = this.inputEl().createChild({
                 tag: 'option',
                 value : 0,