Roo/bootstrap/PhoneInput.js
authorjohn <john@roojs.com>
Mon, 26 Mar 2018 03:17:42 +0000 (11:17 +0800)
committerjohn <john@roojs.com>
Mon, 26 Mar 2018 03:17:42 +0000 (11:17 +0800)
roojs-bootstrap.js
roojs-bootstrap-debug.js

Roo/bootstrap/PhoneInput.js
roojs-bootstrap-debug.js
roojs-bootstrap.js

index 7aca6d3..356e9bc 100644 (file)
@@ -152,8 +152,8 @@ Roo.extend(Roo.bootstrap.PhoneInput, Roo.bootstrap.TriggerField,  {
             
             this.trigger = this.el.select('div.flag-container',true).first();
             this.trigger.on("click", this.onTriggerClick, this, {preventDefault:true});
-        },
-        
+        }
+        /*
         createList : function()
         {
             this.list = Roo.get(document.body).createChild({
@@ -165,4 +165,5 @@ Roo.extend(Roo.bootstrap.PhoneInput, Roo.bootstrap.TriggerField,  {
         },
         
         onTriggerClick : Roo.emptyFn
+        */
 });
\ No newline at end of file
index 8f6bc28..91a4845 100644 (file)
@@ -37911,9 +37911,7 @@ Roo.bootstrap.PhoneInput = function(config) {
     Roo.bootstrap.PhoneInput.superclass.constructor.call(this, config);
 };
 
-Roo.extend(Roo.bootstrap.PhoneInput, Roo.bootstrap.Input,  {
-        
-        onTriggerClick : Roo.emptyFn,
+Roo.extend(Roo.bootstrap.PhoneInput, Roo.bootstrap.TriggerField,  {
         
         getAutoCreate : function()
         {
@@ -38063,8 +38061,8 @@ Roo.extend(Roo.bootstrap.PhoneInput, Roo.bootstrap.Input,  {
             
             this.trigger = this.el.select('div.flag-container',true).first();
             this.trigger.on("click", this.onTriggerClick, this, {preventDefault:true});
-        },
-        
+        }
+        /*
         createList : function()
         {
             this.list = Roo.get(document.body).createChild({
@@ -38073,5 +38071,8 @@ Roo.extend(Roo.bootstrap.PhoneInput, Roo.bootstrap.Input,  {
                 style: 'display:none'
             });
             this.list.setVisibilityMode(Roo.Element.DISPLAY).originalDisplay = 'block';
-        }
+        },
+        
+        onTriggerClick : Roo.emptyFn
+        */
 });
\ No newline at end of file
index 5b8c1e8..88f89f7 100644 (file)
@@ -1599,11 +1599,10 @@ this.pnode.addClass("disabled");}},enable:function(){this.disabled=false;this.pn
 }},refresh:function(){if(this.refreshDelegate){this.loaded=false;this.refreshDelegate();}},_setLoaded:function(){this.loaded=true;},closeClick:function(e){var o={};e.stopEvent();this.fireEvent("beforeclose",this,o);if(o.cancel!==true){this.tabPanel.removeTab(this.id);
 }},closeText:"Close this tab"});
 // Roo/bootstrap/PhoneInput.js
