Roo/bootstrap/ComboBox.js
[roojs1] / Roo / bootstrap / ComboBox.js
index e24c54b..307ebe6 100644 (file)
@@ -1647,13 +1647,16 @@ Roo.extend(Roo.bootstrap.ComboBox, Roo.bootstrap.TriggerField, {
         if(this.fireEvent('beforequery', qe)===false || qe.cancel){
             return false;
         }
+        
+        Roo.log(qe);
+        
         q = qe.query;
         
         forceAll = qe.forceAll;
         if(forceAll === true || (q.length >= this.minChars)){
             
             this.hasQuery = true;
-            
+            Roo.log('in??');
             if(this.lastQuery != q || this.alwaysQuery){
                 this.lastQuery = q;
                 if(this.mode == 'local'){
@@ -1675,6 +1678,7 @@ Roo.extend(Roo.bootstrap.ComboBox, Roo.bootstrap.TriggerField, {
                     
                     this.onLoad();
                     
+                    Roo.log('onload???');
                     
                 }else{
                     
@@ -2833,7 +2837,15 @@ Roo.extend(Roo.bootstrap.ComboBox, Roo.bootstrap.TriggerField, {
         
         if(this.allowBlank) {
             
-            var default_text = (this.placeholder.length) ? this.placeholder : '-- SELECT --';
+            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',