sync
authorjohn <john@roojs.com>
Thu, 23 Aug 2018 05:31:36 +0000 (13:31 +0800)
committerjohn <john@roojs.com>
Thu, 23 Aug 2018 05:31:36 +0000 (13:31 +0800)
Roo/bootstrap/Table.js
roojs-bootstrap-debug.js
roojs-bootstrap.js

index 39fec72..c34f12d 100644 (file)
@@ -351,7 +351,9 @@ Roo.extend(Roo.bootstrap.Table, Roo.bootstrap.Component,  {
             }
         } 
         
-        this.maskEl = new Roo.LoadMask(this.el, { store : this.ds, msgCls: 'roo-el-mask-msg' });
+        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);
@@ -767,9 +769,6 @@ Roo.extend(Roo.bootstrap.Table, Roo.bootstrap.Component,  {
             e.on('mouseout', _this.onMouseout, _this);
         });
         this.fireEvent('rowsrendered', this);
-        //if(this.loadMask){
-        //    this.maskEl.hide();
-        //}
         
         this.autoSize();
     },
@@ -982,13 +981,7 @@ Roo.extend(Roo.bootstrap.Table, Roo.bootstrap.Component,  {
     
     onBeforeLoad : function()
     {
-        //Roo.log('ds onBeforeLoad');
-        
-        //this.clear();
         
-        //if(this.loadMask){
-        //    this.maskEl.show();
-        //}
     },
      /**
      * Remove all rows
index f4fc3e9..9fc8d4a 100644 (file)
@@ -6192,7 +6192,9 @@ Roo.extend(Roo.bootstrap.Table, Roo.bootstrap.Component,  {
             }
         } 
         
-        this.maskEl = new Roo.LoadMask(this.el, { store : this.ds, msgCls: 'roo-el-mask-msg' });
+        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);
@@ -6608,9 +6610,6 @@ Roo.extend(Roo.bootstrap.Table, Roo.bootstrap.Component,  {
             e.on('mouseout', _this.onMouseout, _this);
         });
         this.fireEvent('rowsrendered', this);
-        //if(this.loadMask){
-        //    this.maskEl.hide();
-        //}
         
         this.autoSize();
     },
@@ -6823,13 +6822,7 @@ Roo.extend(Roo.bootstrap.Table, Roo.bootstrap.Component,  {
     
     onBeforeLoad : function()
     {
-        //Roo.log('ds onBeforeLoad');
         
-        //this.clear();
-        
-        //if(this.loadMask){
-        //    this.maskEl.show();
-        //}
     },
      /**
      * Remove all rows
index 36ed631..c1c02df 100644 (file)
@@ -240,8 +240,8 @@ this.ds=this.store;this.ds.xmodule=this.xmodule||false;}if(this.footer&&this.sto
 }if(this.cellspacing){A.cellspacing=this.cellspacing;}if(this.frame){A.frame=this.frame;}if(this.rules){A.rules=this.rules;}if(this.sortable){A.sortable=this.sortable;}if(this.summary){A.summary=this.summary;}if(this.width){A.width=this.width;}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){A.cn.push(this.renderFooter());}}return {cn:[A]};},initEvents:function(){if(!this.store||!this.cm){return;}if(this.selModel){this.selModel.initEvents();
 }this.mainBody=this.el.select('tbody',true).first();this.mainHead=this.el.select('thead',true).first();var A=this;Roo.each(this.el.select('thead th.sortable',true).elements,function(e){e.on('click',A.sort,A);});this.mainBody.on("click",this.onClick,this);
-this.mainBody.on("dblclick",this.onDblClick,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');}}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);
+this.mainBody.on("dblclick",this.onDblClick,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);
 this.mainBody.on('scroll',this.onBodyScroll,this);this.cm.on("headerchange",this.onHeaderChange,this);this.cm.on("hiddenchange",this.onHiddenChange,this,arguments);},onContextMenu:function(e,t){this.processEvent("contextmenu",e);},processEvent:function(A,e){if(A!='touchstart'){this.fireEvent(A,e);
 }var t=e.getTarget();var B=Roo.get(t);if(!B){return;}if(B.findParent('tfoot',false,true)){return;}if(B.findParent('thead',false,true)){if(e.getTarget().nodeName.toLowerCase()!='th'){B=Roo.get(t).findParent('th',false,true);if(!B){Roo.log("failed to find th in thead?");
 Roo.log(e.getTarget());return;}}var C=B.dom.cellIndex;var D=A=='touchstart'?'click':A;this.fireEvent("header"+D,this,C,e);return;}if(e.getTarget().nodeName.toLowerCase()!='td'){B=Roo.get(t).findParent('td',false,true);if(!B){Roo.log("failed to find th in tbody?");