X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/f5240829880f87e0cf581c6a296e436fdef0ef80..0494b8d9b9bb03ab6c22b34dae81261e3cd7e3e6:/pkgs/pkg-grid-foundation-debug.js diff --git a/pkgs/pkg-grid-foundation-debug.js b/pkgs/pkg-grid-foundation-debug.js index a698d8de..bfa1aa47 100644 --- a/pkgs/pkg-grid-foundation-debug.js +++ b/pkgs/pkg-grid-foundation-debug.js @@ -1,8 +1,8 @@ /*! - * Ext JS Library 3.3.0 - * Copyright(c) 2006-2010 Ext JS, Inc. - * licensing@extjs.com - * http://www.extjs.com/license + * Ext JS Library 3.3.1 + * Copyright(c) 2006-2010 Sencha Inc. + * licensing@sencha.com + * http://www.sencha.com/license */ /** * @class Ext.grid.GridPanel @@ -665,20 +665,21 @@ function(grid, rowIndex, columnIndex, e) { store = this.store, s, c, - oldIndex; + colIndex; if(cs){ for(var i = 0, len = cs.length; i < len; i++){ s = cs[i]; c = cm.getColumnById(s.id); if(c){ - cm.setState(s.id, { + colIndex = cm.getIndexById(s.id); + cm.setState(colIndex, { hidden: s.hidden, - width: s.width + width: s.width, + sortable: s.sortable }); - oldIndex = cm.getIndexById(s.id); - if(oldIndex != i){ - cm.moveColumn(oldIndex, i); + if(colIndex != i){ + cm.moveColumn(colIndex, i); } } } @@ -718,6 +719,9 @@ function(grid, rowIndex, columnIndex, e) { if(c.hidden){ o.columns[i].hidden = true; } + if(c.sortable){ + o.columns[i].sortable = true; + } } if(store){ ss = store.getSortState(); @@ -1609,11 +1613,14 @@ viewConfig: { /** * @cfg {Boolean} forceFit - * Defaults to false. Specify true to have the column widths re-proportioned - * at all times. The {@link Ext.grid.Column#width initially configured width} of each + *

Defaults to false. Specify true to have the column widths re-proportioned + * at all times.

+ *

The {@link Ext.grid.Column#width initially configured width} of each * column will be adjusted to fit the grid width and prevent horizontal scrolling. If columns are * later resized (manually or programmatically), the other columns in the grid will be resized - * to fit the grid width. See {@link #autoFill} also. + * to fit the grid width.

+ *

Columns which are configured with fixed: true are omitted from being resized.

+ *

See {@link #autoFill}.

*/ forceFit : false, @@ -2910,8 +2917,8 @@ viewConfig: { Ext.DomHelper.insertHtml('beforeEnd', this.mainBody.dom, html); } if (!isUpdate) { - this.fireEvent('rowsinserted', this, firstRow, lastRow); this.processRows(firstRow); + this.fireEvent('rowsinserted', this, firstRow, lastRow); } else if (firstRow === 0 || firstRow >= last) { //ensure first/last row is kept after an update. Ext.fly(this.getRow(firstRow)).addClass(firstRow === 0 ? this.firstRowCls : this.lastRowCls); @@ -5946,7 +5953,7 @@ Ext.grid.RowSelectionModel = Ext.extend(Ext.grid.AbstractSelectionModel, { s = this.getSelections(), i = 0, len = s.length, - index; + index, r; this.silent = true; this.clearSelections(true); @@ -6341,9 +6348,7 @@ Ext.grid.RowSelectionModel = Ext.extend(Ext.grid.AbstractSelectionModel, { r = newCell[0]; c = newCell[1]; - if(last.row != r){ - this.selectRow(r); // *** highlight newly-selected cell and update selection - } + this.onEditorSelect(r, last.row); if(g.isEditor && g.editing){ // *** handle tabbing while editorgrid is in edit mode ae = g.activeEditor; @@ -6356,12 +6361,19 @@ Ext.grid.RowSelectionModel = Ext.extend(Ext.grid.AbstractSelectionModel, { } }, + onEditorSelect: function(row, lastRow){ + if(lastRow != row){ + this.selectRow(row); // *** highlight newly-selected cell and update selection + } + }, + destroy : function(){ Ext.destroy(this.rowNav); this.rowNav = null; Ext.grid.RowSelectionModel.superclass.destroy.call(this); } -});/** +}); +/** * @class Ext.grid.Column *

This class encapsulates column configuration data to be used in the initialization of a * {@link Ext.grid.ColumnModel ColumnModel}.

@@ -6903,7 +6915,7 @@ Ext.grid.ActionColumn = Ext.extend(Ext.grid.Column, { */ /** * @cfg {Function} getClass A function which returns the CSS class to apply to the icon image. - * The function is passed the following parameters: