From 871724dfa3093fb6118c56398f0b8c0cffcda24d Mon Sep 17 00:00:00 2001 From: Edward Date: Thu, 10 Jul 2014 12:41:19 +0800 Subject: [PATCH] Roo/bootstrap/Table.js roojs-bootstrap.js roojs-bootstrap-debug.js --- Roo/bootstrap/Table.js | 2 +- roojs-bootstrap-debug.js | 2 +- roojs-bootstrap.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Roo/bootstrap/Table.js b/Roo/bootstrap/Table.js index c4e69ecfd7..1931471af2 100644 --- a/Roo/bootstrap/Table.js +++ b/Roo/bootstrap/Table.js @@ -210,7 +210,7 @@ Roo.extend(Roo.bootstrap.Table, Roo.bootstrap.Component, { var cm = this.cm; for(var i = 0, len = cm.getColumnCount(); i < len; i++){ - var config = cm.config(i); + var config = cm.config[i]; Roo.log('header!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!'); Roo.log(config); header.cn.push({ diff --git a/roojs-bootstrap-debug.js b/roojs-bootstrap-debug.js index c82b118311..f04d887259 100644 --- a/roojs-bootstrap-debug.js +++ b/roojs-bootstrap-debug.js @@ -2973,7 +2973,7 @@ Roo.extend(Roo.bootstrap.Table, Roo.bootstrap.Component, { var cm = this.cm; for(var i = 0, len = cm.getColumnCount(); i < len; i++){ - var config = cm.config(i); + var config = cm.config[i]; Roo.log('header!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!'); Roo.log(config); header.cn.push({ diff --git a/roojs-bootstrap.js b/roojs-bootstrap.js index 55f1498aa5..9526e80338 100644 --- a/roojs-bootstrap.js +++ b/roojs-bootstrap.js @@ -78,7 +78,7 @@ this.fireEvent('click',this,e);}}); Roo.bootstrap.Slider=function(A){Roo.bootstrap.Slider.superclass.constructor.call(this,A);};Roo.extend(Roo.bootstrap.Slider,Roo.bootstrap.Component,{getAutoCreate:function(){var A={tag:'div',cls:'slider slider-sample1 vertical-handler ui-slider ui-slider-horizontal ui-widget ui-widget-content ui-corner-all',cn:[{tag:'a',cls:'ui-slider-handle ui-state-default ui-corner-all'}]};return A;}}); //Roo/bootstrap/Table.js Roo.bootstrap.Table=function(A){Roo.bootstrap.Table.superclass.constructor.call(this,A);if(this.sm){this.selModel=Roo.factory(this.sm,Roo.bootstrap.Table);this.sm=this.selModel;this.sm.xmodule=this.xmodule||false;}if(this.cm&&typeof(this.cm.config)=='undefined'){this.colModel=new Roo.bootstrap.Table.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;}};Roo.extend(Roo.bootstrap.Table,Roo.bootstrap.Component,{cls:false,align:false,bgcolor:false,border:false,cellpadding:false,cellspacing:false,frame:false,rules:false,sortable:false,summary:false,width:false,striped:false,bordered:false,hover:false,condensed:false,responsive:false,sm:false,cm:false,store:false,getAutoCreate:function(){var A=Roo.apply({},Roo.bootstrap.Table.superclass.getAutoCreate.call(this));A={tag:'table',cls:'table',cn:[]};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.align){A.align=this.align;}if(this.bgcolor){A.bgcolor=this.bgcolor;}if(this.border){A.border=this.border;}if(this.cellpadding){A.cellpadding=this.cellpadding;}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.store||this.cm){A.cn.push(this.renderHeader());A.cn.push(this.renderBody());A.cn.push(this.renderFooter());A.cls+=' TableGrid';}return A;},initEvents:function(){if(!this.store||!this.cm){return;} -Roo.log('initEvents with ds!!!!');this.store.on('load',this.onLoad,this);this.store.on('beforeload',this.onBeforeLoad,this);this.store.load();},renderHeader:function(){var A={tag:'thead',cn:[]};var cm=this.cm;for(var i=0,B=cm.getColumnCount();i0){this.store.data.each(function(d){var D={tag:'tr',cn:[]};for(var i=0,E=cm.getColumnCount();i0){this.store.data.each(function(d){var D={tag:'tr',cn:[]};for(var i=0,E=cm.getColumnCount();i