Roo/bootstrap/Table.js
authorAlan Knowles <alan@roojs.com>
Tue, 9 Jun 2015 05:40:31 +0000 (13:40 +0800)
committerAlan Knowles <alan@roojs.com>
Tue, 9 Jun 2015 05:40:31 +0000 (13:40 +0800)
roojs-bootstrap.js
roojs-bootstrap-debug.js

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

index 44b2a5f..b46dbe3 100644 (file)
@@ -738,10 +738,10 @@ Roo.extend(Roo.bootstrap.Table, Roo.bootstrap.Component,  {
     setRowVisibility : function(rowIndex, state)
     {
         var bt = this.mainBody.dom;
-        if(typeof(bt.rows[index]) == 'undefined'){
+        if(typeof(bt.rows[rowIndex]) == 'undefined'){
             return;
         }
-        bt.rows[index].style.display = state ? '' : 'none';
+        bt.rows[rowIndex].style.display = state ? '' : 'none';
     },
     
     
index 1755a01..42d3350 100644 (file)
@@ -5661,10 +5661,10 @@ Roo.extend(Roo.bootstrap.Table, Roo.bootstrap.Component,  {
     setRowVisibility : function(rowIndex, state)
     {
         var bt = this.mainBody.dom;
-        if(typeof(bt.rows[index]) == 'undefined'){
+        if(typeof(bt.rows[rowIndex]) == 'undefined'){
             return;
         }
-        bt.rows[index].style.display = state ? '' : 'none';
+        bt.rows[rowIndex].style.display = state ? '' : 'none';
     },
     
     
index d68b717..4191bc6 100644 (file)
@@ -130,8 +130,8 @@ Roo.each(this.el.select('tbody td',true).elements,function(e){e.on('mouseover',A
 this.insertRow(ds,B,true);this.onRemove(ds,A,B+1,true);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){return (this.mainBody.dom.rows&&(A-1)<this.mainBody.dom.rows.length)?this.mainBody.dom.rows[A]:false},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.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+';';}
 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;if(typeof(bt.rows[index])=='undefined'){return;}
-bt.rows[index].style.display=B?'':'none';},getSelectionModel:function(){if(!this.selModel){this.selModel=new Roo.bootstrap.Table.RowSelectionModel();}return this.selModel;},renderCellObject:function(r){var A=this;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}
+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;if(typeof(bt.rows[A])=='undefined'){return;}
+bt.rows[A].style.display=B?'':'none';},getSelectionModel:function(){if(!this.selModel){this.selModel=new Roo.bootstrap.Table.RowSelectionModel();}return this.selModel;},renderCellObject:function(r){var A=this;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);})}}});
 //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}if(this.bgcolor){A.bgcolor=this.bgcolor}if(this.charoff){A.charoff=this.charoff}if(this.colspan){A.colspan=this.colspan}if(this.headers){A.headers=this.headers}if(this.height){A.height=this.height}if(this.nowrap){A.nowrap=this.nowrap}if(this.rowspan){A.rowspan=this.rowspan}if(this.scope){A.scope=this.scope}if(this.valign){A.valign=this.valign}if(this.width){A.width=this.width}return A;}});