Roo/bootstrap/PhoneInput.js
authorjohn <john@roojs.com>
Mon, 26 Mar 2018 02:56:18 +0000 (10:56 +0800)
committerjohn <john@roojs.com>
Mon, 26 Mar 2018 02:56:18 +0000 (10:56 +0800)
Roo/bootstrap/PhoneInput.js

index 14e8552..0101b8d 100644 (file)
@@ -150,26 +150,9 @@ Roo.extend(Roo.bootstrap.PhoneInput, Roo.bootstrap.Input,  {
             
             Roo.bootstrap.TriggerField.superclass.initEvents.call(this);
             //this.wrap = this.el.wrap({cls: "x-form-field-wrap"});
-            if(!this.multiple && this.showToggleBtn){
-                this.trigger = this.el.select('span.flag-container',true).first();
-                if(this.hideTrigger){
-                    this.trigger.setDisplayed(false);
-                }
-                this.trigger.on("click", this.onTriggerClick, this, {preventDefault:true});
-            }
-            
-            if(this.multiple){
-                this.inputEl().on("click", this.onTriggerClick, this, {preventDefault:true});
-            }
+            this.trigger = this.el.select('span.flag-container',true).first();
             
-            if(this.removable && !this.editable && !this.tickable){
-                var close = this.closeTriggerEl();
-                
-                if(close){
-                    close.setVisibilityMode(Roo.Element.DISPLAY).hide();
-                    close.on('click', this.removeBtnClick, this, close);
-                }
-            }
+            this.trigger.on("click", this.onTriggerClick, this, {preventDefault:true});
         },
         
         createList : function()