Roo/bootstrap/PhoneInput.js
authorjohn <john@roojs.com>
Mon, 26 Mar 2018 06:20:47 +0000 (14:20 +0800)
committerjohn <john@roojs.com>
Mon, 26 Mar 2018 06:20:47 +0000 (14:20 +0800)
roojs-bootstrap.js
roojs-bootstrap-debug.js

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

index f1da57e..84f4bd4 100644 (file)
@@ -159,7 +159,6 @@ Roo.extend(Roo.bootstrap.PhoneInput, Roo.bootstrap.TriggerField,  {
                         }
                     ]
                 }),
-                data : this.data,
                 listeners : {
                     beforeload : function(_self, o)
                     {
@@ -173,6 +172,8 @@ Roo.extend(Roo.bootstrap.PhoneInput, Roo.bootstrap.TriggerField,  {
                 }
             });
             
+            this.store.data = this.data;
+            
             return cfg;
         },
         
index 4864565..09c65b6 100644 (file)
@@ -38087,12 +38087,9 @@ Roo.extend(Roo.bootstrap.PhoneInput, Roo.bootstrap.TriggerField,  {
                         }
                     ]
                 }),
-                data : this.data,
                 listeners : {
                     beforeload : function(_self, o)
                     {
-                        Roo.log('hrere...');
-                        Roo.log(this.data);
                         o.params = o.params || {};
                         var d = {
                             success :true,
@@ -38103,6 +38100,8 @@ Roo.extend(Roo.bootstrap.PhoneInput, Roo.bootstrap.TriggerField,  {
                 }
             });
             
+            this.store.data = this.data;
+            
             return cfg;
         },
         
index 322499b..0365c50 100644 (file)
@@ -1606,8 +1606,8 @@ var id=Roo.id();var B={cls:'form-group',cn:[]};var C={tag:'input',id:id,type:'te
 ;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];
-}});this.store=new Roo.data.Store({proxy:new Roo.data.MemoryProxy({}),reader:new Roo.data.JsonReader({fields:[{'name':'testing','type':'string'}]}),data:this.data,listeners:{beforeload:function(K,o){Roo.log('hrere...');Roo.log(this.data);o.params=o.params||{}
-;var d={success:true,data:this.data};this.proxy.data=d;}}});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}
+}});this.store=new Roo.data.Store({proxy:new Roo.data.MemoryProxy({}),reader:new Roo.data.JsonReader({fields:[{'name':'testing','type':'string'}]}),listeners:{beforeload:function(K,o){o.params=o.params||{};var d={success:true,data:this.data};this.proxy.data=d;
+}}});this.store.data=this.data;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}
 );this.tpl='<li><a href="#">{'+this.displayField+'}</a></li>';this.view=new Roo.View(this.list,this.tpl,{singleSelect:true,store:this.store,selectedClass:this.selectedClass});this.view.on('click',this.onViewClick,this);},onTriggerClick:function(e){Roo.log('trigger click');
 if(this.disabled||!this.triggerList){return;}this.page=0;this.loadNext=false;if(this.isExpanded()){this.collapse();}else{this.hasFocus=true;if(this.triggerAction=='all'){}else{}if(!this.blockFocus){this.inputEl().focus();}}},isExpanded:function(){return this.list.isVisible();
 },collapse:function(){if(!this.isExpanded()){return;}this.list.hide();this.hasFocus=false;Roo.get(document).un('mousedown',this.collapseIf,this);Roo.get(document).un('mousewheel',this.collapseIf,this);this.fireEvent('collapse',this);this.validate();},expand:function(){if(this.isExpanded()||!this.hasFocus){return;