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 2016/05/11 14:20:13 UTC
svn commit: r1743377 - in /myfaces/tobago/trunk:
tobago-example/tobago-example-demo/src/main/webapp/content/20-component/010-input/10-in/
tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/css/
tobago-theme/tobago-them...
Author: lofwyr
Date: Wed May 11 14:20:13 2016
New Revision: 1743377
URL: http://svn.apache.org/viewvc?rev=1743377&view=rev
Log:
TOBAGO-1368: The standard theme will use Bootstrap
* set class for "required"
Modified:
myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/010-input/10-in/in.xhtml
myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/css/TobagoClass.java
myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/LabelLayoutRendererBase.java
myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/style/tobago.css
Modified: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/010-input/10-in/in.xhtml
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/010-input/10-in/in.xhtml?rev=1743377&r1=1743376&r2=1743377&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/010-input/10-in/in.xhtml (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/010-input/10-in/in.xhtml Wed May 11 14:20:13 2016
@@ -32,6 +32,7 @@
<tc:in id="i1" label="Input" value="Some Text"/>
<tc:in id="i2" label="Read Only" readonly="true" value="Some Text"/>
<tc:in id="i3" label="Disabled" disabled="true" value="Some Text"/>
+ <tc:in id="i3a" label="Required" required="true"/>
<tc:in id="i4" value="Input without a label"/>
</tc:section>
Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/css/TobagoClass.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/css/TobagoClass.java?rev=1743377&r1=1743376&r2=1743377&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/css/TobagoClass.java (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/css/TobagoClass.java Wed May 11 14:20:13 2016
@@ -39,6 +39,7 @@ public enum TobagoClass implements CssIt
TABLE_LAYOUT__FIXED("tableLayout-fixed"),
HAS_INFO("has-info"),
+ REQUIRED("required"),
FLEX_LAYOUT("tobago-flexLayout"),
LABEL("tobago-label"),
Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/LabelLayoutRendererBase.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/LabelLayoutRendererBase.java?rev=1743377&r1=1743376&r2=1743377&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/LabelLayoutRendererBase.java (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/LabelLayoutRendererBase.java Wed May 11 14:20:13 2016
@@ -130,7 +130,11 @@ public abstract class LabelLayoutRendere
// TODO: optimize findAncestor() -> set a marker in UINav?
// writer.writeClassAttribute(divClass, extra, BootstrapClass.maximumSeverity(component));
- writer.writeClassAttribute(divClass, BootstrapClass.FORM_GROUP, BootstrapClass.maximumSeverity(component));
+ writer.writeClassAttribute(
+ divClass,
+ BootstrapClass.FORM_GROUP,
+ BootstrapClass.maximumSeverity(component),
+ ComponentUtils.getBooleanAttribute(component, Attributes.required) ? TobagoClass.REQUIRED : null);
switch (labelLayout) {
case flexLeft:
Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/style/tobago.css
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/style/tobago.css?rev=1743377&r1=1743376&r2=1743377&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/style/tobago.css (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/style/tobago.css Wed May 11 14:20:13 2016
@@ -652,3 +652,7 @@ fixme: there is a problem with the selec
background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA2MTIgNzkyIj48cGF0aCBmaWxsPSIjNWNiODVjIiBkPSJNMjMzLjggNjEwYy0xMy4zIDAtMjYtNi0zNC0xNi44TDkwLjUgNDQ4LjhDNzYuMyA0MzAgODAgNDAzLjMgOTguOCAzODljMTguOC0xNC4yIDQ1LjUtMTAuNCA1OS44IDguNGw3MiA5NUw0NTEuMyAyNDJjMTIuNS0yMCAzOC44LTI2LjIgNTguOC0xMy43IDIwIDEyLjQgMjYgMzguNyAxMy43IDU4LjhMMjcwIDU5MGMtNy40IDEyLTIwLjIgMTkuNC0zNC4zIDIwaC0yeiIvPjwvc3ZnPg==");
}
+.required .tobago-label:after {
+ content:"*";
+ color:red;
+}