Roo/bootstrap/LayoutMasonry.js
[roojs1] / roojs-bootstrap.js
index 135e897..0583df1 100644 (file)
@@ -1309,7 +1309,7 @@ return A;}this.markInvalid();return A;},markValid:function(){var A=this.el.selec
 var C=this.el.select('i.fa-star',true).first();if(B&&!C){this.el.select('.roo-date-split-field-label',true).createChild({tag:'i',cls:'text-danger fa fa-lg fa-star',tooltip:'This field is required',style:'margin-right:5px;'},B,true);}this.fireEvent('invalid',this,A);
 },clearInvalid:function(){var A=this.el.select('label',true).first();var B=this.el.select('i.fa-star',true).first();if(A&&B){B.remove();}this.fireEvent('valid',this);},getName:function(){return this.name;}});
 // Roo/bootstrap/LayoutMasonry.js
-Roo.bootstrap.LayoutMasonry=function(A){Roo.bootstrap.LayoutMasonry.superclass.constructor.call(this,A);this.bricks=[];Roo.bootstrap.LayoutMasonry.register(this);this.addEvents({"layout":true,"childrenrendered":true});};Roo.extend(Roo.bootstrap.LayoutMasonry,Roo.bootstrap.Component,{isLayoutInstant:false,boxWidth:450,boxHeight:0,padWidth:10,gutter:10,maxCols:0,isAutoInitial:true,containerWidth:0,isHorizontal:false,currentSize:null,tag:'div',cls:'',bricks:null,cols:1,_isLayoutInited:false,alternativePadWidth:50,selectedBrick:[],getAutoCreate:function(){var A=Roo.apply({}
+Roo.bootstrap.LayoutMasonry=function(A){Roo.bootstrap.LayoutMasonry.superclass.constructor.call(this,A);this.bricks=[];Roo.bootstrap.LayoutMasonry.register(this);this.addEvents({"layout":true});};Roo.extend(Roo.bootstrap.LayoutMasonry,Roo.bootstrap.Component,{isLayoutInstant:false,boxWidth:450,boxHeight:0,padWidth:10,gutter:10,maxCols:0,isAutoInitial:true,containerWidth:0,isHorizontal:false,currentSize:null,tag:'div',cls:'',bricks:null,cols:1,_isLayoutInited:false,alternativePadWidth:50,selectedBrick:[],getAutoCreate:function(){var A=Roo.apply({}
 ,Roo.bootstrap.LayoutMasonry.superclass.getAutoCreate.call(this));var A={tag:this.tag,cls:'blog-masonary-wrapper '+this.cls,cn:{cls:'mas-boxes masonary'}};return A;},getChildContainer:function(){if(this.boxesEl){return this.boxesEl;}this.boxesEl=this.el.select('.mas-boxes').first();
 return this.boxesEl;},initEvents:function(){var A=this;if(this.isAutoInitial){Roo.log('hook children rendered');this.on('childrenrendered',function(){Roo.log('children rendered');A.initial();},this);}},initial:function(){this.selectedBrick=[];this.currentSize=this.el.getBox(true);
 Roo.EventManager.onWindowResize(this.resize,this);if(!this.isAutoInitial){this.layout();return;}this.layout();return;},resize:function(){var cs=this.el.getBox(true);if(this.currentSize.width==cs.width&&this.currentSize.x==cs.x&&this.currentSize.height==cs.height&&this.currentSize.y==cs.y){Roo.log("no change in with or X or Y");
@@ -1661,8 +1661,8 @@ var B="";for(var i=1;i<v.length;i++){var c=v.charAt(i);if(!isNaN(c)){B+=c;if(thi
 },onKeyUp:function(e){var k=e.getKey();var c=e.getCharCode();if((String.fromCharCode(c)=='.'||String.fromCharCode(c)=='-')&&this.allowed.indexOf(String.fromCharCode(c))===-1){e.stopEvent();}if(this.allowed.indexOf(String.fromCharCode(c))===-1){e.stopEvent();
 }this.setValue(this.getValue());}});
 // Roo/bootstrap/MoneyField.js
-Roo.bootstrap.MoneyField=function(A){Roo.bootstrap.MoneyField.superclass.constructor.call(this,A);};Roo.extend(Roo.bootstrap.MoneyField,Roo.bootstrap.ComboBox,{allowDecimals:true,decimalSeparator:".",decimalPrecision:0,allowNegative:true,allowZero:true,minValue:Number.NEGATIVE_INFINITY,maxValue:Number.MAX_VALUE,minText:"The minimum value for this field is {0}",maxText:"The maximum value for this field is {0}",nanText:"{0} is not a valid number",castInt:true,defaultCurrency:false,thousandsDelimiter:false,inputlg:9,inputmd:9,inputsm:9,inputxs:6,store:false,getAutoCreate:function(){var A=this.labelAlign||this.parentLabelAlign();
-var id=Roo.id();var B={cls:'form-group',cn:[]};var C={tag:'input',id:id,cls:'form-control roo-money-amount-input',autocomplete:'new-password'};var D={tag:'input',type:'hidden',id:Roo.id(),cls:'hidden-number-input'};if(this.maxLength&&Number.isInteger(this.maxLength*1)){C.maxlength=this.maxLength;
+Roo.bootstrap.MoneyField=function(A){Roo.bootstrap.MoneyField.superclass.constructor.call(this,A);};Roo.extend(Roo.bootstrap.MoneyField,Roo.bootstrap.ComboBox,{allowDecimals:true,decimalSeparator:".",decimalPrecision:0,allowNegative:true,allowZero:true,minValue:Number.NEGATIVE_INFINITY,maxValue:Number.MAX_VALUE,minText:"The minimum value for this field is {0}",maxText:"The maximum value for this field is {0}",nanText:"{0} is not a valid number",castInt:true,defaultCurrency:false,thousandsDelimiter:false,max_length:false,inputlg:9,inputmd:9,inputsm:9,inputxs:6,store:false,getAutoCreate:function(){var A=this.labelAlign||this.parentLabelAlign();
+var id=Roo.id();var B={cls:'form-group',cn:[]};var C={tag:'input',id:id,cls:'form-control roo-money-amount-input',autocomplete:'new-password'};var D={tag:'input',type:'hidden',id:Roo.id(),cls:'hidden-number-input'};if(!this.max_length){C.maxlength=this.max_length;
 }if(this.name){D.name=this.name;}if(this.disabled){C.disabled=true;}var E=12-this.inputlg;var F=12-this.inputmd;var G=12-this.inputsm;var H=12-this.inputxs;var I={tag:'div',cls:'row roo-money-field',cn:[{tag:'div',cls:'roo-money-currency column col-lg-'+E+' col-md-'+F+' col-sm-'+G+' col-xs-'+H,cn:[{tag:'div',cls:'roo-select2-container input-group',cn:[{tag:'input',cls:'form-control roo-money-currency-input',autocomplete:'new-password',readOnly:1,name:this.currencyName}
 ,{tag:'span',cls:'input-group-addon',cn:[{tag:'span',cls:'caret'}]}]}]},{tag:'div',cls:'roo-money-amount column col-lg-'+this.inputlg+' col-md-'+this.inputmd+' col-sm-'+this.inputsm+' col-xs-'+this.inputxs,cn:[{tag:'div',cls:this.hasFeedback?'has-feedback':'',cn:[C]}
 ]}]};if(this.fieldLabel.length){var J={tag:'i',tooltip:'This field is required'};var K={tag:'label','for':id,cls:'control-label',cn:[]};var L={tag:'span',html:this.fieldLabel};J.cls='roo-required-indicator text-danger fa fa-lg fa-star left-indicator';K.cn=[J,L];