roojs-bootstrap.js wip_leon_T7474_New_Customer_Portal_190_Validation
authorleon <leon@roojs.com>
Tue, 6 Dec 2022 09:00:19 +0000 (17:00 +0800)
committerleon <leon@roojs.com>
Tue, 6 Dec 2022 09:00:19 +0000 (17:00 +0800)
roojs-bootstrap-debug.js

roojs-bootstrap-debug.js
roojs-bootstrap.js

index 8fb670c..c639897 100644 (file)
@@ -9157,7 +9157,7 @@ Currently the Table  uses multiple headers to try and handle XL / Medium etc...
  *                also adds table-responsive (see bootstrap docs for details)
  * @cfg {Boolean} loadMask (true|false) default false
  * @cfg {Boolean} footerShow (true|false) generate tfoot, default true
- * @cfg {Boolean} footerColumns (true|false) generate tfoot with columns, default false
+ * @cfg {Boolean} footerRow (true|false) generate tfoot with columns of values, default false
  * @cfg {Boolean} headerShow (true|false) generate thead, default true
  * @cfg {Boolean} rowSelection (true|false) default false
  * @cfg {Boolean} cellSelection (true|false) default false
@@ -9342,7 +9342,7 @@ Roo.extend(Roo.bootstrap.Table, Roo.bootstrap.Component,  {
     store : false,
     loadMask : false,
     footerShow : true,
-    footerColumns : false,
+    footerRow : false,
     headerShow : true,
     enableColumnResize: true,
     disableAutoSize: false,
@@ -9418,7 +9418,7 @@ Roo.extend(Roo.bootstrap.Table, Roo.bootstrap.Component,  {
             
             cfg.cn.push(this.renderBody());
             
-            if(this.footerShow || this.footerColumns){
+            if(this.footerShow || this.footerRow){
                 cfg.cn.push(this.renderFooter());
             }
 
@@ -10028,7 +10028,7 @@ Roo.extend(Roo.bootstrap.Table, Roo.bootstrap.Component,  {
         
         var tfoot = this.el.select('tfoot', true).first();
         
-        if(this.footerShow && !this.footerColumns && this.auto_hide_footer && this.mainFoot){
+        if(this.footerShow && !this.footerRow && this.auto_hide_footer && this.mainFoot){
             
             this.mainFoot.setVisibilityMode(Roo.Element.DISPLAY).hide();
             
@@ -10039,7 +10039,7 @@ Roo.extend(Roo.bootstrap.Table, Roo.bootstrap.Component,  {
             }
         }
 
-        if(!this.footerShow && this.footerColumns) {
+        if(!this.footerShow && this.footerRow) {
 
             var tr = {
                 tag : 'tr',
index eaf1200..d8f4440 100644 (file)
@@ -395,10 +395,10 @@ Roo.bootstrap.Table=function(A){Roo.bootstrap.Table.superclass.constructor.call(
 this.headerShow=(typeof(A.thead)!='undefined')?A.thead:this.headerShow;this.footerShow=(typeof(A.tfoot)!='undefined')?A.tfoot:this.footerShow;this.view=this;this.sm=this.sm||{xtype:'RowSelectionModel'};if(this.sm){this.sm.grid=this;this.selModel=Roo.factory(this.sm,Roo.grid);
 this.sm=this.selModel;this.sm.xmodule=this.xmodule||false;}if(this.cm&&typeof(this.cm.config)=='undefined'){this.colModel=new Roo.grid.ColumnModel(this.cm);this.cm=this.colModel;this.cm.xmodule=this.xmodule||false;}if(this.store){this.store=Roo.factory(this.store,Roo.data);
 this.ds=this.store;this.ds.xmodule=this.xmodule||false;}if(this.footer&&this.store){this.footer.dataSource=this.ds;this.footer=Roo.factory(this.footer);}this.addEvents({"cellclick":true,"celldblclick":true,"rowclick":true,"rowdblclick":true,"mouseover":true,"mouseout":true,'rowclass':true,'rowsrendered':true,"contextmenu":true,"rowcontextmenu":true,"cellcontextmenu":true,"headercontextmenu":true,"mousedown":true}
-);};Roo.extend(Roo.bootstrap.Table,Roo.bootstrap.Component,{cls:false,empty_results:'',striped:false,scrollBody:false,bordered:false,hover:false,condensed:false,responsive:false,sm:false,cm:false,store:false,loadMask:false,footerShow:true,footerColumns:false,headerShow:true,enableColumnResize:true,disableAutoSize:false,rowSelection:false,cellSelection:false,layout:false,minColumnWidth:50,bodyEl:false,headEl:false,resizeProxy:false,container:false,lazyLoad:false,CSS:Roo.util.CSS,auto_hide_footer:false,view:false,getAutoCreate:function(){var A=Roo.apply({}
+);};Roo.extend(Roo.bootstrap.Table,Roo.bootstrap.Component,{cls:false,empty_results:'',striped:false,scrollBody:false,bordered:false,hover:false,condensed:false,responsive:false,sm:false,cm:false,store:false,loadMask:false,footerShow:true,footerRow:false,headerShow:true,enableColumnResize:true,disableAutoSize:false,rowSelection:false,cellSelection:false,layout:false,minColumnWidth:50,bodyEl:false,headEl:false,resizeProxy:false,container:false,lazyLoad:false,CSS:Roo.util.CSS,auto_hide_footer:false,view:false,getAutoCreate:function(){var A=Roo.apply({}
 ,Roo.bootstrap.Table.superclass.getAutoCreate.call(this));A={tag:'table',cls:'table',cn:[]};if(this.scrollBody){A.cls+=' table-body-fixed';}if(this.striped){A.cls+=' table-striped';}if(this.hover){A.cls+=' table-hover';}if(this.bordered){A.cls+=' table-bordered';
 }if(this.condensed){A.cls+=' table-condensed';}if(this.responsive){A.cls+=' table-responsive';}if(this.cls){A.cls+=' '+this.cls;}if(this.layout){A.style=(typeof(A.style)=='undefined')?('table-layout:'+this.layout+';'):(A.style+('table-layout:'+this.layout+';'));
-}if(this.store||this.cm){if(this.headerShow){A.cn.push(this.renderHeader());}A.cn.push(this.renderBody());if(this.footerShow||this.footerColumns){A.cn.push(this.renderFooter());}}return {cn:[A]};},initEvents:function(){if(!this.store||!this.cm){return;}if(this.selModel){this.selModel.initEvents();
+}if(this.store||this.cm){if(this.headerShow){A.cn.push(this.renderHeader());}A.cn.push(this.renderBody());if(this.footerShow||this.footerRow){A.cn.push(this.renderFooter());}}return {cn:[A]};},initEvents:function(){if(!this.store||!this.cm){return;}if(this.selModel){this.selModel.initEvents();
 }this.bodyEl=this.el.select('tbody',true).first();this.headEl=this.el.select('thead',true).first();this.mainFoot=this.el.select('tfoot',true).first();Roo.each(this.el.select('thead th.sortable',true).elements,function(e){e.on('click',this.sort,this);},this);
 if(this.footer){this.footer.parentId=this.id;this.footer.onRender(this.el.select('tfoot tr td').first(),null);if(this.lazyLoad){this.el.select('tfoot tr td').first().addClass('hide');}}if(this.loadMask){this.maskEl=new Roo.LoadMask(this.el,{store:this.ds,msgCls:'roo-el-mask-msg'}
 );}this.store.on('load',this.onLoad,this);this.store.on('beforeload',this.onBeforeLoad,this);this.store.on('update',this.onUpdate,this);this.store.on('add',this.onAdd,this);this.store.on("clear",this.clear,this);this.el.on("contextmenu",this.onContextMenu,this);
@@ -426,8 +426,8 @@ var c={tag:'th',cls:'x-hcol-'+i,style:'',html:cm.getColumnHeader(i)};var D=cm.ge
 });}c.html+=' <span class="x-grid-split x-grid-split-'+i+'"></span>';A.cn.push(c)}return A;},renderBody:function(){var A={tag:'tbody',cn:[{tag:'tr',cn:[{tag:'td',colspan:this.cm.getColumnCount()}]}]};return A;},renderFooter:function(){var A={tag:'tfoot',cn:[{tag:'tr',cn:[{tag:'td',colspan:this.cm.getColumnCount()}
 ]}]};return A;},onLoad:function(){this.clear();var A=this;var cm=this.cm;var ds=this.store;Roo.each(this.el.select('thead th.sortable',true).elements,function(e){e.select('i',true).removeClass(['fa-arrow-up','fa-arrow-down']);if(A.store.sortInfo){if(e.hasClass('sortable')&&e.attr('sort')==A.store.sortInfo.field&&A.store.sortInfo.direction.toUpperCase()=='ASC'){e.select('i',true).addClass(['fa-arrow-up']);
 }if(e.hasClass('sortable')&&e.attr('sort')==A.store.sortInfo.field&&A.store.sortInfo.direction.toUpperCase()=='DESC'){e.select('i',true).addClass(['fa-arrow-down']);}}});var B=this.bodyEl;if(ds.getCount()>0){ds.data.each(function(d,G){var H=this.renderRow(cm,ds,G);
-B.createChild(H);var I=this;if(H.cellObjects.length){Roo.each(H.cellObjects,function(r){I.renderCellObject(r);})}},this);}else if(this.empty_results.length){this.el.mask(this.empty_results,'no-spinner');}var C=this.el.select('tfoot',true).first();if(this.footerShow&&!this.footerColumns&&this.auto_hide_footer&&this.mainFoot){this.mainFoot.setVisibilityMode(Roo.Element.DISPLAY).hide();
-var D=this.ds.getTotalCount();if(this.footer.pageSize<D){this.mainFoot.show();}}if(!this.footerShow&&this.footerColumns){var tr={tag:'tr',cn:[]};for(var i=0,E=cm.getColumnCount();i<E;i++){var F=typeof(cm.config[i].footer)=="function"?cm.config[i].footer(ds,cm.config[i]):cm.config[i].footer;
+B.createChild(H);var I=this;if(H.cellObjects.length){Roo.each(H.cellObjects,function(r){I.renderCellObject(r);})}},this);}else if(this.empty_results.length){this.el.mask(this.empty_results,'no-spinner');}var C=this.el.select('tfoot',true).first();if(this.footerShow&&!this.footerRow&&this.auto_hide_footer&&this.mainFoot){this.mainFoot.setVisibilityMode(Roo.Element.DISPLAY).hide();
+var D=this.ds.getTotalCount();if(this.footer.pageSize<D){this.mainFoot.show();}}if(!this.footerShow&&this.footerRow){var tr={tag:'tr',cn:[]};for(var i=0,E=cm.getColumnCount();i<E;i++){var F=typeof(cm.config[i].footer)=="function"?cm.config[i].footer(ds,cm.config[i]):cm.config[i].footer;
 var td={tag:'td',cls:' x-fcol-'+i,html:F};tr.cn.push(td);}C.dom.innerHTML='';C.createChild(tr);}Roo.each(this.el.select('tbody td',true).elements,function(e){e.on('mouseover',A.onMouseover,A);});Roo.each(this.el.select('tbody td',true).elements,function(e){e.on('mouseout',A.onMouseout,A);
 });this.fireEvent('rowsrendered',this);this.autoSize();this.initCSS();},onUpdate:function(ds,A){this.refreshRow(A);this.autoSize();},onRemove:function(ds,A,B,C){if(C!==true){this.fireEvent("beforerowremoved",this,B,A);}var bt=this.bodyEl.dom;var D=this.el.select('tbody > tr',true).elements;
 if(typeof(D[B])!='undefined'){bt.removeChild(D[B].dom);}if(C!==true){this.fireEvent("rowremoved",this,B,A);}},onAdd:function(ds,A,B){var bt=this.bodyEl.dom;for(var i=0;i<A.length;i++){this.insertRow(this.store,B+i,false);return;}},refreshRow:function(A){var ds=this.store,B;