You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lo...@apache.org on 2010/04/21 09:21:28 UTC
svn commit: r936179 - in /myfaces/tobago/trunk:
core/src/main/java/org/apache/myfaces/tobago/renderkit/css/
example/test/src/main/webapp/tc/sheet/
theme/charlotteville/src/main/resources/org/apache/myfaces/tobago/renderkit/html/charlotteville/standard/...
Author: lofwyr
Date: Wed Apr 21 07:21:28 2010
New Revision: 936179
URL: http://svn.apache.org/viewvc?rev=936179&view=rev
Log:
TOBAGO-873: Optimizing sheet performace
- clean up HTML code for the headers, which is needed because of the changed "box-sizing" model (CSS 2 spec conform, not Quirks Mode)
Modified:
myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/renderkit/css/Style.java
myfaces/tobago/trunk/example/test/src/main/webapp/tc/sheet/sheet-simple.xhtml
myfaces/tobago/trunk/theme/charlotteville/src/main/resources/org/apache/myfaces/tobago/renderkit/html/charlotteville/standard/style/style.css
myfaces/tobago/trunk/theme/richmond/src/main/resources/org/apache/myfaces/tobago/renderkit/html/richmond/standard/style/style.css
myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SheetRenderer.java
myfaces/tobago/trunk/theme/scarborough/src/main/resources/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/property/tobago-theme-config.properties
myfaces/tobago/trunk/theme/scarborough/src/main/resources/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/style/style.css
myfaces/tobago/trunk/theme/speyside/src/main/resources/org/apache/myfaces/tobago/renderkit/html/speyside/standard/property/tobago-theme-config.properties
myfaces/tobago/trunk/theme/speyside/src/main/resources/org/apache/myfaces/tobago/renderkit/html/speyside/standard/style/style.css
myfaces/tobago/trunk/theme/standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago-sheet.js
Modified: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/renderkit/css/Style.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/renderkit/css/Style.java?rev=936179&r1=936178&r2=936179&view=diff
==============================================================================
--- myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/renderkit/css/Style.java (original)
+++ myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/renderkit/css/Style.java Wed Apr 21 07:21:28 2010
@@ -28,7 +28,7 @@ import java.io.Serializable;
public class Style implements Serializable {
- private static final long serialVersionUID = 3L;
+ private static final long serialVersionUID = 4L;
private Measure width;
private Measure height;
@@ -44,6 +44,7 @@ public class Style implements Serializab
private Measure padding;
private String backgroundImage;
private Integer zIndex;
+ private String textAlign;
public Style() {
}
@@ -63,6 +64,7 @@ public class Style implements Serializab
this.padding = map.padding;
this.backgroundImage = map.backgroundImage;
this.zIndex = map.zIndex;
+ this.textAlign = map.textAlign;
}
public Style(FacesContext facesContext, LayoutBase layout) {
@@ -179,6 +181,11 @@ public class Style implements Serializab
buf.append(zIndex);
buf.append(';');
}
+ if (textAlign != null) {
+ buf.append("text-align:");
+ buf.append(textAlign);
+ buf.append(';');
+ }
return buf.toString();
}
@@ -294,4 +301,12 @@ public class Style implements Serializab
public void setZIndex(Integer zIndex) {
this.zIndex = zIndex;
}
+
+ public String getTextAlign() {
+ return textAlign;
+ }
+
+ public void setTextAlign(String textAlign) {
+ this.textAlign = textAlign;
+ }
}
Modified: myfaces/tobago/trunk/example/test/src/main/webapp/tc/sheet/sheet-simple.xhtml
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/example/test/src/main/webapp/tc/sheet/sheet-simple.xhtml?rev=936179&r1=936178&r2=936179&view=diff
==============================================================================
--- myfaces/tobago/trunk/example/test/src/main/webapp/tc/sheet/sheet-simple.xhtml (original)
+++ myfaces/tobago/trunk/example/test/src/main/webapp/tc/sheet/sheet-simple.xhtml Wed Apr 21 07:21:28 2010
@@ -7,11 +7,10 @@
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:f="http://java.sun.com/jsf/core">
- <tc:page>
+ <tc:page id="page">
<tc:gridLayoutConstraint width="600px" height="600px"/>
- <tc:sheet value="#{sheet.solarArray}" id="sheet" columns="*;*" var="luminary" rows="5"
- showRowRange="left" showPageRange="right" showDirectLinks="center">
+ <tc:sheet value="#{sheet.solarArray}" id="sheet" columns="*;*" var="luminary" rows="5">
<tc:column label="Name" id="name" sortable="true">
<tc:out value="#{luminary.name}"/>
</tc:column>
Modified: myfaces/tobago/trunk/theme/charlotteville/src/main/resources/org/apache/myfaces/tobago/renderkit/html/charlotteville/standard/style/style.css
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/theme/charlotteville/src/main/resources/org/apache/myfaces/tobago/renderkit/html/charlotteville/standard/style/style.css?rev=936179&r1=936178&r2=936179&view=diff
==============================================================================
--- myfaces/tobago/trunk/theme/charlotteville/src/main/resources/org/apache/myfaces/tobago/renderkit/html/charlotteville/standard/style/style.css (original)
+++ myfaces/tobago/trunk/theme/charlotteville/src/main/resources/org/apache/myfaces/tobago/renderkit/html/charlotteville/standard/style/style.css Wed Apr 21 07:21:28 2010
@@ -131,25 +131,25 @@ li.tobago-menu-selected {
.tobago-sheet-header {
border-color: #FADC9F #FECB66 #FADC9F #FADC9F;
- background: #FADC9F;
+ background-color: #FADC9F;
color: #660000;
font: bold 13px arial, helvetica, sans-serif;
}
.tobago-sheet-body-div {
- background: #FFEECF;
+ background-color: #FFEECF;
}
.tobago-sheet-row-odd {
- background: #FFEECF;
+ background-color: #FFEECF;
}
.tobago-sheet-row-even {
- background: #FADC9F;
+ background-color: #FADC9F;
}
.tobago-sheet-row-selected {
- background: highlight;
+ background-color: highlight;
color: highlighttext;
}
Modified: myfaces/tobago/trunk/theme/richmond/src/main/resources/org/apache/myfaces/tobago/renderkit/html/richmond/standard/style/style.css
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/theme/richmond/src/main/resources/org/apache/myfaces/tobago/renderkit/html/richmond/standard/style/style.css?rev=936179&r1=936178&r2=936179&view=diff
==============================================================================
--- myfaces/tobago/trunk/theme/richmond/src/main/resources/org/apache/myfaces/tobago/renderkit/html/richmond/standard/style/style.css (original)
+++ myfaces/tobago/trunk/theme/richmond/src/main/resources/org/apache/myfaces/tobago/renderkit/html/richmond/standard/style/style.css Wed Apr 21 07:21:28 2010
@@ -422,7 +422,7 @@ li.tobago-menu-selected {
.tobago-sheet-header {
border-color: #d6ebff #3366CC #d6ebff #d6ebff;
- background: #d6ebff;
+ background-color: #d6ebff;
color: #3366CC;
font: bold 13px arial, helvetica, sans-serif;
}
Modified: myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SheetRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SheetRenderer.java?rev=936179&r1=936178&r2=936179&view=diff
==============================================================================
--- myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SheetRenderer.java (original)
+++ myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SheetRenderer.java Wed Apr 21 07:21:28 2010
@@ -173,7 +173,6 @@ public class SheetRenderer extends Layou
String contextPath = facesContext.getExternalContext().getRequestContextPath();
String sheetId = sheet.getClientId(facesContext);
- String image1x1 = contextPath + resourceManager.getImage(facesContext, "image/1x1.gif");
String selectorDisabled = contextPath + resourceManager.getImage(facesContext, "image/sheetUncheckedDisabled.gif");
String unchecked = contextPath + resourceManager.getImage(facesContext, "image/sheetUnchecked.gif");
@@ -233,7 +232,8 @@ public class SheetRenderer extends Layou
// BEGIN RENDER BODY CONTENT
Style bodyStyle = new Style();
bodyStyle.setPosition(Position.RELATIVE);
- bodyStyle.setWidth(sheet.getCurrentWidth());
+ Measure tableBodyWidth = sheet.getCurrentWidth().subtractNotNegative(getContentBorder(facesContext, sheet));
+ bodyStyle.setWidth(tableBodyWidth);
sheetHeight = sheetHeight.subtract(footerHeight);
if (showHeader) {
sheetHeight = sheetHeight.subtract(getResourceManager().getThemeMeasure(facesContext, sheet, "headerHeight"));
@@ -248,17 +248,11 @@ public class SheetRenderer extends Layou
bodyStyle.setPaddingTop(Measure.ZERO);
}
writer.writeStyleAttribute(bodyStyle);
-// if (bodyStyle.getWidth() != null) {
-// intSpace -= columnWidths.get(columnWidths.size() - 1);
- Measure space = bodyStyle.getWidth();
final boolean needVerticalScrollbar = needVerticalScrollbar(facesContext, sheet, style);
if (needVerticalScrollbar) {
- space = space.subtractNotNegative(getVerticalScrollbarWeight(facesContext, sheet));
+ tableBodyWidth = tableBodyWidth.subtractNotNegative(getVerticalScrollbarWeight(facesContext, sheet));
}
- Measure headerWidth = space;
- space = space.subtractNotNegative(getContentBorder(facesContext, sheet));
- sheetBodyStyle.setWidth(space);
-// }
+ sheetBodyStyle.setWidth(tableBodyWidth);
sheetBodyStyle.setHeight(null);
writer.startElement(HtmlConstants.TABLE, null);
@@ -329,7 +323,9 @@ public class SheetRenderer extends Layou
writer.writeClassAttribute(tdClass.toString());
final String align = (String) column.getAttributes().get(Attributes.ALIGN);
if (align != null) {
- writer.writeStyleAttribute(HtmlRendererUtils.toStyleString("text-align", align));
+ Style alignStyle = new Style();
+ alignStyle.setTextAlign(align);
+ writer.writeStyleAttribute(alignStyle);
}
if (column instanceof UIColumnSelector) {
@@ -393,8 +389,7 @@ public class SheetRenderer extends Layou
if (showHeader) {
renderColumnHeaders(
- facesContext, sheet, writer, resourceManager, contextPath, sheetId, image1x1, renderedColumnList,
- headerWidth);
+ facesContext, sheet, writer, resourceManager, contextPath, sheetId, renderedColumnList, tableBodyWidth);
}
final String showRowRange = checkPagingAttribute(sheet.getShowRowRange());
@@ -402,8 +397,8 @@ public class SheetRenderer extends Layou
final String showDirectLinks = checkPagingAttribute(sheet.getShowDirectLinks());
if (sheet.isPagingVisible()) {
- Style footerStyle = new Style(bodyStyle);
- footerStyle.setPosition(null);
+ Style footerStyle = new Style();
+ footerStyle.setWidth(sheet.getCurrentWidth());
footerStyle.setHeight(footerHeight);
writer.startElement(HtmlConstants.DIV, sheet);
@@ -631,10 +626,6 @@ public class SheetRenderer extends Layou
return "left".equals(value) || "center".equals(value) || "right".equals(value);
}
- private Measure getAscendingMarkerWidth(FacesContext facesContext, UISheet data) {
- return getResourceManager().getThemeMeasure(facesContext, data, "ascendingMarkerWidth");
- }
-
@Override
public boolean getRendersChildren() {
return true;
@@ -684,8 +675,7 @@ public class SheetRenderer extends Layou
private void renderColumnHeaders(
FacesContext facesContext, UISheet sheet, TobagoResponseWriter writer, ResourceManager resourceManager,
- String contextPath, String sheetId, String image1x1, List<UIColumn> renderedColumnList,
- Measure headerWidth) throws IOException {
+ String contextPath, String sheetId, List<UIColumn> renderedColumnList, Measure headerWidth) throws IOException {
// begin rendering header
writer.startElement(HtmlConstants.DIV, null);
writer.writeIdAttribute(sheetId + ComponentUtils.SUB_SEPARATOR + "header_div");
@@ -695,59 +685,48 @@ public class SheetRenderer extends Layou
writer.writeStyleAttribute(style);
int columnCount = 0;
- Measure sortMarkerWidth = getAscendingMarkerWidth(facesContext, sheet);
- String imageAscending = contextPath + resourceManager.getImage(facesContext, "image/ascending.gif");
- String imageDescending = contextPath + resourceManager.getImage(facesContext, "image/descending.gif");
- String img = resourceManager.getImage(facesContext, "image/unsorted.gif", true);
- String imageUnsorted = image1x1;
- if (img != null) {
- imageUnsorted = contextPath + img;
- }
for (UIColumn column : renderedColumnList) {
- renderColumnHeader(
- facesContext, writer, sheet, columnCount, column, imageAscending, imageDescending, imageUnsorted, image1x1,
- sortMarkerWidth);
+ renderColumnHeader(facesContext, writer, sheet, columnCount, column, resourceManager, contextPath);
columnCount++;
}
writer.startElement(HtmlConstants.SPAN, null);
writer.writeIdAttribute(sheetId + ComponentUtils.SUB_SEPARATOR + "header_box_filler");
- writer.writeClassAttribute("tobago-sheet-header-box tobago-sheet-header-filler");
+ writer.writeClassAttribute("tobago-sheet-header tobago-sheet-header-filler");
writer.writeStyleAttribute("width:0px");
- writer.startElement(HtmlConstants.SPAN, null);
- writer.writeClassAttribute("tobago-sheet-header");
- writer.endElement(HtmlConstants.SPAN);
-
writer.endElement(HtmlConstants.SPAN);
writer.endElement(HtmlConstants.DIV);
// end rendering header
}
private void renderColumnHeader(
- FacesContext facesContext, TobagoResponseWriter writer, UISheet component,
- int columnIndex, UIColumn column, String imageAscending, String imageDescending, String imageUnsorted,
- String image1x1, Measure sortMarkerWidth) throws IOException {
+ FacesContext facesContext, TobagoResponseWriter writer, UISheet component, int columnIndex, UIColumn column,
+ ResourceManager resourceManager, String contextPath)
+ throws IOException {
String sheetId = component.getClientId(facesContext);
Application application = facesContext.getApplication();
- List<Integer> columnWidths = component.getWidthList();
- String divWidth = "width:" + columnWidths.get(columnIndex) + "px;";
+ Integer divWidth = component.getWidthList().get(columnIndex);
+ Style divStyle = new Style();
+ divWidth = divWidth - 6; // leftBorder + leftPadding + rightPadding + rightBorder = 6, todo: use Style Constructor
+ divStyle.setWidth(Measure.valueOf(divWidth));
+ String align = (String) column.getAttributes().get(Attributes.ALIGN);
+ if (align != null) {
+ divStyle.setTextAlign(align);
+ }
writer.startElement(HtmlConstants.SPAN, null);
- writer.writeIdAttribute(sheetId + "_header_box_" + columnIndex);
- writer.writeClassAttribute("tobago-sheet-header-box");
- writer.writeAttribute(HtmlAttributes.STYLE, divWidth, false);
+ writer.writeIdAttribute(sheetId + ComponentUtils.SUB_SEPARATOR + "header_box_" + columnIndex);
+ String headerClass = "tobago-sheet-header";
+ writer.writeStyleAttribute(divStyle);
String tip = (String) column.getAttributes().get(Attributes.TIP);
if (tip == null) {
tip = "";
}
-// ############################################
-// ############################################
+ // sorting
String sorterImage = null;
- String sorterClass = "";
- String sortTitle = null;
boolean sortable = ComponentUtils.getBooleanAttribute(column, Attributes.SORTABLE);
if (sortable && !(column instanceof UIColumnSelector)) {
UICommand sortCommand = (UICommand) column.getFacet(Facets.SORTER);
@@ -768,71 +747,50 @@ public class SheetRenderer extends Layou
}
tip += ResourceManagerUtil.getPropertyNotNull(facesContext, "tobago", "sheetTipSorting");
+ headerClass += " tobago-sheet-header-sortable";
+
SheetState sheetState = component.getSheetState(facesContext);
if (column.getId().equals(sheetState.getSortedColumnId())) {
+ String sortTitle;
if (sheetState.isAscending()) {
- sorterImage = imageAscending;
+ sorterImage = contextPath + resourceManager.getImage(facesContext, "image/ascending.gif");
sortTitle = ResourceManagerUtil.getPropertyNotNull(facesContext, "tobago", "sheetAscending");
+ headerClass += " tobago-sheet-header-ascending";
} else {
- sorterImage = imageDescending;
+ sorterImage = contextPath + resourceManager.getImage(facesContext, "image/descending.gif");
sortTitle = ResourceManagerUtil.getPropertyNotNull(facesContext, "tobago", "sheetDescending");
+ headerClass += " tobago-sheet-header-descending";
+ }
+ if (sortTitle != null) {
+ tip += " - " + sortTitle;
}
}
- sorterClass = " tobago-sheet-header-sortable";
}
-
-// ############################################
-// ############################################
-
+ writer.writeClassAttribute(headerClass);
writer.writeAttribute(HtmlAttributes.TITLE, tip, true);
- String align = (String) column.getAttributes().get(Attributes.ALIGN);
-
- writer.startElement(HtmlConstants.SPAN, null);
- writer.writeIdAttribute(sheetId + "_header_outer_" + columnIndex);
- //if (columnIndex == 0) {
- // writer.writeClassAttribute("tobago-sheet-header"+ sorterClass + " tobago-sheet-header-first-column");
- //} else {
- writer.writeClassAttribute("tobago-sheet-header" + sorterClass);
- //}
- if (align != null) {
- writer.writeStyleAttribute("text-align: " + align + ";");
- }
-
if (column instanceof UIColumnSelector) {
renderColumnSelectorHeader(facesContext, writer, component, column);
} else {
- renderColumnHeaderLabel(facesContext, writer, column, sortMarkerWidth, align, image1x1);
+ String label = (String) column.getAttributes().get(Attributes.LABEL);
+ if (label != null) {
+ writer.startElement(HtmlConstants.SPAN, null);
+ writer.writeText(label);
+ writer.endElement(HtmlConstants.SPAN);
+ }
}
- writer.endElement(HtmlConstants.SPAN);
-// ############################################
-// ############################################
- if (sortable && !(column instanceof UIColumnSelector)) {
- if (sorterImage == null && imageUnsorted != null) {
- sorterImage = imageUnsorted;
- }
- writer.startElement(HtmlConstants.SPAN, null);
- writer.writeClassAttribute("tobago-sheet-header-sort-div");
- if (sortTitle != null) {
- writer.writeAttribute(HtmlAttributes.TITLE, sortTitle, true);
- }
- if (sorterImage != null) {
- writer.startElement(HtmlConstants.IMG, null);
- writer.writeAttribute(HtmlAttributes.SRC, sorterImage, false);
- writer.writeAttribute(HtmlAttributes.ALT, "", false);
- if (sortTitle != null) {
- writer.writeAttribute(HtmlAttributes.TITLE, sortTitle, true);
- }
- writer.endElement(HtmlConstants.IMG);
- }
- writer.endElement(HtmlConstants.SPAN);
+ if (sorterImage != null) {
+ writer.startElement(HtmlConstants.IMG, null);
+ writer.writeAttribute(HtmlAttributes.SRC, sorterImage, false);
+ writer.writeAttribute(HtmlAttributes.ALT, "", false);
+ writer.endElement(HtmlConstants.IMG);
}
-// ############################################
-// ############################################
writer.endElement(HtmlConstants.SPAN);
+ // resizing
+
String resizerClass;
if (column instanceof UIColumnSelector) {
resizerClass = "tobago-sheet-header-resize";
@@ -843,7 +801,7 @@ public class SheetRenderer extends Layou
writer.startElement(HtmlConstants.SPAN, null);
writer.writeClassAttribute("tobago-sheet-header-resize-outer");
writer.startElement(HtmlConstants.SPAN, null);
- writer.writeIdAttribute(sheetId + "_header_resizer_" + columnIndex);
+ writer.writeIdAttribute(sheetId + ComponentUtils.SUB_SEPARATOR + "header_resizer_" + columnIndex);
writer.writeClassAttribute(resizerClass);
writer.write(" "); // is needed for IE6
writer.endElement(HtmlConstants.SPAN);
@@ -893,28 +851,6 @@ public class SheetRenderer extends Layou
menu.getChildren().add(menuItem);
}
- private void renderColumnHeaderLabel(
- FacesContext facesContext, TobagoResponseWriter writer, UIColumn column,
- Measure sortMarkerWidth, String align, String image1x1) throws IOException {
- String label = (String) column.getAttributes().get(Attributes.LABEL);
- if (label != null) {
- writer.writeText(label, null);
- if (ComponentUtils.getBooleanAttribute(column, Attributes.SORTABLE) && "right".equals(align)) {
- writer.startElement(HtmlConstants.IMG, null);
- writer.writeAttribute(HtmlAttributes.SRC, image1x1, false);
- writer.writeAttribute(HtmlAttributes.ALT, "", false);
- writer.writeAttribute(HtmlAttributes.WIDTH, sortMarkerWidth.toString(), false);
- writer.writeAttribute(HtmlAttributes.HEIGHT, 1);
- writer.endElement(HtmlConstants.IMG);
- }
- } else {
- writer.startElement(HtmlConstants.IMG, null);
- writer.writeAttribute(HtmlAttributes.SRC, image1x1, false);
- writer.writeAttribute(HtmlAttributes.ALT, "", false);
- writer.endElement(HtmlConstants.IMG);
- }
- }
-
private void writeDirectPagingLinks(
TobagoResponseWriter writer, FacesContext facesContext, Application application, UISheet data)
throws IOException {
@@ -1096,8 +1032,10 @@ public class SheetRenderer extends Layou
if (needVerticalScrollbar(facesContext, data, style)) {
space = space.subtractNotNegative(getVerticalScrollbarWeight(facesContext, data));
}
+/*
// todo: not nice: 1 left + 1 right border
space = space.subtract(rendererdColumns.size() * 2);
+*/
LayoutInfo layoutInfo =
new LayoutInfo(newTokens.getSize(), space.getPixel(), newTokens, data.getClientId(facesContext), false);
parseFixedWidth(facesContext, layoutInfo, rendererdColumns);
Modified: myfaces/tobago/trunk/theme/scarborough/src/main/resources/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/property/tobago-theme-config.properties
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/theme/scarborough/src/main/resources/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/property/tobago-theme-config.properties?rev=936179&r1=936178&r2=936179&view=diff
==============================================================================
--- myfaces/tobago/trunk/theme/scarborough/src/main/resources/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/property/tobago-theme-config.properties (original)
+++ myfaces/tobago/trunk/theme/scarborough/src/main/resources/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/property/tobago-theme-config.properties Wed Apr 21 07:21:28 2010
@@ -141,7 +141,6 @@ SelectOneRadio.height=20
Separator.height=14
Separator.withoutLabelHeight=2
-Sheet.ascendingMarkerWidth=10
Sheet.headerHeight=20
Sheet.footerHeight=20
Sheet.rowHeight=18
Modified: myfaces/tobago/trunk/theme/scarborough/src/main/resources/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/style/style.css
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/theme/scarborough/src/main/resources/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/style/style.css?rev=936179&r1=936178&r2=936179&view=diff
==============================================================================
--- myfaces/tobago/trunk/theme/scarborough/src/main/resources/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/style/style.css (original)
+++ myfaces/tobago/trunk/theme/scarborough/src/main/resources/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/style/style.css Wed Apr 21 07:21:28 2010
@@ -1166,49 +1166,36 @@ iframe.tobago-menu-ie6bugfix {
z-index: 2;
}
-.tobago-sheet-header-table {
- padding: 0 0 0 0;
- width: 100%;
- border: 0 solid black;
-}
-
-.tobago-sheet-header-box{
- border-color: #ddeeff #6688aa #6688aa #ddeeff;
+.tobago-sheet-header {
+ background-color: #bbccdd;
+ border-color: #ddeeff #6688aa #6688aa #ddeeff;
border-style: solid;
border-width: 1px;
- /* 20px - borderTop 1px - borderBottom 1px = 18px */
- height: 18px;
+ padding: 2px;
+ /* 20px - borderTop 1px - borderBottom 1px - paddingTop 2px - paddingButton 2px = 14px */
+ height: 14px;
vertical-align: top;
display: inline-block;
position: relative;
- padding: 0;
overflow: hidden;
text-overflow: ellipsis;
+ white-space: nowrap;
z-index: 3;
+ text-align: center;
}
-.tobago-sheet-header {
- background-color: #bbccdd;
- height: 100%;
- overflow: hidden;
- padding: 0 5px;
- text-overflow: ellipsis;
- white-space: nowrap;
- width: 100%;
- text-align: center;
- display: inline-block;
+.tobago-sheet-header-ascending span, .tobago-sheet-header-descending span {
+ margin-right: 15px;
}
-.tobago-sheet-header-sortable {
- cursor: pointer;
+.tobago-sheet-header-ascending img, .tobago-sheet-header-descending img {
+ position: absolute;
+ right: 5px;
+ top: 6px;
}
-.tobago-sheet-header-inner {
- text-align: center;
- height: 100%;
- width: 100%;
- text-overflow: ellipsis;
- white-space: nowrap;
+.tobago-sheet-header-sortable {
+ cursor: pointer;
}
.tobago-sheet-header-resize-outer {
@@ -1232,16 +1219,6 @@ iframe.tobago-menu-ie6bugfix {
cursor: col-resize; /* col-resize is allowed in CSS3+IE6, opera has a separate definition */
}
-.tobago-sheet-header-sort-div {
- display: inline-block;
- cursor: pointer;
- height: 100%;
- overflow: hidden;
- right: 5px;
- top: 0;
- width: 8px;
-}
-
.tobago-sheet-body-div {
overflow: auto;
padding-top: 20px;
Modified: myfaces/tobago/trunk/theme/speyside/src/main/resources/org/apache/myfaces/tobago/renderkit/html/speyside/standard/property/tobago-theme-config.properties
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/theme/speyside/src/main/resources/org/apache/myfaces/tobago/renderkit/html/speyside/standard/property/tobago-theme-config.properties?rev=936179&r1=936178&r2=936179&view=diff
==============================================================================
--- myfaces/tobago/trunk/theme/speyside/src/main/resources/org/apache/myfaces/tobago/renderkit/html/speyside/standard/property/tobago-theme-config.properties (original)
+++ myfaces/tobago/trunk/theme/speyside/src/main/resources/org/apache/myfaces/tobago/renderkit/html/speyside/standard/property/tobago-theme-config.properties Wed Apr 21 07:21:28 2010
@@ -83,7 +83,6 @@ SelectManyListbox.minimumHeight=60
Separator.height=14
Separator.withoutLabelHeight=1
-Sheet.ascendingMarkerWidth=15
Sheet.headerHeight=20
Sheet.footerHeight=15
Sheet.rowPadding=3
Modified: myfaces/tobago/trunk/theme/speyside/src/main/resources/org/apache/myfaces/tobago/renderkit/html/speyside/standard/style/style.css
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/theme/speyside/src/main/resources/org/apache/myfaces/tobago/renderkit/html/speyside/standard/style/style.css?rev=936179&r1=936178&r2=936179&view=diff
==============================================================================
--- myfaces/tobago/trunk/theme/speyside/src/main/resources/org/apache/myfaces/tobago/renderkit/html/speyside/standard/style/style.css (original)
+++ myfaces/tobago/trunk/theme/speyside/src/main/resources/org/apache/myfaces/tobago/renderkit/html/speyside/standard/style/style.css Wed Apr 21 07:21:28 2010
@@ -800,16 +800,12 @@ hr.tobago-separator-default {
height: 20px;
border-bottom: 1px solid #ffffff;
}
-.tobago-sheet-header-box {
+.tobago-sheet-header {
border-color: #b8b6b6 #ffffff #d7d7d7 #b8b6b6;
-}
-
-.tobago-sheet-header{
- background-color: #d7d7d7;
+ background-color: #d7d7d7;
font: bold 12px arial, helvetica, sans-serif;
color: #333333;
text-align: left;
- padding: 2px 2px 0px 3px;
}
.tobago-sheet-body-table {
Modified: myfaces/tobago/trunk/theme/standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago-sheet.js
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/theme/standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago-sheet.js?rev=936179&r1=936178&r2=936179&view=diff
==============================================================================
--- myfaces/tobago/trunk/theme/standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago-sheet.js (original)
+++ myfaces/tobago/trunk/theme/standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago-sheet.js Wed Apr 21 07:21:28 2010
@@ -89,7 +89,7 @@ Tobago.Sheet.prototype.sortOnclickRegExp
Tobago.Sheet.prototype.setupSortHeaders = function() {
var i = 0;
- var idPrefix = this.id + "_header_box_";
+ var idPrefix = this.id + Tobago.SUB_COMPONENT_SEP + "header_box_";
var headerBox = Tobago.element(idPrefix + i++);
while (headerBox) {
if (headerBox.onclick) {
@@ -320,13 +320,13 @@ Tobago.Sheet.prototype.setupResizer = fu
}
var contentDiv = Tobago.element(this.contentDivId);
Tobago.addBindEventListener(contentDiv, "scroll", this, "doScroll");
- var resizer = Tobago.element(this.id + "_header_resizer_" + i++ );
+ var resizer = Tobago.element(this.id + Tobago.SUB_COMPONENT_SEP + "header_resizer_" + i++ );
while (resizer) {
if (resizer.className.match(/tobago-sheet-header-resize-cursor/)) {
Tobago.addEventListener(resizer, "click", Tobago.stopEventPropagation);
Tobago.addBindEventListener(resizer, "mousedown", this, "beginResize");
}
- resizer = Tobago.element(this.id + "_header_resizer_" + i++ );
+ resizer = Tobago.element(this.id + Tobago.SUB_COMPONENT_SEP + "header_resizer_" + i++ );
}
};
@@ -656,7 +656,7 @@ Tobago.Sheet.prototype.deselectRow = fun
};
Tobago.Sheet.prototype.setupHeader = function() {
- var headerBox = Tobago.element(this.id + "_header_box_0");
+ var headerBox = Tobago.element(this.id + Tobago.SUB_COMPONENT_SEP + "header_box_0");
if (headerBox) {
if (window.opera) {
@@ -675,13 +675,13 @@ Tobago.Sheet.prototype.adjustResizer = f
if (window.opera) {
var position = 5;
var index = 0;
- var resizer = Tobago.element(this.id + "_header_resizer_" + index);
+ var resizer = Tobago.element(this.id + Tobago.SUB_COMPONENT_SEP + "header_resizer_" + index);
while (resizer) {
resizer.style.right = - position;
- var headerBox = Tobago.element(this.id + "_header_box_" + index++);
+ var headerBox = Tobago.element(this.id + Tobago.SUB_COMPONENT_SEP + "header_box_" + index++);
var width = headerBox.style.width.replace(/px/, "") - 0;
position += width;
- resizer = Tobago.element(this.id + "_header_resizer_" + index);
+ resizer = Tobago.element(this.id + Tobago.SUB_COMPONENT_SEP + "header_resizer_" + index);
}
}
};
@@ -698,10 +698,10 @@ Tobago.Sheet.prototype.adjustHeaderDiv =
var clientWidth = contentDiv.clientWidth;
var boxSum = 0;
var idx = 0;
- var box = Tobago.element(this.id + "_header_box_" + idx++);
+ var box = Tobago.element(this.id + Tobago.SUB_COMPONENT_SEP + "header_box_" + idx++);
while (box) {
boxSum += (box.style.width.replace(/px/, "") - 0);
- box = Tobago.element(this.id + "_header_box_" + idx++);
+ box = Tobago.element(this.id + Tobago.SUB_COMPONENT_SEP + "header_box_" + idx++);
}
if (clientWidth == 0) {
clientWidth = Math.min(contentWidth, boxSum);
@@ -737,12 +737,12 @@ Tobago.Sheet.prototype.beginResize = fun
if (this.resizerId) {
this.oldX = event.clientX;
var elementWidth = this.getHeaderBox().style.width;
- this.newWidth = elementWidth.substring(0,elementWidth.length-2);
+ this.newWidth = elementWidth.substring(0, elementWidth.length - 2);
}
};
Tobago.Sheet.prototype.getHeaderBox = function() {
- var boxId = this.resizerId.replace(/_header_resizer_/, "_header_box_");
+ var boxId = this.resizerId.replace(/header_resizer_/, "header_box_");
return Tobago.element(boxId);
};
@@ -753,9 +753,9 @@ Tobago.Sheet.prototype.doResize = functi
if (this.resizerId) {
var box = this.getHeaderBox();
var elementWidth = box.style.width;
- var elementWidthPx = elementWidth.substring(0,elementWidth.length-2);
+ var elementWidthPx = elementWidth.substring(0, elementWidth.length - 2);
var divX = event.clientX - this.oldX;
- this.newWidth = elementWidthPx-0 + divX;
+ this.newWidth = elementWidthPx - 0 + divX;
if (this.newWidth < 10) {
this.newWidth = 10;
} else {
@@ -785,7 +785,7 @@ Tobago.Sheet.prototype.endResize = funct
Tobago.Sheet.prototype.storeSizes = function() {
var index = 0;
- var idPrefix = this.id + "_header_box_";
+ var idPrefix = this.id + Tobago.SUB_COMPONENT_SEP + "header_box_";
var header = Tobago.element(idPrefix + index++);
var widths = "";
while (header) {