X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/6a7e4474cba9d8be4b2ec445e10f1691f7277c50..b37ceabb82336ee82757cd32efe353cfab8ec267:/pkgs/pkg-grid-foundation-debug.js diff --git a/pkgs/pkg-grid-foundation-debug.js b/pkgs/pkg-grid-foundation-debug.js index ff2ebf76..46136109 100644 --- a/pkgs/pkg-grid-foundation-debug.js +++ b/pkgs/pkg-grid-foundation-debug.js @@ -1,5 +1,5 @@ /*! - * Ext JS Library 3.2.0 + * Ext JS Library 3.2.2 * Copyright(c) 2006-2010 Ext JS, Inc. * licensing@extjs.com * http://www.extjs.com/license @@ -656,8 +656,10 @@ function(grid, rowIndex, columnIndex, e) { s = cs[i]; c = cm.getColumnById(s.id); if(c){ - c.hidden = s.hidden; - c.width = s.width; + cm.setState(i, { + hidden: s.hidden, + width: s.width + }); oldIndex = cm.getIndexById(s.id); if(oldIndex != i){ cm.moveColumn(oldIndex, i); @@ -2363,12 +2365,13 @@ viewConfig: { var width = 0; var w; for (i = 0; i < colCount; i++){ - if(!cm.isHidden(i) && !cm.isFixed(i) && i !== omitColumn){ + if(!cm.isFixed(i) && i !== omitColumn){ w = cm.getColumnWidth(i); - cols.push(i); - extraCol = i; - cols.push(w); - width += w; + cols.push(i, w); + if(!cm.isHidden(i)){ + extraCol = i; + width += w; + } } } var frac = (aw - cm.getTotalWidth())/width; @@ -3048,7 +3051,7 @@ Ext.grid.GridView.SplitDragZone = Ext.extend(Ext.dd.DDProxy, { if(t && this.allowHeaderDrag(e)){ var xy = this.view.fly(t).getXY(), x = xy[0], - y = xy[1]; + y = xy[1], exy = e.getXY(), ex = exy[0], w = t.offsetWidth, adjust = false; @@ -4040,6 +4043,14 @@ myGrid.getColumnModel().setHidden(0, true); // hide column 0 (0 = the first colu } } this.purgeListeners(); + }, + + /** + * @private + * Setup any saved state for the column, ensures that defaults are applied. + */ + setState : function(col, state){ + Ext.applyIf(this.config[col], state); } }); @@ -5237,6 +5248,7 @@ Ext.grid.CheckboxSelectionModel = Ext.extend(Ext.grid.RowSelectionModel, { this.deselectRow(index); }else{ this.selectRow(index, true); + this.grid.getView().focusRow(index); } } }