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/07/23 18:30:24 UTC
svn commit: r967158 - in /myfaces/tobago/trunk/tobago-theme:
tobago-theme-charlotteville/src/main/resources/org/apache/myfaces/tobago/renderkit/html/charlotteville/standard/style/
tobago-theme-richmond/src/main/resources/org/apache/myfaces/tobago/rende...
Author: lofwyr
Date: Fri Jul 23 16:30:23 2010
New Revision: 967158
URL: http://svn.apache.org/viewvc?rev=967158&view=rev
Log:
TOBAGO-902: Simplify the HTML represantation of the Label tag.
Removed:
myfaces/tobago/trunk/tobago-theme/tobago-theme-speyside/src/main/resources/org/apache/myfaces/tobago/renderkit/html/speyside/msie/style/
Modified:
myfaces/tobago/trunk/tobago-theme/tobago-theme-charlotteville/src/main/resources/org/apache/myfaces/tobago/renderkit/html/charlotteville/standard/style/style.css
myfaces/tobago/trunk/tobago-theme/tobago-theme-richmond/src/main/resources/org/apache/myfaces/tobago/renderkit/html/richmond/standard/style/style.css
myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/LabelRenderer.java
myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/resources/org/apache/myfaces/tobago/renderkit/html/scarborough/msie/style/style.css
myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/resources/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/property/tobago-theme-config.properties
myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/resources/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/style/style.css
myfaces/tobago/trunk/tobago-theme/tobago-theme-speyside/src/main/resources/org/apache/myfaces/tobago/renderkit/html/speyside/mozilla/style/style.css
myfaces/tobago/trunk/tobago-theme/tobago-theme-speyside/src/main/resources/org/apache/myfaces/tobago/renderkit/html/speyside/standard/style/style.css
myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/META-INF/tobago-theme.xml
Modified: myfaces/tobago/trunk/tobago-theme/tobago-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/tobago-theme/tobago-theme-charlotteville/src/main/resources/org/apache/myfaces/tobago/renderkit/html/charlotteville/standard/style/style.css?rev=967158&r1=967157&r2=967158&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-charlotteville/src/main/resources/org/apache/myfaces/tobago/renderkit/html/charlotteville/standard/style/style.css (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-charlotteville/src/main/resources/org/apache/myfaces/tobago/renderkit/html/charlotteville/standard/style/style.css Fri Jul 23 16:30:23 2010
@@ -72,12 +72,8 @@
/* label ------------------------------------------------------------------- */
-div.tobago-label {
- background: #FADC9F;
-}
-
-.tobago-label-td-underline-label {
- background: #FADC9F;
+.tobago-label {
+ background-color: #FADC9F;
}
/* page -------------------------------------------------------------------- */
Modified: myfaces/tobago/trunk/tobago-theme/tobago-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/tobago-theme/tobago-theme-richmond/src/main/resources/org/apache/myfaces/tobago/renderkit/html/richmond/standard/style/style.css?rev=967158&r1=967157&r2=967158&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-richmond/src/main/resources/org/apache/myfaces/tobago/renderkit/html/richmond/standard/style/style.css (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-richmond/src/main/resources/org/apache/myfaces/tobago/renderkit/html/richmond/standard/style/style.css Fri Jul 23 16:30:23 2010
@@ -109,36 +109,28 @@ td.tobago-calendar-day-markup-selected {
/* label ------------------------------------------------------------ */
-div.tobago-label {
- background: #99ccff;
-}
-
-label.tobago-label {
+.tobago-label {
+ background-color: #99ccff;
color: #3366cc;
}
-.tobago-label-td-underline-label {
- background: #99ccff;
- height: 1px;
-}
-
-.tobago-label-td-underline-spacer {
- background: #e6e6e6;
+.tobago-label-markup-disabled {
+ color: #808080;
}
-label.tobago-label-markup-fatal {
+.tobago-label-markup-fatal {
color: #FF00FF;
}
-label.tobago-label-markup-error {
+.tobago-label-markup-error {
color: #FF0000;
}
-label.tobago-label-markup-warn {
+.tobago-label-markup-warn {
color: #FFA500;
}
-label.tobago-label-markup-info {
+.tobago-label-markup-info {
color: #000000;
}
Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/LabelRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/LabelRenderer.java?rev=967158&r1=967157&r2=967158&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/LabelRenderer.java (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/LabelRenderer.java Fri Jul 23 16:30:23 2010
@@ -21,6 +21,7 @@ import org.apache.myfaces.tobago.compone
import org.apache.myfaces.tobago.context.Markup;
import org.apache.myfaces.tobago.internal.util.AccessKeyMap;
import org.apache.myfaces.tobago.internal.util.Deprecation;
+import org.apache.myfaces.tobago.layout.LayoutBase;
import org.apache.myfaces.tobago.renderkit.LabelWithAccessKey;
import org.apache.myfaces.tobago.renderkit.LayoutComponentRendererBase;
import org.apache.myfaces.tobago.renderkit.css.Classes;
@@ -57,15 +58,10 @@ public class LabelRenderer extends Layou
}
}
-
public void encodeEnd(FacesContext facesContext, UIComponent component) throws IOException {
- final UILabel output;
// todo: remove test after 1.5.0, then UILabel is required
- if (component instanceof UILabel) {
- output = (UILabel) component;
- } else {
- output = null;
+ if (!(component instanceof UILabel)) {
Deprecation.LOG.warn("LabelRenderer should only render UILabel but got " + component.getClass().getName()
+ " id=" + component.getClientId(facesContext));
}
@@ -76,39 +72,32 @@ public class LabelRenderer extends Layou
String forValue = ComponentUtils.findClientIdFor(component, facesContext);
String clientId = component.getClientId(facesContext);
- writer.startElement(HtmlConstants.DIV, component);
+ writer.startElement(HtmlConstants.LABEL, component);
HtmlRendererUtils.renderDojoDndItem(component, writer, true);
final Classes classes = Classes.create(component);
- // todo: remove after 1.5.0 (see begin of method)
- if (output != null) {
- writer.writeClassAttribute(classes);
- Style style = new Style(facesContext, output);
+ writer.writeClassAttribute(classes);
+ if (component instanceof LayoutBase) {
+ Style style = new Style(facesContext, (LayoutBase) component);
writer.writeStyleAttribute(style);
}
- writer.startElement(HtmlConstants.A, component);
- writer.writeClassAttribute(classes);
- writer.startElement(HtmlConstants.LABEL, component);
writer.writeIdAttribute(clientId);
if (forValue != null) {
writer.writeAttribute(HtmlAttributes.FOR, forValue, false);
}
- writer.writeClassAttribute(classes);
HtmlRendererUtils.renderTip(component, writer);
if (label.getText() != null) {
HtmlRendererUtils.writeLabelWithAccessKey(writer, label);
}
- writer.endElement(HtmlConstants.LABEL);
- writer.endElement(HtmlConstants.A);
if (label.getAccessKey() != null) {
if (LOG.isInfoEnabled()
&& !AccessKeyMap.addAccessKey(facesContext, label.getAccessKey())) {
LOG.info("dublicated accessKey : " + label.getAccessKey());
- }
+ }
HtmlRendererUtils.addClickAcceleratorKey(facesContext, clientId, label.getAccessKey());
}
- writer.endElement(HtmlConstants.DIV);
+ writer.endElement(HtmlConstants.LABEL);
}
}
Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/resources/org/apache/myfaces/tobago/renderkit/html/scarborough/msie/style/style.css
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/resources/org/apache/myfaces/tobago/renderkit/html/scarborough/msie/style/style.css?rev=967158&r1=967157&r2=967158&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/resources/org/apache/myfaces/tobago/renderkit/html/scarborough/msie/style/style.css (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/resources/org/apache/myfaces/tobago/renderkit/html/scarborough/msie/style/style.css Fri Jul 23 16:30:23 2010
@@ -50,12 +50,6 @@ textarea.tobago-richTextEditor-body {
margin-bottom: -1px;
}
-/* label ---------------------------------------------------------------- */
-
-.tobago-label {
- margin-top: -2px;
-}
-
/* file ---------------------------------------------------------------- */
.tobago-file {
Modified: myfaces/tobago/trunk/tobago-theme/tobago-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/tobago-theme/tobago-theme-scarborough/src/main/resources/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/property/tobago-theme-config.properties?rev=967158&r1=967157&r2=967158&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/resources/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/property/tobago-theme-config.properties (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/resources/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/property/tobago-theme-config.properties Fri Jul 23 16:30:23 2010
@@ -102,6 +102,10 @@ In.css.padding-bottom=2
Label.fixedWidth=144
Label.fixedHeight=25
Label.preferredWidth=144
+Label.css.padding-left=2
+Label.css.padding-top=3
+Label.css.padding-right=2
+Label.css.padding-bottom=3
# todo: check this values
Link.minimumHeight=20
Modified: myfaces/tobago/trunk/tobago-theme/tobago-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/tobago-theme/tobago-theme-scarborough/src/main/resources/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/style/style.css?rev=967158&r1=967157&r2=967158&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/resources/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/style/style.css (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/resources/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/style/style.css Fri Jul 23 16:30:23 2010
@@ -323,61 +323,32 @@ div.tobago-gridLayout-first-column {
/* label ------------------------------------------------------------------- */
-div.tobago-label-markup-number {
- text-align: right;
-}
-
-a.tobago-label-markup-number {
- padding-left: 0;
- padding-right: 8px;
-
-}
-
-div.tobago-label {
-
-}
-
-a.tobago-label {
- padding-top: 4px;
- display: -moz-box;
-}
-
-label.tobago-label {
- height: 23px;
- padding: 0 0 0 2px;
+.tobago-label {
+ height: 19px;
+ padding: 3px 2px 3px 2px;
margin: 0;
border: 0 solid transparent;
- white-space: nowrap; /* font-size: 14px;*/
-/* border: 2px solid #ccddee; */
-/* background: #ccddee; */
+ white-space: nowrap;
+ vertical-align: top;
}
.tobago-label-markup-disabled {
color: #778899;
}
-.tobago-label-inline {
- width: auto;
-}
-
-label.tobago-label-inline {
- width: auto;
- padding-left: 0;
-}
-
-label.tobago-label-markup-fatal {
+.tobago-label-markup-fatal {
color: #FF00FF;
}
-label.tobago-label-markup-error {
+.tobago-label-markup-error {
color: #FF0000;
}
-label.tobago-label-markup-warn {
+.tobago-label-markup-warn {
color: #FFA500;
}
-label.tobago-label-markup-info {
+.tobago-label-markup-info {
color: #000000;
}
Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-speyside/src/main/resources/org/apache/myfaces/tobago/renderkit/html/speyside/mozilla/style/style.css
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-speyside/src/main/resources/org/apache/myfaces/tobago/renderkit/html/speyside/mozilla/style/style.css?rev=967158&r1=967157&r2=967158&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-speyside/src/main/resources/org/apache/myfaces/tobago/renderkit/html/speyside/mozilla/style/style.css (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-speyside/src/main/resources/org/apache/myfaces/tobago/renderkit/html/speyside/mozilla/style/style.css Fri Jul 23 16:30:23 2010
@@ -26,25 +26,6 @@
margin-top: 0px;
}
-/* label ------------------------------------------------------------------ */
-
-label.tobago-label {
- margin-top: 0px;
-}
-
-.tobago-label-td {
- border-top: 0px solid transparent;
- border-bottom: 0px solid transparent;
-}
-
-.tobago-label {
- padding-top: 0px;
-}
-
-.tobago-label-inline {
- padding-top: 1px;
-}
-
/* selectOneChoice --------------------------------------------------------- */
.tobago-selectOneChoice {
Modified: myfaces/tobago/trunk/tobago-theme/tobago-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/tobago-theme/tobago-theme-speyside/src/main/resources/org/apache/myfaces/tobago/renderkit/html/speyside/standard/style/style.css?rev=967158&r1=967157&r2=967158&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-speyside/src/main/resources/org/apache/myfaces/tobago/renderkit/html/speyside/standard/style/style.css (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-speyside/src/main/resources/org/apache/myfaces/tobago/renderkit/html/speyside/standard/style/style.css Fri Jul 23 16:30:23 2010
@@ -218,79 +218,41 @@
/* label ------------------------------------------------------------------- */
-div.tobago-label {
- background: #E8E8E8;
- border: 0 solid transparent;
- vertical-align: top;
- height: 19px;
- margin: 0;
- padding-top: 0;
-}
-a.tobago-label {
- padding-top: 3px;
-}
-
-label.tobago-label {
+.tobago-label {
+ background-color: #E8E8E8;
+ height: 14px;
font: bold 12px arial, helvetica, sans-serif;
- /*height: 19px;*/
- /*height: auto;*/
- height: 15px;
- border: 0 solid transparent;
- margin-top: 3px;
- padding-top: 0;
- padding-left: 8px;
- color: #000000;
- background-color: transparent;
-}
-
-.tobago-label-td {
- border: 0 solid transparent;
- /* border-bottom: 0px solid #E2E2E2;*/ /* see workaround in mozilla style! */
- vertical-align: top;
- height: 19px;
- margin: 0;
- padding-top: 0;
-}
-
-.tobago-label-td-underline-label {
- background: #E8E8E8; /*#c0c0c0;*/
- height: 1px;
-}
-
-.tobago-label-td-underline-spacer {
- height: 1px;
}
-label.tobago-label-markup-disabled {
+.tobago-label-markup-disabled {
color: #808080;
}
-.tobago-label-inline {
- padding-top: 5px; /* see workaround in mozilla style! */
- padding-left: 0;
- margin-top: 1px;
- width: auto;
-}
-
-label.tobago-label-inline {
- padding-left: 0;
-}
-
-label.tobago-label-markup-fatal {
- background: url(../image/label-error-bg.gif) no-repeat bottom left;
+.tobago-label-markup-fatal {
+ background-image: url(../image/process-stop.png);
+ background-repeat: no-repeat;
+ background-position: right 2px;
color: #FF00FF;
}
-label.tobago-label-markup-error {
- background: url(../image/label-error-bg.gif) no-repeat bottom left;
+.tobago-label-markup-error {
+ background-image: url(../image/dialog-error.png);
+ background-repeat: no-repeat;
+ background-position: right 2px;
color: #FF0000;
}
-label.tobago-label-markup-warn {
+.tobago-label-markup-warn {
+ background-image: url(../image/dialog-warning.png);
+ background-repeat: no-repeat;
+ background-position: right 2px;
color: #FFA500;
}
-label.tobago-label-markup-info {
+.tobago-label-markup-info {
+ background-image: url(../image/dialog-information.png);
+ background-repeat: no-repeat;
+ background-position: right 2px;
color: #000000;
}
Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/META-INF/tobago-theme.xml
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/META-INF/tobago-theme.xml?rev=967158&r1=967157&r2=967158&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/META-INF/tobago-theme.xml (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/META-INF/tobago-theme.xml Fri Jul 23 16:30:23 2010
@@ -81,7 +81,6 @@
<markup>error</markup>
<markup>warn</markup>
<markup>info</markup>
- <markup>number</markup>
</supported-markup>
</renderer>
<renderer>