From d77497793736bb68884b9022d6bd963e29b46cdb Mon Sep 17 00:00:00 2001 From: Edward Date: Wed, 1 Aug 2018 12:21:54 +0800 Subject: [PATCH] Roo/bootstrap/Input.js roojs-bootstrap.js roojs-bootstrap-debug.js --- Roo/bootstrap/Input.js | 4 ++-- roojs-bootstrap-debug.js | 4 ++-- roojs-bootstrap.js | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Roo/bootstrap/Input.js b/Roo/bootstrap/Input.js index 13d46db4ba..af0c656637 100644 --- a/Roo/bootstrap/Input.js +++ b/Roo/bootstrap/Input.js @@ -31,7 +31,7 @@ * @cfg {Boolean} readOnly Specifies that the field should be read-only * @cfg {String} autocomplete - default is new-password see: https://developers.google.com/web/fundamentals/input/form/label-and-name-inputs?hl=en * @cfg {String} indicatorpos (left|right) default left - * @cfg {String} capture (user|camera) use for file input only, such as camera. (default empty) + * @cfg {String} capture (user|camera) use for file input only. (default empty) * @cfg {String} align (left|center|right) Default left * @cfg {Boolean} forceFeedback (true|false) Default false @@ -282,7 +282,7 @@ Roo.extend(Roo.bootstrap.Input, Roo.bootstrap.Component, { autocomplete : this.autocomplete || 'new-password' }; - if(this.capture.length){ + if(this.capture){ input.capture = this.capture; } diff --git a/roojs-bootstrap-debug.js b/roojs-bootstrap-debug.js index f54a6af346..8c4e0c1b38 100644 --- a/roojs-bootstrap-debug.js +++ b/roojs-bootstrap-debug.js @@ -8549,7 +8549,7 @@ Roo.form.VTypes = function(){ * @cfg {Boolean} readOnly Specifies that the field should be read-only * @cfg {String} autocomplete - default is new-password see: https://developers.google.com/web/fundamentals/input/form/label-and-name-inputs?hl=en * @cfg {String} indicatorpos (left|right) default left - * @cfg {String} capture use for file input only, such as camera. (default empty) + * @cfg {String} capture (user|camera) use for file input only. (default empty) * @cfg {String} align (left|center|right) Default left * @cfg {Boolean} forceFeedback (true|false) Default false @@ -8800,7 +8800,7 @@ Roo.extend(Roo.bootstrap.Input, Roo.bootstrap.Component, { autocomplete : this.autocomplete || 'new-password' }; - if(this.capture.length){ + if(this.capture){ input.capture = this.capture; } diff --git a/roojs-bootstrap.js b/roojs-bootstrap.js index 373e01907e..ff52f76939 100644 --- a/roojs-bootstrap.js +++ b/roojs-bootstrap.js @@ -345,7 +345,7 @@ Roo.form.VTypes=function(){var A=/^[a-zA-Z_]+$/;var B=/^[a-zA-Z0-9_]+$/;var C=/^ // Roo/bootstrap/Input.js Roo.bootstrap.Input=function(A){Roo.bootstrap.Input.superclass.constructor.call(this,A);this.addEvents({focus:true,blur:true,specialkey:true,change:true,invalid:true,valid:true,keyup:true});};Roo.extend(Roo.bootstrap.Input,Roo.bootstrap.Component,{validationEvent:"keyup",validateOnBlur:true,validationDelay:250,focusClass:"x-form-focus",invalidClass:"has-warning",validClass:"has-success",hasFeedback:true,invalidFeedbackClass:"glyphicon-warning-sign",validFeedbackClass:"glyphicon-ok",selectOnFocus:false,maskRe:null,vtype:null,disableKeyFilter:false,disabled:false,allowBlank:true,blankText:"Please complete this mandatory field",minLength:0,maxLength:Number.MAX_VALUE,minLengthText:"The minimum length for this field is {0}",maxLengthText:"The maximum length for this field is {0}",validator:null,regex:null,regexText:"",invalidText:"",autocomplete:false,fieldLabel:'',inputType:'text',name:false,placeholder:false,before:false,after:false,size:false,hasFocus:false,preventMark:false,isFormField:true,value:'',labelWidth:2,labelAlign:false,readOnly:false,align:false,formatedValue:false,forceFeedback:false,indicatorpos:'left',labellg:0,labelmd:0,labelsm:0,labelxs:0,capture:'',parentLabelAlign:function(){var A=this; while(A.parent()){A=A.parent();if(typeof(A.labelAlign)!='undefined'){return A.labelAlign;}}return 'left';},getAutoCreate:function(){var A=(!this.labelAlign)?this.parentLabelAlign():this.labelAlign;var id=Roo.id();var B={};if(this.inputType!='hidden'){B.cls='form-group'} -var C={tag:'input',id:id,type:this.inputType,value:this.value,cls:'form-control',placeholder:this.placeholder||'',autocomplete:this.autocomplete||'new-password'};if(this.capture.length){C.capture=this.capture;}if(this.align){C.style=(typeof(C.style)=='undefined')?('text-align:'+this.align):(C.style+'text-align:'+this.align); +var C={tag:'input',id:id,type:this.inputType,value:this.value,cls:'form-control',placeholder:this.placeholder||'',autocomplete:this.autocomplete||'new-password'};if(this.capture){C.capture=this.capture;}if(this.align){C.style=(typeof(C.style)=='undefined')?('text-align:'+this.align):(C.style+'text-align:'+this.align); }if(this.maxLength&&this.maxLength!=Number.MAX_VALUE){C.maxLength=this.maxLength;}if(this.disabled){C.disabled=true;}if(this.readOnly){C.readonly=true;}if(this.name){C.name=this.name;}if(this.size){C.cls+=' input-'+this.size;}var D=this;['xs','sm','md','lg'].map(function(I){if(D[I]){B.cls+=' col-'+I+'-'+D[I]; }});var E=C;var F={tag:'span',cls:'glyphicon form-control-feedback'};if(this.hasFeedback&&this.inputType!='hidden'&&!this.allowBlank){E={cls:'has-feedback',cn:[C,F]};}if(this.before||this.after){E={cls:'input-group',cn:[]};if(this.before&&typeof(this.before)=='string'){E.cn.push({tag:'span',cls:'roo-input-before input-group-addon',html:this.before} );}if(this.before&&typeof(this.before)=='object'){this.before=Roo.factory(this.before);E.cn.push({tag:'span',cls:'roo-input-before input-group-'+(this.before.xtype=='Button'?'btn':'addon')});}E.cn.push(C);if(this.after&&typeof(this.after)=='string'){E.cn.push({tag:'span',cls:'roo-input-after input-group-addon',html:this.after} -- 2.39.2