From ca464e484e53940c73cab36d45a2e4c6dd335f63 Mon Sep 17 00:00:00 2001 From: john Date: Thu, 18 Oct 2018 12:38:06 +0800 Subject: [PATCH] Roo/bootstrap/LayoutMasonry.js roojs-bootstrap.js roojs-bootstrap-debug.js --- Roo/bootstrap/LayoutMasonry.js | 2 +- roojs-bootstrap-debug.js | 20 +++++++------------- roojs-bootstrap.js | 6 +++--- 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/Roo/bootstrap/LayoutMasonry.js b/Roo/bootstrap/LayoutMasonry.js index 6e4058a331..7864971314 100644 --- a/Roo/bootstrap/LayoutMasonry.js +++ b/Roo/bootstrap/LayoutMasonry.js @@ -36,7 +36,7 @@ Roo.bootstrap.LayoutMasonry = function(config){ * @param {Roo.bootstrap.LayoutMasonry} this * @param {Roo.EventObject} e */ - "layout" : true, + "layout" : true }); }; diff --git a/roojs-bootstrap-debug.js b/roojs-bootstrap-debug.js index 4de1e32d93..ef33dcfffc 100644 --- a/roojs-bootstrap-debug.js +++ b/roojs-bootstrap-debug.js @@ -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) { diff --git a/roojs-bootstrap.js b/roojs-bootstrap.js index 135e897e96..0583df18da 100644 --- a/roojs-bootstrap.js +++ b/roojs-bootstrap.js @@ -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