-Roo.bootstrap.PhoneInput=function(A){Roo.bootstrap.PhoneInput.superclass.constructor.call(this,A);};Roo.extend(Roo.bootstrap.PhoneInput,Roo.bootstrap.Input,{onTriggerClick:Roo.emptyFn,getAutoCreate:function(){var A=this.labelAlign||this.parentLabelAlign();
-var id=Roo.id();var B={cls:'form-group',cn:[]};var C={tag:'input',id:id,type:'tel',cls:'form-control tel-input',autocomplete:'new-password'};if(this.name){C.name=this.name;}if(this.disabled){C.disabled=true;}var D={tag:'div',cls:'flag-container',cn:[{tag:'div',cls:'flag'}
-,{tag:'div',cls:'caret'}]};var E={tag:'div',cls:this.hasFeedback?'has-feedback':'',cn:[C]};var F={cls:'roo-select2-container input-group',cn:[D,E]};if(this.fieldLabel.length){var G={tag:'i',tooltip:'This field is required'};var H={tag:'label','for':id,cls:'control-label',cn:[]}
-;var I={tag:'span',html:this.fieldLabel};G.cls='roo-required-indicator text-danger fa fa-lg fa-star left-indicator';H.cn=[G,I];if(this.indicatorpos=='right'){G.cls='roo-required-indicator text-danger fa fa-lg fa-star right-indicator';H.cn=[I,G];}if(A=='left'){F={tag:'div',cn:[F]}
-;if(this.labelWidth>12){H.style="width: "+this.labelWidth+'px';}if(this.labelWidth<13&&this.labelmd==0){this.labelmd=this.labelWidth;}if(this.labellg>0){H.cls+=' col-lg-'+this.labellg;C.cls+=' col-lg-'+(12-this.labellg);}if(this.labelmd>0){H.cls+=' col-md-'+this.labelmd;
-F.cls+=' col-md-'+(12-this.labelmd);}if(this.labelsm>0){H.cls+=' col-sm-'+this.labelsm;F.cls+=' col-sm-'+(12-this.labelsm);}if(this.labelxs>0){H.cls+=' col-xs-'+this.labelxs;F.cls+=' col-xs-'+(12-this.labelxs);}}}B.cn=[H,F];var J=this;['xs','sm','md','lg'].map(function(K){if(J[K]){B.cls+=' col-'+K+'-'+J[K];
-}});return B;},initEvents:function(){this.createList();Roo.bootstrap.PhoneInput.superclass.initEvents.call(this);this.trigger=this.el.select('div.flag-container',true).first();this.trigger.on("click",this.onTriggerClick,this,{preventDefault:true});},createList:function(){this.list=Roo.get(document.body).createChild({tag:'ul',cls:'typeahead typeahead-long dropdown-menu',style:'display:none'}
-);this.list.setVisibilityMode(Roo.Element.DISPLAY).originalDisplay='block';}});
+Roo.bootstrap.PhoneInput=function(A){Roo.bootstrap.PhoneInput.superclass.constructor.call(this,A);};Roo.extend(Roo.bootstrap.PhoneInput,Roo.bootstrap.TriggerField,{getAutoCreate:function(){var A=this.labelAlign||this.parentLabelAlign();var id=Roo.id();var B={cls:'form-group',cn:[]}
+;var C={tag:'input',id:id,type:'tel',cls:'form-control tel-input',autocomplete:'new-password'};if(this.name){C.name=this.name;}if(this.disabled){C.disabled=true;}var D={tag:'div',cls:'flag-container',cn:[{tag:'div',cls:'flag'},{tag:'div',cls:'caret'}]};var E={tag:'div',cls:this.hasFeedback?'has-feedback':'',cn:[C]}
+;var F={cls:'roo-select2-container input-group',cn:[D,E]};if(this.fieldLabel.length){var G={tag:'i',tooltip:'This field is required'};var H={tag:'label','for':id,cls:'control-label',cn:[]};var I={tag:'span',html:this.fieldLabel};G.cls='roo-required-indicator text-danger fa fa-lg fa-star left-indicator';
+H.cn=[G,I];if(this.indicatorpos=='right'){G.cls='roo-required-indicator text-danger fa fa-lg fa-star right-indicator';H.cn=[I,G];}if(A=='left'){F={tag:'div',cn:[F]};if(this.labelWidth>12){H.style="width: "+this.labelWidth+'px';}if(this.labelWidth<13&&this.labelmd==0){this.labelmd=this.labelWidth;
+}if(this.labellg>0){H.cls+=' col-lg-'+this.labellg;C.cls+=' col-lg-'+(12-this.labellg);}if(this.labelmd>0){H.cls+=' col-md-'+this.labelmd;F.cls+=' col-md-'+(12-this.labelmd);}if(this.labelsm>0){H.cls+=' col-sm-'+this.labelsm;F.cls+=' col-sm-'+(12-this.labelsm);
+}if(this.labelxs>0){H.cls+=' col-xs-'+this.labelxs;F.cls+=' col-xs-'+(12-this.labelxs);}}}B.cn=[H,F];var J=this;['xs','sm','md','lg'].map(function(K){if(J[K]){B.cls+=' col-'+K+'-'+J[K];}});return B;},initEvents:function(){this.createList();Roo.bootstrap.PhoneInput.superclass.initEvents.call(this);
+this.trigger=this.el.select('div.flag-container',true).first();this.trigger.on("click",this.onTriggerClick,this,{preventDefault:true});}});