Merge branch 'master' of http://git.roojs.com/roojs1
authorbenny <benny@roojs.com>
Fri, 20 Jul 2018 07:06:45 +0000 (15:06 +0800)
committerbenny <benny@roojs.com>
Fri, 20 Jul 2018 07:06:45 +0000 (15:06 +0800)
Roo/bootstrap/Input.js
Roo/bootstrap/RadioSet.js
Roo/bootstrap/Table.js
roojs-bootstrap-debug.js
roojs-bootstrap.js

index 8562922..7580362 100644 (file)
@@ -578,7 +578,6 @@ Roo.extend(Roo.bootstrap.Input, Roo.bootstrap.Component,  {
         
         if(this.indicator){
             this.indicator.addClass('invisible');
-            
         }
  
         // reference to original value for reset
index 87a9d9e..45b42ec 100644 (file)
@@ -175,7 +175,11 @@ Roo.extend(Roo.bootstrap.RadioSet, Roo.bootstrap.Input,  {
         this.itemsEl = this.el.select('.roo-radio-set-items', true).first();
         this.itemsEl.setVisibilityMode(Roo.Element.DISPLAY);
         
-        this.indicatorEl().addClass('invisible');
+        this.indicator = this.indicatorEl();
+        
+        if(this.indicator){
+            this.indicator.addClass('invisible');
+        }
         
         this.originalValue = this.getValue();
         
index 1fffa94..69b4213 100644 (file)
@@ -363,6 +363,8 @@ Roo.extend(Roo.bootstrap.Table, Roo.bootstrap.Component,  {
         
         this.cm.on("headerchange", this.onHeaderChange, this);
         
+        this.cm.on("hiddenchange", this.onHiddenChange, this);
+        
     },
     
     onContextMenu : function(e, t)
@@ -664,6 +666,10 @@ Roo.extend(Roo.bootstrap.Table, Roo.bootstrap.Component,  {
 
             });
             
+            if(config.hidden){
+                c.cls += ' hidden';
+            }
+            
             header.cn.push(c)
         }
         
@@ -962,6 +968,10 @@ Roo.extend(Roo.bootstrap.Table, Roo.bootstrap.Component,  {
                 td.cls += ' col-' + size + '-' + config[size];
 
             });
+            
+            if(config.hidden){
+                td.cls += ' hidden';
+            }
              
             row.cn.push(td);
            
@@ -1134,6 +1144,12 @@ Roo.extend(Roo.bootstrap.Table, Roo.bootstrap.Component,  {
         
         this.mainHead.remove();
         this.mainHead = table.createChild(header, this.mainBody, false);
+    },
+    
+    onHiddenChange : function()
+    {
+        this.onHeaderChange();
+        this.onLoad();
     }
     
 });
index e6945af..3f2f0f2 100644 (file)
@@ -6171,6 +6171,8 @@ Roo.extend(Roo.bootstrap.Table, Roo.bootstrap.Component,  {
         
         this.cm.on("headerchange", this.onHeaderChange, this);
         
+        this.cm.on("hiddenchange", this.onHiddenChange, this);
+        
     },
     
     onContextMenu : function(e, t)
@@ -6472,6 +6474,10 @@ Roo.extend(Roo.bootstrap.Table, Roo.bootstrap.Component,  {
 
             });
             
+            if(config.hidden){
+                c.cls += ' hidden';
+            }
+            
             header.cn.push(c)
         }
         
@@ -6770,6 +6776,10 @@ Roo.extend(Roo.bootstrap.Table, Roo.bootstrap.Component,  {
                 td.cls += ' col-' + size + '-' + config[size];
 
             });
+            
+            if(config.hidden){
+                td.cls += ' hidden';
+            }
              
             row.cn.push(td);
            
@@ -6942,6 +6952,12 @@ Roo.extend(Roo.bootstrap.Table, Roo.bootstrap.Component,  {
         
         this.mainHead.remove();
         this.mainHead = table.createChild(header, this.mainBody, false);
+    },
+    
+    onHiddenChange : function()
+    {
+        this.onHeaderChange();
+        this.onLoad();
     }
     
 });
@@ -9042,7 +9058,6 @@ Roo.extend(Roo.bootstrap.Input, Roo.bootstrap.Component,  {
         
         if(this.indicator){
             this.indicator.addClass('invisible');
-            
         }
  
         // reference to original value for reset
@@ -33713,7 +33728,11 @@ Roo.extend(Roo.bootstrap.RadioSet, Roo.bootstrap.Input,  {
         this.itemsEl = this.el.select('.roo-radio-set-items', true).first();
         this.itemsEl.setVisibilityMode(Roo.Element.DISPLAY);
         
-        this.indicatorEl().addClass('invisible');
+        this.indicator = this.indicatorEl();
+        
+        if(this.indicator){
+            this.indicator.addClass('invisible');
+        }
         
         this.originalValue = this.getValue();
         
index 54bc4fa..e42f694 100644 (file)
@@ -239,40 +239,41 @@ this.ds=this.store;this.ds.xmodule=this.xmodule||false;}if(this.footer&&this.sto
 }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('scroll',this.onBodyScroll,this);this.cm.on("headerchange",this.onHeaderChange,this);},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?");Roo.log(e.getTarget());
-return;}}var E=B.findParent('tr',false,true);var C=B.dom.cellIndex;var F=E.dom.rowIndex-1;if(E!==false){this.fireEvent("row"+A,this,F,e);if(B!==false){this.fireEvent("cell"+A,this,F,C,e);}}},onMouseover:function(e,el){var A=Roo.get(el);if(!A){return;}if(e.getTarget().nodeName.toLowerCase()!='td'){A=A.findParent('td',false,true);
-}var B=A.findParent('tr',false,true);var C=A.dom.cellIndex;var D=B.dom.rowIndex-1;this.fireEvent('mouseover',this,A,D,C,e);},onMouseout:function(e,el){var A=Roo.get(el);if(!A){return;}if(e.getTarget().nodeName.toLowerCase()!='td'){A=A.findParent('td',false,true);
-}var B=A.findParent('tr',false,true);var C=A.dom.cellIndex;var D=B.dom.rowIndex-1;this.fireEvent('mouseout',this,A,D,C,e);},onClick:function(e,el){var A=Roo.get(el);if(!A||(!this.cellSelection&&!this.rowSelection)){return;}if(e.getTarget().nodeName.toLowerCase()!='td'){A=A.findParent('td',false,true);
-}if(!A||typeof(A)=='undefined'){return;}var B=A.findParent('tr',false,true);if(!B||typeof(B)=='undefined'){return;}var C=A.dom.cellIndex;var D=this.getRowIndex(B);if(this.cellSelection){this.fireEvent('cellclick',this,A,D,C,e);}if(this.rowSelection){this.fireEvent('rowclick',this,B,D,e);
-}},onDblClick:function(e,el){var A=Roo.get(el);if(!A||(!this.cellSelection&&!this.rowSelection)){return;}if(e.getTarget().nodeName.toLowerCase()!='td'){A=A.findParent('td',false,true);}if(!A||typeof(A)=='undefined'){return;}var B=A.findParent('tr',false,true);
-if(!B||typeof(B)=='undefined'){return;}var C=A.dom.cellIndex;var D=this.getRowIndex(B);if(this.cellSelection){this.fireEvent('celldblclick',this,A,D,C,e);}if(this.rowSelection){this.fireEvent('rowdblclick',this,B,D,e);}},sort:function(e,el){var A=Roo.get(el);
-if(!A.hasClass('sortable')){return;}var B=A.attr('sort');var C='ASC';if(A.select('i',true).first().hasClass('glyphicon-arrow-up')){C='DESC';}this.store.sortInfo={field:B,direction:C};if(this.footer){Roo.log("calling footer first");this.footer.onClick('first');
-}else{this.store.load({params:{start:0}});}},renderHeader:function(){var A={tag:'thead',cn:[]};var cm=this.cm;this.totalWidth=0;for(var i=0,B=cm.getColumnCount();i<B;i++){var C=cm.config[i];var c={tag:'th',style:'',html:cm.getColumnHeader(i)};var hh='';if(typeof(C.sortable)!='undefined'&&C.sortable){c.cls='sortable';
-c.html='<i class="glyphicon"></i>'+c.html;}if(typeof(C.lgHeader)!='undefined'){hh+='<span class="hidden-xs hidden-sm hidden-md">'+C.lgHeader+'</span>';}if(typeof(C.mdHeader)!='undefined'){hh+='<span class="hidden-xs hidden-sm hidden-lg">'+C.mdHeader+'</span>';
-}if(typeof(C.smHeader)!='undefined'){hh+='<span class="hidden-xs hidden-md hidden-lg">'+C.smHeader+'</span>';}if(typeof(C.xsHeader)!='undefined'){hh+='<span class="hidden-sm hidden-md hidden-lg">'+C.xsHeader+'</span>';}if(hh.length){c.html=hh;}if(typeof(C.tooltip)!='undefined'){c.tooltip=C.tooltip;
-}if(typeof(C.colspan)!='undefined'){c.colspan=C.colspan;}if(typeof(C.hidden)!='undefined'&&C.hidden){c.style+=' display:none;';}if(typeof(C.dataIndex)!='undefined'){c.sort=C.dataIndex;}if(typeof(C.align)!='undefined'&&C.align.length){c.style+=' text-align:'+C.align+';';
-}if(typeof(C.width)!='undefined'){c.style+=' width:'+C.width+'px;';this.totalWidth+=C.width;}else{this.totalWidth+=100;}if(typeof(C.cls)!='undefined'){c.cls=(typeof(c.cls)=='undefined')?C.cls:(c.cls+' '+C.cls);}['xs','sm','md','lg'].map(function(D){if(typeof(C[D])=='undefined'){return;
-}if(!C[D]){c.cls+=' hidden-'+D;return;}c.cls+=' col-'+D+'-'+C[D];});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(['glyphicon-arrow-up','glyphicon-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(['glyphicon-arrow-up']);
-}if(e.hasClass('sortable')&&e.attr('sort')==A.store.sortInfo.field&&A.store.sortInfo.direction.toUpperCase()=='DESC'){e.select('i',true).addClass(['glyphicon-arrow-down']);}}});var B=this.mainBody;if(ds.getCount()>0){ds.data.each(function(d,C){var D=this.renderRow(cm,ds,C);
-B.createChild(D);var E=this;if(D.cellObjects.length){Roo.each(D.cellObjects,function(r){E.renderCellObject(r);})}},this);}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();},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.mainBody.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.mainBody.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;
-if(typeof A=='number'){B=A;A=ds.getAt(B);}else{B=ds.indexOf(A);}this.insertRow(ds,B,true);this.autoSize();this.onRemove(ds,A,B+1,true);this.autoSize();this.fireEvent("rowupdated",this,B,A);},insertRow:function(dm,A,B){if(!B){this.fireEvent("beforerowsinserted",this,A);
-}var C=this.renderRow(this.cm,this.store,A);var e=this.mainBody.createChild(C,this.getRowDom(A));var D=this;if(C.cellObjects.length){Roo.each(C.cellObjects,function(r){D.renderCellObject(r);})}if(!B){this.fireEvent("rowsinserted",this,A);}},getRowDom:function(A){var B=this.el.select('tbody > tr',true).elements;
-return (typeof(B[A])=='undefined')?false:B[A];},renderRow:function(cm,ds,A){var d=ds.getAt(A);var B={tag:'tr',cn:[]};var C=[];for(var i=0,D=cm.getColumnCount();i<D;i++){var E=cm.config[i];var F=cm.getRenderer(i);var G='';var id=false;if(typeof(F)!=='undefined'){G=F(d.data[cm.getDataIndex(i)],false,d);
-}if(typeof(G)==='object'){id=Roo.id();C.push({container:id,cfg:G})}var H={record:d,rowIndex:A,colIndex:i,rowClass:''};this.fireEvent('rowclass',this,H);var td={tag:'td',cls:H.rowClass,style:'',html:(typeof(G)==='object')?'':G};if(id){td.id=id;}if(typeof(E.colspan)!='undefined'){td.colspan=E.colspan;
-}if(typeof(E.hidden)!='undefined'&&E.hidden){td.style+=' display:none;';}if(typeof(E.align)!='undefined'&&E.align.length){td.style+=' text-align:'+E.align+';';}if(typeof(E.width)!='undefined'){td.style+=' width:'+E.width+'px;';}if(typeof(E.cursor)!='undefined'){td.style+=' cursor:'+E.cursor+';';
-}if(typeof(E.cls)!='undefined'){td.cls=(typeof(td.cls)=='undefined')?E.cls:(td.cls+' '+E.cls);}['xs','sm','md','lg'].map(function(I){if(typeof(E[I])=='undefined'){return;}if(!E[I]){td.cls+=' hidden-'+I;return;}td.cls+=' col-'+I+'-'+E[I];});B.cn.push(td);}
-B.cellObjects=C;return B;},onBeforeLoad:function(){},clear:function(){this.el.select('tbody',true).first().dom.innerHTML='';},setRowVisibility:function(A,B){var bt=this.mainBody.dom;var C=this.el.select('tbody > tr',true).elements;if(typeof(C[A])=='undefined'){return;
-}C[A].dom.style.display=B?'':'none';},getSelectionModel:function(){if(!this.selModel){this.selModel=new Roo.bootstrap.Table.RowSelectionModel({grid:this});}return this.selModel;},renderCellObject:function(r){var A=this;r.cfg.parentId=(typeof(r.container)=='string')?r.container:r.container.id;
-var t=r.cfg.render(r.container);if(r.cfg.cn){Roo.each(r.cfg.cn,function(c){var B={container:t.getChildContainer(),cfg:c};A.renderCellObject(B);})}},getRowIndex:function(A){var B=-1;Roo.each(this.el.select('tbody > tr',true).elements,function(el,C){if(el!=A){return;
-}B=C;});return B;},getGridEl:function(){return this.el;},autoSize:function(){var A=Roo.get(this.el.dom);var B=this.getGridEl().select('thead',true).first();var C=this.getGridEl().select('tbody',true).first();var D=this.getGridEl().select('tfoot',true).first();
-var cw=A.getWidth();if(C){C.setSize(A.getWidth(),A.getHeight()-((B?B.getHeight():0)+(D?D.getHeight():0)));var E=(C.dom.offsetWidth-C.dom.clientWidth);cw-=E;}cw=Math.max(cw,this.totalWidth);this.getGridEl().select('tr',true).setWidth(cw);return;},onBodyScroll:function(){if(this.mainHead){this.mainHead.setStyle({'position':'relative','left':(-1*this.mainBody.dom.scrollLeft)+'px'}
-);}if(this.lazyLoad){var A=this.mainBody.dom.scrollHeight;var B=Math.ceil(this.mainBody.getScroll().top);var C=this.mainBody.getHeight();if(A-C==B){var D=this.ds.getTotalCount();if(this.footer.cursor+this.footer.pageSize<D){this.footer.ds.load({params:{start:this.footer.cursor+this.footer.pageSize,limit:this.footer.pageSize}
-,add:true});}}}},onHeaderChange:function(){var A=this.renderHeader();var B=this.el.select('table',true).first();this.mainHead.remove();this.mainHead=B.createChild(A,this.mainBody,false);}});
+this.mainBody.on('scroll',this.onBodyScroll,this);this.cm.on("headerchange",this.onHeaderChange,this);this.cm.on("hiddenchange",this.onHiddenChange,this);},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?");
+Roo.log(e.getTarget());return;}}var E=B.findParent('tr',false,true);var C=B.dom.cellIndex;var F=E.dom.rowIndex-1;if(E!==false){this.fireEvent("row"+A,this,F,e);if(B!==false){this.fireEvent("cell"+A,this,F,C,e);}}},onMouseover:function(e,el){var A=Roo.get(el);
+if(!A){return;}if(e.getTarget().nodeName.toLowerCase()!='td'){A=A.findParent('td',false,true);}var B=A.findParent('tr',false,true);var C=A.dom.cellIndex;var D=B.dom.rowIndex-1;this.fireEvent('mouseover',this,A,D,C,e);},onMouseout:function(e,el){var A=Roo.get(el);
+if(!A){return;}if(e.getTarget().nodeName.toLowerCase()!='td'){A=A.findParent('td',false,true);}var B=A.findParent('tr',false,true);var C=A.dom.cellIndex;var D=B.dom.rowIndex-1;this.fireEvent('mouseout',this,A,D,C,e);},onClick:function(e,el){var A=Roo.get(el);
+if(!A||(!this.cellSelection&&!this.rowSelection)){return;}if(e.getTarget().nodeName.toLowerCase()!='td'){A=A.findParent('td',false,true);}if(!A||typeof(A)=='undefined'){return;}var B=A.findParent('tr',false,true);if(!B||typeof(B)=='undefined'){return;}var C=A.dom.cellIndex;
+var D=this.getRowIndex(B);if(this.cellSelection){this.fireEvent('cellclick',this,A,D,C,e);}if(this.rowSelection){this.fireEvent('rowclick',this,B,D,e);}},onDblClick:function(e,el){var A=Roo.get(el);if(!A||(!this.cellSelection&&!this.rowSelection)){return;
+}if(e.getTarget().nodeName.toLowerCase()!='td'){A=A.findParent('td',false,true);}if(!A||typeof(A)=='undefined'){return;}var B=A.findParent('tr',false,true);if(!B||typeof(B)=='undefined'){return;}var C=A.dom.cellIndex;var D=this.getRowIndex(B);if(this.cellSelection){this.fireEvent('celldblclick',this,A,D,C,e);
+}if(this.rowSelection){this.fireEvent('rowdblclick',this,B,D,e);}},sort:function(e,el){var A=Roo.get(el);if(!A.hasClass('sortable')){return;}var B=A.attr('sort');var C='ASC';if(A.select('i',true).first().hasClass('glyphicon-arrow-up')){C='DESC';}this.store.sortInfo={field:B,direction:C}
+;if(this.footer){Roo.log("calling footer first");this.footer.onClick('first');}else{this.store.load({params:{start:0}});}},renderHeader:function(){var A={tag:'thead',cn:[]};var cm=this.cm;this.totalWidth=0;for(var i=0,B=cm.getColumnCount();i<B;i++){var C=cm.config[i];
+var c={tag:'th',style:'',html:cm.getColumnHeader(i)};var hh='';if(typeof(C.sortable)!='undefined'&&C.sortable){c.cls='sortable';c.html='<i class="glyphicon"></i>'+c.html;}if(typeof(C.lgHeader)!='undefined'){hh+='<span class="hidden-xs hidden-sm hidden-md">'+C.lgHeader+'</span>';
+}if(typeof(C.mdHeader)!='undefined'){hh+='<span class="hidden-xs hidden-sm hidden-lg">'+C.mdHeader+'</span>';}if(typeof(C.smHeader)!='undefined'){hh+='<span class="hidden-xs hidden-md hidden-lg">'+C.smHeader+'</span>';}if(typeof(C.xsHeader)!='undefined'){hh+='<span class="hidden-sm hidden-md hidden-lg">'+C.xsHeader+'</span>';
+}if(hh.length){c.html=hh;}if(typeof(C.tooltip)!='undefined'){c.tooltip=C.tooltip;}if(typeof(C.colspan)!='undefined'){c.colspan=C.colspan;}if(typeof(C.hidden)!='undefined'&&C.hidden){c.style+=' display:none;';}if(typeof(C.dataIndex)!='undefined'){c.sort=C.dataIndex;
+}if(typeof(C.align)!='undefined'&&C.align.length){c.style+=' text-align:'+C.align+';';}if(typeof(C.width)!='undefined'){c.style+=' width:'+C.width+'px;';this.totalWidth+=C.width;}else{this.totalWidth+=100;}if(typeof(C.cls)!='undefined'){c.cls=(typeof(c.cls)=='undefined')?C.cls:(c.cls+' '+C.cls);
+}['xs','sm','md','lg'].map(function(D){if(typeof(C[D])=='undefined'){return;}if(!C[D]){c.cls+=' hidden-'+D;return;}c.cls+=' col-'+D+'-'+C[D];});if(C.hidden){c.cls+=' hidden';}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(['glyphicon-arrow-up','glyphicon-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(['glyphicon-arrow-up']);}if(e.hasClass('sortable')&&e.attr('sort')==A.store.sortInfo.field&&A.store.sortInfo.direction.toUpperCase()=='DESC'){e.select('i',true).addClass(['glyphicon-arrow-down']);
+}}});var B=this.mainBody;if(ds.getCount()>0){ds.data.each(function(d,C){var D=this.renderRow(cm,ds,C);B.createChild(D);var E=this;if(D.cellObjects.length){Roo.each(D.cellObjects,function(r){E.renderCellObject(r);})}},this);}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();},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.mainBody.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.mainBody.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;if(typeof A=='number'){B=A;A=ds.getAt(B);}else{B=ds.indexOf(A);}this.insertRow(ds,B,true);this.autoSize();this.onRemove(ds,A,B+1,true);this.autoSize();this.fireEvent("rowupdated",this,B,A);
+},insertRow:function(dm,A,B){if(!B){this.fireEvent("beforerowsinserted",this,A);}var C=this.renderRow(this.cm,this.store,A);var e=this.mainBody.createChild(C,this.getRowDom(A));var D=this;if(C.cellObjects.length){Roo.each(C.cellObjects,function(r){D.renderCellObject(r);
+})}if(!B){this.fireEvent("rowsinserted",this,A);}},getRowDom:function(A){var B=this.el.select('tbody > tr',true).elements;return (typeof(B[A])=='undefined')?false:B[A];},renderRow:function(cm,ds,A){var d=ds.getAt(A);var B={tag:'tr',cn:[]};var C=[];for(var i=0,D=cm.getColumnCount();
+i<D;i++){var E=cm.config[i];var F=cm.getRenderer(i);var G='';var id=false;if(typeof(F)!=='undefined'){G=F(d.data[cm.getDataIndex(i)],false,d);}if(typeof(G)==='object'){id=Roo.id();C.push({container:id,cfg:G})}var H={record:d,rowIndex:A,colIndex:i,rowClass:''}
+;this.fireEvent('rowclass',this,H);var td={tag:'td',cls:H.rowClass,style:'',html:(typeof(G)==='object')?'':G};if(id){td.id=id;}if(typeof(E.colspan)!='undefined'){td.colspan=E.colspan;}if(typeof(E.hidden)!='undefined'&&E.hidden){td.style+=' display:none;';
+}if(typeof(E.align)!='undefined'&&E.align.length){td.style+=' text-align:'+E.align+';';}if(typeof(E.width)!='undefined'){td.style+=' width:'+E.width+'px;';}if(typeof(E.cursor)!='undefined'){td.style+=' cursor:'+E.cursor+';';}if(typeof(E.cls)!='undefined'){td.cls=(typeof(td.cls)=='undefined')?E.cls:(td.cls+' '+E.cls);
+}['xs','sm','md','lg'].map(function(I){if(typeof(E[I])=='undefined'){return;}if(!E[I]){td.cls+=' hidden-'+I;return;}td.cls+=' col-'+I+'-'+E[I];});if(E.hidden){td.cls+=' hidden';}B.cn.push(td);}B.cellObjects=C;return B;},onBeforeLoad:function(){},clear:function(){this.el.select('tbody',true).first().dom.innerHTML='';
+},setRowVisibility:function(A,B){var bt=this.mainBody.dom;var C=this.el.select('tbody > tr',true).elements;if(typeof(C[A])=='undefined'){return;}C[A].dom.style.display=B?'':'none';},getSelectionModel:function(){if(!this.selModel){this.selModel=new Roo.bootstrap.Table.RowSelectionModel({grid:this}
+);}return this.selModel;},renderCellObject:function(r){var A=this;r.cfg.parentId=(typeof(r.container)=='string')?r.container:r.container.id;var t=r.cfg.render(r.container);if(r.cfg.cn){Roo.each(r.cfg.cn,function(c){var B={container:t.getChildContainer(),cfg:c}
+;A.renderCellObject(B);})}},getRowIndex:function(A){var B=-1;Roo.each(this.el.select('tbody > tr',true).elements,function(el,C){if(el!=A){return;}B=C;});return B;},getGridEl:function(){return this.el;},autoSize:function(){var A=Roo.get(this.el.dom);var B=this.getGridEl().select('thead',true).first();
+var C=this.getGridEl().select('tbody',true).first();var D=this.getGridEl().select('tfoot',true).first();var cw=A.getWidth();if(C){C.setSize(A.getWidth(),A.getHeight()-((B?B.getHeight():0)+(D?D.getHeight():0)));var E=(C.dom.offsetWidth-C.dom.clientWidth);cw-=E;
+}cw=Math.max(cw,this.totalWidth);this.getGridEl().select('tr',true).setWidth(cw);return;},onBodyScroll:function(){if(this.mainHead){this.mainHead.setStyle({'position':'relative','left':(-1*this.mainBody.dom.scrollLeft)+'px'});}if(this.lazyLoad){var A=this.mainBody.dom.scrollHeight;
+var B=Math.ceil(this.mainBody.getScroll().top);var C=this.mainBody.getHeight();if(A-C==B){var D=this.ds.getTotalCount();if(this.footer.cursor+this.footer.pageSize<D){this.footer.ds.load({params:{start:this.footer.cursor+this.footer.pageSize,limit:this.footer.pageSize}
+,add:true});}}}},onHeaderChange:function(){var A=this.renderHeader();var B=this.el.select('table',true).first();this.mainHead.remove();this.mainHead=B.createChild(A,this.mainBody,false);},onHiddenChange:function(){this.onHeaderChange();this.onLoad();}});
 // Roo/bootstrap/TableCell.js
 Roo.bootstrap.TableCell=function(A){Roo.bootstrap.TableCell.superclass.constructor.call(this,A);};Roo.extend(Roo.bootstrap.TableCell,Roo.bootstrap.Component,{html:false,cls:false,tag:false,abbr:false,align:false,axis:false,bgcolor:false,charoff:false,colspan:false,headers:false,height:false,nowrap:false,rowspan:false,scope:false,valign:false,width:false,getAutoCreate:function(){var A=Roo.apply({}
 ,Roo.bootstrap.TableCell.superclass.getAutoCreate.call(this));A={tag:'td'};if(this.tag){A.tag=this.tag;}if(this.html){A.html=this.html}if(this.cls){A.cls=this.cls}if(this.abbr){A.abbr=this.abbr}if(this.align){A.align=this.align}if(this.axis){A.axis=this.axis}
@@ -1414,10 +1415,10 @@ Roo.bootstrap.RadioSet=function(A){Roo.bootstrap.RadioSet.superclass.constructor
 }if(this.labellg>0){A.cls+=' col-lg-'+this.labellg;B.cls+=' col-lg-'+(12-this.labellg);}if(this.labelmd>0){A.cls+=' col-md-'+this.labelmd;B.cls+=' col-md-'+(12-this.labelmd);}if(this.labelsm>0){A.cls+=' col-sm-'+this.labelsm;B.cls+=' col-sm-'+(12-this.labelsm);
 }if(this.labelxs>0){A.cls+=' col-xs-'+this.labelxs;B.cls+=' col-xs-'+(12-this.labelxs);}}var D={tag:'div',cls:'roo-radio-set',cn:[{tag:'input',cls:'roo-radio-set-input',type:'hidden',name:this.name,value:this.value?this.value:''},A,B]};if(this.weight.length){D.cls+=' roo-radio-'+this.weight;
 }if(this.inline){D.cls+=' roo-radio-set-inline';}var E=this;['xs','sm','md','lg'].map(function(F){if(E[F]){D.cls+=' col-'+F+'-'+E[F];}});return D;},initEvents:function(){this.labelEl=this.el.select('.roo-radio-set-label',true).first();this.labelEl.setVisibilityMode(Roo.Element.DISPLAY);
-if(!this.fieldLabel.length){this.labelEl.hide();}this.itemsEl=this.el.select('.roo-radio-set-items',true).first();this.itemsEl.setVisibilityMode(Roo.Element.DISPLAY);this.indicatorEl().addClass('invisible');this.originalValue=this.getValue();},inputEl:function(){return this.el.select('.roo-radio-set-input',true).first();
-},getChildContainer:function(){return this.itemsEl;},register:function(A){this.radioes.push(A);},validate:function(){if(this.getVisibilityEl().hasClass('hidden')){return true;}var A=false;Roo.each(this.radioes,function(i){if(!i.checked){return;}A=true;return false;
-});if(this.allowBlank){return true;}if(this.disabled||A){this.markValid();return true;}this.markInvalid();return false;},markValid:function(){if(this.labelEl.isVisible(true)){this.indicatorEl().removeClass('visible');this.indicatorEl().addClass('invisible');
-}this.el.removeClass([this.invalidClass,this.validClass]);this.el.addClass(this.validClass);this.fireEvent('valid',this);},markInvalid:function(A){if(this.allowBlank||this.disabled){return;}if(this.labelEl.isVisible(true)){this.indicatorEl().removeClass('invisible');
+if(!this.fieldLabel.length){this.labelEl.hide();}this.itemsEl=this.el.select('.roo-radio-set-items',true).first();this.itemsEl.setVisibilityMode(Roo.Element.DISPLAY);this.indicator=this.indicatorEl();if(this.indicator){this.indicator.addClass('invisible');
+}this.originalValue=this.getValue();},inputEl:function(){return this.el.select('.roo-radio-set-input',true).first();},getChildContainer:function(){return this.itemsEl;},register:function(A){this.radioes.push(A);},validate:function(){if(this.getVisibilityEl().hasClass('hidden')){return true;
+}var A=false;Roo.each(this.radioes,function(i){if(!i.checked){return;}A=true;return false;});if(this.allowBlank){return true;}if(this.disabled||A){this.markValid();return true;}this.markInvalid();return false;},markValid:function(){if(this.labelEl.isVisible(true)){this.indicatorEl().removeClass('visible');
+this.indicatorEl().addClass('invisible');}this.el.removeClass([this.invalidClass,this.validClass]);this.el.addClass(this.validClass);this.fireEvent('valid',this);},markInvalid:function(A){if(this.allowBlank||this.disabled){return;}if(this.labelEl.isVisible(true)){this.indicatorEl().removeClass('invisible');
 this.indicatorEl().addClass('visible');}this.el.removeClass([this.invalidClass,this.validClass]);this.el.addClass(this.invalidClass);this.fireEvent('invalid',this,A);},setValue:function(v,A){if(this.value===v){return;}this.value=v;if(this.rendered){this.inputEl().dom.value=(v===null||v===undefined?'':v);
 }Roo.each(this.radioes,function(i){i.checked=false;i.el.removeClass('checked');});Roo.each(this.radioes,function(i){if(i.value===v||i.value.toString()===v.toString()){i.checked=true;i.el.addClass('checked');if(A!==true){this.fireEvent('check',this,i);}return false;
 }},this);this.validate();},clearInvalid:function(){if(!this.el||this.preventMark){return;}this.el.removeClass([this.invalidClass]);this.fireEvent('valid',this);}});Roo.apply(Roo.bootstrap.RadioSet,{groups:{},register:function(A){this.groups[A.name]=A;},get:function(A){if(typeof(this.groups[A])=='undefined'){return false;