Roo/bootstrap/Table.js
authorEdward <edward@roojs.com>
Mon, 12 May 2014 08:37:22 +0000 (16:37 +0800)
committerEdward <edward@roojs.com>
Mon, 12 May 2014 08:37:22 +0000 (16:37 +0800)
roojs-bootstrap.js
roojs-bootstrap-debug.js

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

index 6a78250..8efdba1 100644 (file)
@@ -37,7 +37,7 @@
 
 Roo.bootstrap.Table = function(config){
     Roo.bootstrap.Table.superclass.constructor.call(this, config);
-    
+    Roo.log(this.sm);return;
     if (this.sm) {
         this.selModel = Roo.factory(this.sm, Roo.bootstrap.Table);
         this.sm = this.selModel;
index 155955f..99dbc94 100644 (file)
@@ -2276,7 +2276,7 @@ Roo.extend(Roo.bootstrap.Slider, Roo.bootstrap.Component,  {
 
 Roo.bootstrap.Table = function(config){
     Roo.bootstrap.Table.superclass.constructor.call(this, config);
-    
+    Roo.log(this.sm);return;
     if (this.sm) {
         this.selModel = Roo.factory(this.sm, Roo.bootstrap.Table);
         this.sm = this.selModel;
@@ -2400,7 +2400,7 @@ Roo.extend(Roo.bootstrap.Table, Roo.bootstrap.Component,  {
     
     initEvents : function()
     {   
-        if(!this.store && !this.cm && !this.sm){
+        if(!this.store || !this.cm){
             return;
         }
         
@@ -2412,6 +2412,12 @@ Roo.extend(Roo.bootstrap.Table, Roo.bootstrap.Component,  {
         
         var header = this.renderHeaders();
         
+//        if (!this.sm) {
+//            this.selModel = Roo.factory(this.sm, Roo.bootstrap.Table);
+//            this.sm = this.selModel;
+//            this.sm.xmodule = this.xmodule || false;
+//        }
+    
     },
     
     renderHeaders : function()
index 6def30d..d2f4983 100644 (file)
@@ -67,7 +67,7 @@ this.fireEvent('click',this,e);}});
 //Roo/bootstrap/Slider.js
 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'};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&&this.sm){A.cn=this.initTableGrid();}return A;},initTableGrid:function(){var A={};},initEvents:function(){if(!this.store&&!this.cm&&!this.sm){return;}
+Roo.bootstrap.Table=function(A){Roo.bootstrap.Table.superclass.constructor.call(this,A);Roo.log(this.sm);return;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'};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&&this.sm){A.cn=this.initTableGrid();}return A;},initTableGrid:function(){var A={};},initEvents:function(){if(!this.store||!this.cm){return;}
 Roo.log('initEvents!!!!');Roo.log(this.sm);var cm=this.cm;var A=cm.getColumnCount();var B=this.renderHeaders();},renderHeaders:function(){}});
 //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;}});