Roo/bootstrap/Input.js
authorAlan Knowles <alan@roojs.com>
Wed, 9 May 2018 06:40:46 +0000 (14:40 +0800)
committerAlan Knowles <alan@roojs.com>
Wed, 9 May 2018 06:40:46 +0000 (14:40 +0800)
roojs-bootstrap.js
roojs-bootstrap-debug.js

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

index fdbbc9e..88123d0 100644 (file)
@@ -1020,7 +1020,7 @@ Roo.extend(Roo.bootstrap.Input, Roo.bootstrap.Component,  {
         
         if(this.indicator){
             var ar = this.el.select('label > span',true);
-            if (!ar) {
+            if (!ar.length) {
                 Roo.log("could not find label > span on element");
                 Roo.log(this);
                 return;
index 061b11e..761c874 100644 (file)
@@ -9366,7 +9366,7 @@ Roo.extend(Roo.bootstrap.Input, Roo.bootstrap.Component,  {
         
         if(this.indicator){
             var ar = this.el.select('label > span',true);
-            if (!ar) {
+            if (!ar.length) {
                 Roo.log("could not find label > span on element");
                 Roo.log(this);
                 return;
index f390ca5..f85da00 100644 (file)
@@ -375,7 +375,7 @@ if(this.getValue().length||this.forceFeedback){this.el.select('.form-control-fee
 if(this.inputEl().dom.selectionEnd>0){B=(this.inputEl().dom.selectionEnd-this.inputEl().dom.selectionStart-this.getValue().length==0)?true:false;}if(((A.getKey()==8||A.getKey()==46)&&this.getValue().length==1)){A.preventDefault();this.setValue('');return;
 }if(B&&A.getCharCode()>31&&!A.ctrlKey){A.preventDefault();var cc=String.fromCharCode(A.getCharCode());this.setValue(A.shiftKey?cc:cc.toLowerCase());}},adjustWidth:function(A,w){A=A.toLowerCase();if(typeof w=='number'&&Roo.isStrict&&!Roo.isSafari){if(Roo.isIE&&(A=='input'||A=='textarea')){if(A=='input'){return w+2;
 }if(A=='textarea'){return w-2;}}else if(Roo.isOpera){if(A=='input'){return w+2;}if(A=='textarea'){return w-2;}}}return w;},setFieldLabel:function(v){if(!this.rendered){return;}this.fieldLabel=v;if(this.indicator){var ar=this.el.select('label > span',true);
-if(!ar){Roo.log("could not find label > span on element");Roo.log(this);return;}this.el.select('label > span',true).first().dom.innerHTML=(v===null||v===undefined?'':v);return;}this.el.select('label',true).first().dom.innerHTML=(v===null||v===undefined?'':v);
+if(!ar.length){Roo.log("could not find label > span on element");Roo.log(this);return;}this.el.select('label > span',true).first().dom.innerHTML=(v===null||v===undefined?'':v);return;}this.el.select('label',true).first().dom.innerHTML=(v===null||v===undefined?'':v);
 }});
 // Roo/bootstrap/TextArea.js
 Roo.bootstrap.TextArea=function(A){Roo.bootstrap.TextArea.superclass.constructor.call(this,A);};Roo.extend(Roo.bootstrap.TextArea,Roo.bootstrap.Input,{cols:false,rows:5,readOnly:false,warp:'soft',resize:false,value:false,html:false,getAutoCreate:function(){var A=(!this.labelAlign)?this.parentLabelAlign():this.labelAlign;