Roo/bootstrap/LayoutMasonry.js
authorjohn <john@roojs.com>
Thu, 18 Oct 2018 04:38:06 +0000 (12:38 +0800)
committerjohn <john@roojs.com>
Thu, 18 Oct 2018 04:38:06 +0000 (12:38 +0800)
roojs-bootstrap.js
roojs-bootstrap-debug.js

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

index 6e4058a..7864971 100644 (file)
@@ -36,7 +36,7 @@ Roo.bootstrap.LayoutMasonry = function(config){
          * @param {Roo.bootstrap.LayoutMasonry} this
          * @param {Roo.EventObject} e
          */
-        "layout" : true,
+        "layout" : true
     });
     
 };
index 4de1e32..ef33dcf 100644 (file)
@@ -30815,13 +30815,7 @@ Roo.bootstrap.LayoutMasonry = function(config){
          * @param {Roo.bootstrap.LayoutMasonry} this
          * @param {Roo.EventObject} e
          */
-        "layout" : true,
-        /**
-         * @event childrenrendered
-         * Fires when the children have been rendered..
-         * @param {Roo.bootstrap.Component} this
-         */
-        "childrenrendered" : true
+        "layout" : true
     });
     
 };
@@ -40485,7 +40479,10 @@ Roo.extend(Roo.bootstrap.MoneyField, Roo.bootstrap.ComboBox, {
      * @cfg {String} thousandsDelimiter Symbol of thousandsDelimiter
      */
     thousandsDelimiter : false,
-    
+    /**
+     * @cfg {Number} max_length Maximum input field length allowed (defaults to Number.MAX_VALUE)
+     */
+    max_length: false,
     
     inputlg : 9,
     inputmd : 9,
@@ -40519,11 +40516,8 @@ Roo.extend(Roo.bootstrap.MoneyField, Roo.bootstrap.ComboBox, {
             cls: 'hidden-number-input'
         };
         
-        if(
-            this.maxLength &&
-            Number.isInteger(this.maxLength * 1)
-        ) {
-            input.maxlength = this.maxLength; 
+        if(!this.max_length) {
+            input.maxlength = this.max_length; 
         }
         
         if (this.name) {
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];