X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=docs%2Fsymbols%2Fsrc%2FRoo_bootstrap_Table.js.html;h=89a2f2836b498db65363c31c666c665901014dfa;hb=cfb2c9fb219dd0c7d450013a357228469dee2f32;hp=03e3214f5f51e8823f4a1fa8ac8baf17773f1565;hpb=a85cad88263ee67afa9935772ee02052d220d68f;p=roojs1
diff --git a/docs/symbols/src/Roo_bootstrap_Table.js.html b/docs/symbols/src/Roo_bootstrap_Table.js.html
index 03e3214f5f..89a2f2836b 100644
--- a/docs/symbols/src/Roo_bootstrap_Table.js.html
+++ b/docs/symbols/src/Roo_bootstrap_Table.js.html
@@ -47,17 +47,19 @@
this.rowSelection = (typeof(config.RowSelection) != 'undefined') ? config.RowSelection : this.rowSelection;
- this.cellSelection = (typeof(config.CellSelection) != 'undefined') ? config.CellSelection : this.cellSelection;
+ this.rowSelection = (typeof(config.rowSelection) != 'undefined') ? config.rowSelection : this.rowSelection;
+ this.cellSelection = (typeof(config.cellSelection) != 'undefined') ? config.cellSelection : this.cellSelection;
this.headerShow = (typeof(config.thead) != 'undefined') ? config.thead : this.headerShow;
this.footerShow = (typeof(config.tfoot) != 'undefined') ? config.tfoot : this.footerShow;
-
+ this.sm = this.sm || {xtype: 'RowSelectionModel'};
if (this.sm) {
+ this.sm.grid = this;
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.grid.ColumnModel(this.cm);
this.cm = this.colModel;
@@ -309,6 +311,10 @@
if(!this.store || !this.cm){
return;
}
+ if (this.selModel) {
+ this.selModel.initEvents();
+ }
+
var _this = this;
Roo.each(this.el.select('thead th.sortable', true).elements, function(e){
@@ -493,12 +500,12 @@
},
-
+
onDblClick : function(e,el)
{
var cell = Roo.get(el);
- if(!cell || (!this.CellSelection && !this.RowSelection)){
+ if(!cell || (!this.cellSelection && !this.rowSelection)){
return;
}
@@ -519,11 +526,11 @@
var cellIndex = cell.dom.cellIndex;
var rowIndex = this.getRowIndex(row);
- if(this.CellSelection){
+ if(this.cellSelection){
this.fireEvent('celldblclick', this, cell, rowIndex, cellIndex, e);
}
- if(this.RowSelection){
+ if(this.rowSelection){
this.fireEvent('rowdblclick', this, row, rowIndex, e);
}
},
@@ -758,6 +765,7 @@
onUpdate : function(ds,record)
{
this.refreshRow(record);
+ this.autoSize();
},
onRemove : function(ds, record, index, isUpdate){
@@ -809,7 +817,9 @@
index = ds.indexOf(record);
}
this.insertRow(ds, index, true);
+ this.autoSize();
this.onRemove(ds, record, index+1, true);
+ this.autoSize();
this.fireEvent("rowupdated", this, index, record);
@@ -994,7 +1004,7 @@
getSelectionModel : function(){
if(!this.selModel){
- this.selModel = new Roo.bootstrap.Table.RowSelectionModel();
+ this.selModel = new Roo.bootstrap.Table.RowSelectionModel({grid: this});
}
return this.selModel;
},