PDA

View Full Version : [OPEN-378][3.1] ColumnGroupHeader on WebKit



Condor
9 Dec 2009, 11:50 PM
The ColumnGroupHeader plugin still contains an old WebKit patch.

The correct code should be:

/*if(Ext.isWebKit){
Ext.grid.GridView.prototype.borderWidth = 0;
}*/
Ext.override(Ext.ux.grid.ColumnHeaderGroup, {
getGroupStyle: function(group, gcol){
var width = 0, hidden = true;
for(var i = gcol, len = gcol + group.colspan; i < len; i++){
if(!this.cm.isHidden(i)){
var cw = this.cm.getColumnWidth(i);
if(typeof cw == 'number'){
width += cw;
}
hidden = false;
}
}
return {
width: (Ext.isBorderBox || (Ext.isWebKit && !Ext.isSafari2) ? width : Math.max(width - this.borderWidth, 0)) + 'px',
hidden: hidden
};
}
});