[maven-release-plugin] copy for tag tobago-2.0.5
diff --git a/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUISheetLayout.java b/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUISheetLayout.java
index f32eb84..e0e8750 100644
--- a/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUISheetLayout.java
+++ b/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUISheetLayout.java
@@ -281,7 +281,11 @@
}
if (needVerticalScrollbar) {
- currentWidthList.add(Math.max(freeWidth, verticalScrollbarWeight.getPixel())); // filler column
+ if (freeWidth > 0) {
+ currentWidthList.add(freeWidth + verticalScrollbarWeight.getPixel()); // filler column
+ } else {
+ currentWidthList.add(verticalScrollbarWeight.getPixel()); // filler column
+ }
} else {
currentWidthList.add(Math.max(freeWidth, 0)); // empty filler column
}
diff --git a/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SheetRenderer.java b/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SheetRenderer.java
index a1b2f39..b274e75 100644
--- a/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SheetRenderer.java
+++ b/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SheetRenderer.java
@@ -789,11 +789,7 @@
writer.startElement(HtmlElements.COLGROUP, null);
for (int i = 0; i < columnWidths.size(); i++) {
writer.startElement(HtmlElements.COL, null);
- if (needVerticalScrollbar && i == columnWidths.size() - 1) {
- writer.writeAttribute(HtmlAttributes.WIDTH, columnWidths.get(i) + verticalScrollbarWidth);
- } else {
- writer.writeAttribute(HtmlAttributes.WIDTH, columnWidths.get(i));
- }
+ writer.writeAttribute(HtmlAttributes.WIDTH, columnWidths.get(i));
writer.endElement(HtmlElements.COL);
}
writer.endElement(HtmlElements.COLGROUP);
diff --git a/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago-sheet.js b/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago-sheet.js
index 4049002..2c183ae 100644
--- a/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago-sheet.js
+++ b/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago-sheet.js
@@ -382,24 +382,24 @@
}
}
+ var headerFillerWidth = 0;
+ var bodyFillerWidth = 0;
if (usedWidth <= bodyDivWidth) {
- var fillerWidth = bodyDivWidth - usedWidth;
- console.log("SET fillerWidth : " + fillerWidth); // @DEV_ONLY
- widths = widths + fillerWidth + ",";
- headerCols.last().attr("width", fillerWidth + verticalScrollbarWidth);
- bodyCols.last().attr("width", fillerWidth);
+ bodyFillerWidth = bodyDivWidth - usedWidth;
+ headerFillerWidth = bodyFillerWidth + verticalScrollbarWidth;
bodyTable.css("width", bodyDivWidth);
} else {
- console.log("SET fillerWidth : 0"); // @DEV_ONLY
- bodyCols.last().attr("width", 0);
- bodyTable.css("width", usedWidth);
- var headerFillerWidth = 0;
if (usedWidth >= (bodyDivWidth - verticalScrollbarWidth)) {
headerFillerWidth = verticalScrollbarWidth;
}
- widths = widths + headerFillerWidth + ",";
- headerCols.last().attr("width", headerFillerWidth);
+ bodyTable.css("width", usedWidth);
}
+
+ console.log("SET fillerWidth : " + headerFillerWidth); // @DEV_ONLY
+ widths = widths + headerFillerWidth + ",";
+ bodyCols.last().attr("width", bodyFillerWidth);
+ headerCols.last().attr("width", headerFillerWidth);
+
// store the width values in a hidden field
Tobago.Sheet.hidden(sheet, "widths").val(widths);
return false;