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 2012/11/20 17:28:24 UTC
svn commit: r1411729 - in /myfaces/tobago/branches/tobago-1.5.x:
tobago-core/src/main/java/org/apache/myfaces/tobago/context/
tobago-theme/tobago-theme-richmond/src/main/resources/org/apache/myfaces/tobago/renderkit/html/richmond/standard/style/
tobago...
Author: lofwyr
Date: Tue Nov 20 16:28:22 2012
New Revision: 1411729
URL: http://svn.apache.org/viewvc?rev=1411729&view=rev
Log:
TOBAGO-1216: Markup for Default-Commands
Modified:
myfaces/tobago/branches/tobago-1.5.x/tobago-core/src/main/java/org/apache/myfaces/tobago/context/Markup.java
myfaces/tobago/branches/tobago-1.5.x/tobago-theme/tobago-theme-richmond/src/main/resources/org/apache/myfaces/tobago/renderkit/html/richmond/standard/style/style.css
myfaces/tobago/branches/tobago-1.5.x/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/ButtonRenderer.java
myfaces/tobago/branches/tobago-1.5.x/tobago-theme/tobago-theme-scarborough/src/main/resources/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/style/style.css
myfaces/tobago/branches/tobago-1.5.x/tobago-theme/tobago-theme-speyside/src/main/resources/org/apache/myfaces/tobago/renderkit/html/speyside/standard/style/style.css
myfaces/tobago/branches/tobago-1.5.x/tobago-theme/tobago-theme-standard/src/main/resources/META-INF/tobago-config.xml
Modified: myfaces/tobago/branches/tobago-1.5.x/tobago-core/src/main/java/org/apache/myfaces/tobago/context/Markup.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-1.5.x/tobago-core/src/main/java/org/apache/myfaces/tobago/context/Markup.java?rev=1411729&r1=1411728&r2=1411729&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-1.5.x/tobago-core/src/main/java/org/apache/myfaces/tobago/context/Markup.java (original)
+++ myfaces/tobago/branches/tobago-1.5.x/tobago-core/src/main/java/org/apache/myfaces/tobago/context/Markup.java Tue Nov 20 16:28:22 2012
@@ -52,8 +52,9 @@ public final class Markup implements Ser
public static final Markup ASCENDING = valueOf("ascending");
public static final Markup CENTER = valueOf("center");
public static final Markup CLICKABLE = valueOf("clickable");
- public static final Markup DESCENDING = valueOf("descending");
+ public static final Markup DEFAULT = valueOf("default");
public static final Markup DELETED = valueOf("deleted");
+ public static final Markup DESCENDING = valueOf("descending");
public static final Markup DISABLED = valueOf("disabled");
public static final Markup ERROR = valueOf("error");
public static final Markup EVEN = valueOf("even");
Modified: myfaces/tobago/branches/tobago-1.5.x/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/branches/tobago-1.5.x/tobago-theme/tobago-theme-richmond/src/main/resources/org/apache/myfaces/tobago/renderkit/html/richmond/standard/style/style.css?rev=1411729&r1=1411728&r2=1411729&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-1.5.x/tobago-theme/tobago-theme-richmond/src/main/resources/org/apache/myfaces/tobago/renderkit/html/richmond/standard/style/style.css (original)
+++ myfaces/tobago/branches/tobago-1.5.x/tobago-theme/tobago-theme-richmond/src/main/resources/org/apache/myfaces/tobago/renderkit/html/richmond/standard/style/style.css Tue Nov 20 16:28:22 2012
@@ -62,7 +62,7 @@
/* button ------------------------------------------------------------ */
.tobago-button {
- border: 1px #FF7D00 solid;
+ border-color: #FF7D00;
background: #FFCC66;
font: 11px arial, helvetica, sans-serif;
color: #3366CC;
Modified: myfaces/tobago/branches/tobago-1.5.x/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/ButtonRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-1.5.x/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/ButtonRenderer.java?rev=1411729&r1=1411728&r2=1411729&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-1.5.x/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/ButtonRenderer.java (original)
+++ myfaces/tobago/branches/tobago-1.5.x/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/ButtonRenderer.java Tue Nov 20 16:28:22 2012
@@ -20,8 +20,10 @@
package org.apache.myfaces.tobago.renderkit.html.scarborough.standard.tag;
import org.apache.myfaces.tobago.component.Attributes;
+import org.apache.myfaces.tobago.component.SupportsMarkup;
import org.apache.myfaces.tobago.component.UIButton;
import org.apache.myfaces.tobago.config.Configurable;
+import org.apache.myfaces.tobago.context.Markup;
import org.apache.myfaces.tobago.context.ResourceManagerUtils;
import org.apache.myfaces.tobago.internal.util.AccessKeyMap;
import org.apache.myfaces.tobago.layout.Measure;
@@ -48,6 +50,16 @@ public class ButtonRenderer extends Comm
private static final Logger LOG = LoggerFactory.getLogger(ButtonRenderer.class);
+ @Override
+ public void prepareRender(FacesContext facesContext, UIComponent component) throws IOException {
+ final SupportsMarkup button = (SupportsMarkup) component;
+ final boolean defaultCommand = ComponentUtils.getBooleanAttribute(component, Attributes.DEFAULT_COMMAND);
+ super.prepareRender(facesContext, component);
+ if (defaultCommand) {
+ button.setCurrentMarkup(Markup.DEFAULT.add(button.getCurrentMarkup()));
+ }
+ }
+
public void encodeEnd(FacesContext facesContext, UIComponent component) throws IOException {
UIButton button = (UIButton) component;
Modified: myfaces/tobago/branches/tobago-1.5.x/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/branches/tobago-1.5.x/tobago-theme/tobago-theme-scarborough/src/main/resources/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/style/style.css?rev=1411729&r1=1411728&r2=1411729&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-1.5.x/tobago-theme/tobago-theme-scarborough/src/main/resources/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/style/style.css (original)
+++ myfaces/tobago/branches/tobago-1.5.x/tobago-theme/tobago-theme-scarborough/src/main/resources/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/style/style.css Tue Nov 20 16:28:22 2012
@@ -153,6 +153,11 @@ fieldset.tobago-box {
-ms-box-sizing: content-box;
}
+.tobago-button-markup-default {
+ border-width: 2px;
+ padding: 1px;
+}
+
.tobago-button-markup-disabled {
cursor: default;
}
Modified: myfaces/tobago/branches/tobago-1.5.x/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/branches/tobago-1.5.x/tobago-theme/tobago-theme-speyside/src/main/resources/org/apache/myfaces/tobago/renderkit/html/speyside/standard/style/style.css?rev=1411729&r1=1411728&r2=1411729&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-1.5.x/tobago-theme/tobago-theme-speyside/src/main/resources/org/apache/myfaces/tobago/renderkit/html/speyside/standard/style/style.css (original)
+++ myfaces/tobago/branches/tobago-1.5.x/tobago-theme/tobago-theme-speyside/src/main/resources/org/apache/myfaces/tobago/renderkit/html/speyside/standard/style/style.css Tue Nov 20 16:28:22 2012
@@ -110,7 +110,7 @@
/* button ------------------------------------------------------------------ */
.tobago-button {
- border: 1px #000000 solid;
+ border-color: #000000;
background: #ffffff;
font: bold 12px arial, helvetica, sans-serif;
color: #660000;
Modified: myfaces/tobago/branches/tobago-1.5.x/tobago-theme/tobago-theme-standard/src/main/resources/META-INF/tobago-config.xml
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-1.5.x/tobago-theme/tobago-theme-standard/src/main/resources/META-INF/tobago-config.xml?rev=1411729&r1=1411728&r2=1411729&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-1.5.x/tobago-theme/tobago-theme-standard/src/main/resources/META-INF/tobago-config.xml (original)
+++ myfaces/tobago/branches/tobago-1.5.x/tobago-theme/tobago-theme-standard/src/main/resources/META-INF/tobago-config.xml Tue Nov 20 16:28:22 2012
@@ -41,6 +41,7 @@
<renderer>
<name>Button</name>
<supported-markup>
+ <markup>default</markup>
<markup>disabled</markup>
</supported-markup>
</renderer>