Author: pkawiak
Date: 2008-09-08 02:16:16 -0400 (Mon, 08 Sep 2008)
New Revision: 10341
Modified:
trunk/ui/extendedDataTable/src/main/javascript/ClientUI/controls/datatable/ExtendedDataTable.js
trunk/ui/extendedDataTable/src/main/javascript/ClientUI/controls/datatable/ExtendedDataTableHeader.js
Log:
extDt not rendering under opera 9.5
Modified:
trunk/ui/extendedDataTable/src/main/javascript/ClientUI/controls/datatable/ExtendedDataTable.js
===================================================================
---
trunk/ui/extendedDataTable/src/main/javascript/ClientUI/controls/datatable/ExtendedDataTable.js 2008-09-07
23:04:20 UTC (rev 10340)
+++
trunk/ui/extendedDataTable/src/main/javascript/ClientUI/controls/datatable/ExtendedDataTable.js 2008-09-08
06:16:16 UTC (rev 10341)
@@ -149,18 +149,26 @@
},
showSplashScreen: function(){
+ /**
+ Opera 95 is not drawing additional
+ element, and so I am commenting this out.
if (ClientUILib.isOpera) {
this.mainDiv.setStyle({display:'none'});
}
+ */
this.table.setStyle({visibility:'hidden'});
var splshscr = this.splashScreen;
splshscr.className = 'extdt-ss-vsbl';
},
hideSplashScreen: function(){
+ /**
+ Opera 95 is not drawing additional
+ element, and so I am commenting this out.
if (ClientUILib.isOpera) {
this.mainDiv.setStyle({display:''});
}
+ */
this.table.setStyle({visibility:'visible'});
this.splashScreen.className = 'extdt-ss-hdn';
},
@@ -354,15 +362,6 @@
if (excessWidth > 0) {
this.validateColumnsWidth(cols,excessWidth);
};
- if (ClientUILib.isOpera) {
- var _stl = 2;
- var cols = this.header.getColumns();
- var columnsNumber = this.header.getColumnsNumber();
- for (var i=0; i<columnsNumber-1; i++) {
- ClientUILib.log(ClientUILogger.INFO, "this.getColumnWidth(i)
"+this.getColumnWidth(i));
- cols[i].width = this.getColumnWidth(i) - _stl;
- }
- };
cols[columnsNumber-1].width = null;
cols[cols.length-1].width = null;
var newHeight = mainDivHeight - header.getHeight() - footerHeight - 2;
@@ -386,11 +385,11 @@
this.createControls();
if ( !ClientUILib.isIE ) {
if (this.fakeIeRow) {
- this.table.getElement().deleteRow(this.fakeIeRow);
+ this.table.getElement().deleteRow(this.fakeIeRow.rowIndex);
this.fakeIeRow = null;
}
if (this.fakeIeBodyRow) {
- this.tableB.deleteRow(this.fakeIeBodyRow);
+ this.tableB.deleteRow(this.fakeIeBodyRow.rowIndex);
this.fakeIeBodyRow = null;
}
}
Modified:
trunk/ui/extendedDataTable/src/main/javascript/ClientUI/controls/datatable/ExtendedDataTableHeader.js
===================================================================
---
trunk/ui/extendedDataTable/src/main/javascript/ClientUI/controls/datatable/ExtendedDataTableHeader.js 2008-09-07
23:04:20 UTC (rev 10340)
+++
trunk/ui/extendedDataTable/src/main/javascript/ClientUI/controls/datatable/ExtendedDataTableHeader.js 2008-09-08
06:16:16 UTC (rev 10341)
@@ -161,9 +161,8 @@
adjustSeparators: function() {
var columnCells = this.getColumnCells();
- this._redrawTable(this.extDt.table.getElement());
- this._redrawTable(this.extDt.tableB);
var l = columnCells.length;
+ this._redrawTable(this.extDt.table.getElement());
for (var i=0; i<l-1; i++) {
var headerChild = columnCells[i];
var headerNextChild = columnCells[i+1];
@@ -207,7 +206,8 @@
this.lastColWidth = this.extDt.getColumnWidth(this.getColumnsNumber()-1);
if (ClientUILib.isIE){
this.lastColWidth -= 15;
- }
+ }
+ this._redrawTable(this.extDt.tableB);
},
OnSepClick: function(event) {
@@ -221,7 +221,7 @@
srcElement: Event.element(event),
dragStarted: false,
mouseDown: true,
- startX: Event.pointerX(event) - this.extDt.outerDiv.getX(),
+ startX: Event.pointerX(event),
originalX: 0
};
var srcElement = this.dragColumnInfo.srcElement;
@@ -240,7 +240,7 @@
this._createSplitter();
}
- var pos = this.dragColumnInfo.startX;
+ var pos = this.dragColumnInfo.srcElement.offsetLeft;
pos += 6; //6 stands for width of the separatorSpan
this.dragColumnInfo.originalX = pos;
this.columnSplitter.show();
@@ -270,8 +270,7 @@
this.dragColumnInfo.mouseDown = false;
var delta = Event.pointerX(event) -
- this.dragColumnInfo.startX -
- this.extDt.outerDiv.getX();
+ this.dragColumnInfo.startX;
if (delta < this.minDelta) {
delta = this.minDelta;
}
@@ -307,8 +306,7 @@
this._showSplitter(this.dragColumnInfo.srcElement.columnIndex);
}
var delta = Event.pointerX(event) -
- this.dragColumnInfo.startX -
- this.extDt.outerDiv.getX();
+ this.dragColumnInfo.startX
if (delta < this.minDelta) {
delta = this.minDelta;
}
@@ -322,12 +320,10 @@
}
},
_redrawTable: function(table) {
- table.hide();
var tr = table.insertRow(0);
var td = tr.insertCell(0);
td.setAttribute("colspan", 5);
td.innerHTML = "safari-must-have-something-inserted-to-redraw-table";
- table.deleteRow(tr);
- table.show();
+ table.deleteRow(tr.rowIndex);
}
});
\ No newline at end of file