Author: pkawiak
Date: 2008-07-31 05:52:04 -0400 (Thu, 31 Jul 2008)
New Revision: 9838
Modified:
trunk/sandbox/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/AbstractExtendedTableRenderer.java
trunk/sandbox/ui/extendedDataTable/src/main/javascript/ClientUI/controls/datatable/ExtendedDataTable.js
trunk/sandbox/ui/extendedDataTable/src/main/javascript/ClientUI/controls/datatable/ExtendedDataTableHeader.js
trunk/sandbox/ui/extendedDataTable/src/main/javascript/ClientUI/controls/datatable/ExtendedDataTableSelection.js
trunk/sandbox/ui/extendedDataTable/src/main/javascript/ClientUILib.js
trunk/sandbox/ui/extendedDataTable/src/main/resources/org/richfaces/renderkit/html/css/extendedDataTable.xcss
Log:
Bugfix for livedemo
Modified:
trunk/sandbox/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/AbstractExtendedTableRenderer.java
===================================================================
---
trunk/sandbox/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/AbstractExtendedTableRenderer.java 2008-07-31
09:37:22 UTC (rev 9837)
+++
trunk/sandbox/ui/extendedDataTable/src/main/java/org/richfaces/renderkit/AbstractExtendedTableRenderer.java 2008-07-31
09:52:04 UTC (rev 9838)
@@ -192,7 +192,7 @@
/* encoding additional empty column used in resizing columns */
writer.startElement("th", table);
encodeStyleClass(writer, null,
- "extdt-subheadercell rich-extdt-subheadercell", null,
+ "extdt-empty-cell rich-extdt-subheadercell", null,
null);
writer.endElement("th");
writer.endElement("tr");
@@ -223,7 +223,7 @@
headerClass, facetName, element);
writer.startElement(HTML.th_ELEM, table);
encodeStyleClass(writer, null,
- "extdt-subheadercell rich-extdt-subheadercell", null,
null);
+ "extdt-empty-cell rich-extdt-subheadercell", null, null);
writer.endElement(HTML.th_ELEM);
writer.endElement(HTML.TR_ELEMENT);
}
@@ -519,7 +519,7 @@
writer.startElement(HTML.td_ELEM, table);
writer.writeAttribute(HTML.class_ATTRIBUTE,
- "extdt-cell extdt-group-cell", null);
+ "extdt-group-cell", null);
writer.writeAttribute("colspan", numberOfColumns, null);
writer.startElement(HTML.SPAN_ELEM, table);
writer.startElement(HTML.IMG_ELEMENT, table);
@@ -658,10 +658,7 @@
// encode additional empty row for resizing
writer.startElement(HTML.td_ELEM, table);
String columnClass = holder.getColumnClass(currentColumn);
- encodeStyleClass(writer, null, getCellSkinClass(), null, columnClass);
- writer.startElement(HTML.DIV_ELEM, table);
- writer.writeAttribute("class", "extdt-cell-div", null);
- writer.endElement(HTML.DIV_ELEM);
+ encodeStyleClass(writer, null, "extdt-empty-cell rich-extdt-cell",
null, columnClass);
writer.endElement(HTML.td_ELEM);
// Close row if then is open.
if (!first && !(column instanceof Row)) {
Modified:
trunk/sandbox/ui/extendedDataTable/src/main/javascript/ClientUI/controls/datatable/ExtendedDataTable.js
===================================================================
---
trunk/sandbox/ui/extendedDataTable/src/main/javascript/ClientUI/controls/datatable/ExtendedDataTable.js 2008-07-31
09:37:22 UTC (rev 9837)
+++
trunk/sandbox/ui/extendedDataTable/src/main/javascript/ClientUI/controls/datatable/ExtendedDataTable.js 2008-07-31
09:52:04 UTC (rev 9838)
@@ -98,13 +98,10 @@
},
setColumnWidth: function(columnIndex, newWidth) {
- ClientUILib.log(ClientUILogger.INFO, "columnIndex: " + columnIndex);
if (columnIndex >= this.getColumnsNumber) {
return false;
}else{
- ClientUILib.log(ClientUILogger.INFO, "newWidth inside method: " +
newWidth);
this.getColumns()[columnIndex].width = newWidth;
- ClientUILib.log(ClientUILogger.INFO, "newWidth after: " +
this.getColumnWidth(columnIndex));
}
},
@@ -286,7 +283,6 @@
return sd.offsetWidth - sd.clientWidth;
},
validateColumnsWidth: function(columns,excessWidth) {
- ClientUILib.log(ClientUILogger.INFO, "validatingColumnsWidth:
"+excessWidth);
var i=1;
var endIndex = columns.length-1;
while ((i < endIndex) && (excessWidth > 0)) {
@@ -346,17 +342,12 @@
var columnsNumber = this.getColumnsNumber();
var visibleHeaderWidth = this.header.getVisibleWidth();
- ClientUILib.log(ClientUILogger.INFO, "visibleHeaderWidth:
"+visibleHeaderWidth);
- ClientUILib.log(ClientUILogger.INFO, "mainDivWidth: " +
this.mainDiv.getWidth());
var scrollbarWidth = scrollingDiv.getElement().offsetWidth -
scrollingDiv.getElement().clientWidth;
var maxAllowedWidth = this.mainDiv.getWidth() - scrollbarWidth;
var excessWidth = this.header.getVisibleWidth() - maxAllowedWidth - 1;
- ClientUILib.log(ClientUILogger.ALERT, "1");
if (excessWidth > 0) {
- ClientUILib.log(ClientUILogger.INFO, "excessWidth: " + excessWidth);
this.validateColumnsWidth(cols,excessWidth);
};
- ClientUILib.log(ClientUILogger.ALERT, "2");
if (ClientUILib.isOpera) {
var _stl = headerChildren[0].getStyles().borderRightWidth;
_stl = parseInt(_stl.replace(/"px"/,""))*2;
@@ -378,7 +369,6 @@
}
var newHeight = mainDivHeight - header.getHeight() - footerHeight - 2;
newHeight -= this.header.getCaptionHeight();
- ClientUILib.log(ClientUILogger.INFO, "footerHeight: " + footerHeight);
scrollingDiv.setStyle('height:'+ newHeight +'px;');
var l = headerChildren.length;
for (var i=0; i < l-1; i++) {
Modified:
trunk/sandbox/ui/extendedDataTable/src/main/javascript/ClientUI/controls/datatable/ExtendedDataTableHeader.js
===================================================================
---
trunk/sandbox/ui/extendedDataTable/src/main/javascript/ClientUI/controls/datatable/ExtendedDataTableHeader.js 2008-07-31
09:37:22 UTC (rev 9837)
+++
trunk/sandbox/ui/extendedDataTable/src/main/javascript/ClientUI/controls/datatable/ExtendedDataTableHeader.js 2008-07-31
09:52:04 UTC (rev 9838)
@@ -117,7 +117,6 @@
if (!newWidth) {
newWidth = null;
}
- ClientUILib.log(ClientUILogger.INFO, "newWidth inside method: " +
newWidth);
this.getColumns()[columnIndex].width = newWidth;
}
},
@@ -211,7 +210,6 @@
OnSepClick: function(event) {
Event.stop(event);
- this.dragColumnInfo.mouseDown = false;
},
OnSepMouseDown: function(event) {
@@ -227,9 +225,8 @@
this.maxDelta = this.getColumnWidth(this.getColumnsNumber()-1);
this.maxDelta -= this.extDt.getScrollbarWidth();
if (ClientUILib.isOpera) {
- this.maxDelta -= 1;
+ this.maxDelt -= 1;
};
- ClientUILib.log(ClientUILogger.INFO, "this.maxDelta: " +
this.maxDelta);
this.minDelta = this.minColumnWidth - this.getColumnWidth(srcElement.columnIndex);
Event.observe(document, 'mousemove', this.eventSepMouseMove, true);
Event.observe(document, 'mouseup', this.eventSepMouseUp, true);
@@ -282,14 +279,11 @@
// sep span width
delta -= 6;
}
- ClientUILib.log(ClientUILogger.INFO, "delta: " + delta);
var columnIndex = this.dragColumnInfo.srcElement.columnIndex;
var newWidth = this.getColumnWidth(columnIndex) + delta;
this.extDt.setColumnWidth(columnIndex, newWidth);
this.setColumnWidth(columnIndex,newWidth);
- ClientUILib.log(ClientUILogger.ALERT, "newWidth: " + newWidth);
- ClientUILib.log(ClientUILogger.INFO, "newWidth 1: " +
this.extDt.getColumnWidth(1));
this.extDt.updateLayout();
if (this.extDt.onColumnResize){
//set properly value to this.columnWidths
@@ -318,7 +312,6 @@
if (delta > this.maxDelta) {
delta = this.maxDelta;
}
- ClientUILib.log(ClientUILogger.INFO, "maxDelta: " + this.maxDelta);
var x = this.dragColumnInfo.originalX + delta;
var finalX = x - this.minColumnWidth - 6 //6 stands for sep span width;
this.columnSplitter.moveToX(finalX);
Modified:
trunk/sandbox/ui/extendedDataTable/src/main/javascript/ClientUI/controls/datatable/ExtendedDataTableSelection.js
===================================================================
---
trunk/sandbox/ui/extendedDataTable/src/main/javascript/ClientUI/controls/datatable/ExtendedDataTableSelection.js 2008-07-31
09:37:22 UTC (rev 9837)
+++
trunk/sandbox/ui/extendedDataTable/src/main/javascript/ClientUI/controls/datatable/ExtendedDataTableSelection.js 2008-07-31
09:52:04 UTC (rev 9838)
@@ -579,7 +579,6 @@
var j = selection[0];
for(j;j <= selection[1];j++) {
this.removeRowFromSelection(j);
- //ClientUILib.log(ClientUILogger.INFO, "Removing: " + j);
}
}
var i = range[0];
Modified: trunk/sandbox/ui/extendedDataTable/src/main/javascript/ClientUILib.js
===================================================================
--- trunk/sandbox/ui/extendedDataTable/src/main/javascript/ClientUILib.js 2008-07-31
09:37:22 UTC (rev 9837)
+++ trunk/sandbox/ui/extendedDataTable/src/main/javascript/ClientUILib.js 2008-07-31
09:52:04 UTC (rev 9838)
@@ -299,7 +299,7 @@
}
};
-ClientUILib.load(true); //KAW debugging ON
+ClientUILib.load(false); //KAW debugging OFF
// declare predefined packages
var ClientUI = {
Modified:
trunk/sandbox/ui/extendedDataTable/src/main/resources/org/richfaces/renderkit/html/css/extendedDataTable.xcss
===================================================================
---
trunk/sandbox/ui/extendedDataTable/src/main/resources/org/richfaces/renderkit/html/css/extendedDataTable.xcss 2008-07-31
09:37:22 UTC (rev 9837)
+++
trunk/sandbox/ui/extendedDataTable/src/main/resources/org/richfaces/renderkit/html/css/extendedDataTable.xcss 2008-07-31
09:52:04 UTC (rev 9838)
@@ -14,6 +14,8 @@
list-style: none;
}
+ .extdt-empty-cell{
+ }
/**
* Body cell declaration
* dr-sdt-bc - reqired
@@ -75,6 +77,9 @@
.extdt-fakeierow {
}
+
+ .extdt-thead {
+ }
.extdt-menu-div-on {
height: 23px;
@@ -111,10 +116,10 @@
.extdt-group-cell {
height: 15px;
+ padding: 4px;
background-color: #eeeeee;
border-bottom: 1px #c0c0c0 solid;
border-top: 1px #c0c0c0 solid;
- padding: 0px;
}
.extdt-group-image-expanded {
@@ -242,6 +247,7 @@
}
.extdt-caption{
+ padding: 4px;
}
.dt-sdt-hdrop-bottom-left{
@@ -274,10 +280,12 @@
.extdt-outerdiv{
position:relative;
- padding: 1px;
+ padding: 0px;
width: 100%;
}
+ .extdt-
+
/**
* Header cells separator
*/
@@ -311,6 +319,19 @@
</u:style>
</u:selector>
+<u:selector name=".extdt-empty-cell" >
+ <u:style name="border-bottom" value="solid">
<!--tableBorderColor-->
+ <f:verbatim skin="tableBorderWidth" />
+ <f:verbatim skin="tableBorderColor" />
+ </u:style>
+</u:selector>
+
+<u:selector name=".extdt-fakeierow" >
+ <u:style name="background-color">
+ <f:verbatim skin="additionalBackgroundColor"/>
+ </u:style>
+</u:selector>
+
<u:selector name=".dr-sdt-hsplit" >
<u:style name="background-image">
<f:resource f:key="/org/richfaces/renderkit/html/images/s.gif"/>
@@ -490,13 +511,6 @@
</u:style>
</u:selector>
-<u:selector name=".extdt-thead" >
- <u:style name="border-bottom" value="solid">
<!--tableBorderColor-->
- <f:verbatim skin="tableBorderWidth" />
- <f:verbatim skin="tableBorderColor" />
- </u:style>
-</u:selector>
-
<u:selector name=".extdt-subheadercell" >
<u:style name="border-right" value="solid">
<!--tableBorderColor-->
<f:verbatim skin="tableBorderWidth" />
@@ -532,6 +546,7 @@
.extdt-header-sort-img {
vertical-align: middle;
}
+
</f:verbatim>
<u:selector name=".extdt-footer" >