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/02/17 15:47:34 UTC
svn commit: r1730846 - in
/myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag:
FooterRenderer.java HeaderRenderer.java
Author: lofwyr
Date: Wed Feb 17 14:47:34 2016
New Revision: 1730846
URL: http://svn.apache.org/viewvc?rev=1730846&view=rev
Log:
TOBAGO-1465: Support for header and footer HTML elements
* add "tip", "customClass" support
Modified:
myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/FooterRenderer.java
myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/HeaderRenderer.java
Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/FooterRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/FooterRenderer.java?rev=1730846&r1=1730845&r2=1730846&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/FooterRenderer.java (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/FooterRenderer.java Wed Feb 17 14:47:34 2016
@@ -23,6 +23,7 @@ import org.apache.myfaces.tobago.compone
import org.apache.myfaces.tobago.renderkit.RendererBase;
import org.apache.myfaces.tobago.renderkit.css.Classes;
import org.apache.myfaces.tobago.renderkit.css.BootstrapClass;
+import org.apache.myfaces.tobago.renderkit.html.HtmlAttributes;
import org.apache.myfaces.tobago.renderkit.html.HtmlElements;
import org.apache.myfaces.tobago.renderkit.html.util.HtmlRendererUtils;
import org.apache.myfaces.tobago.webapp.TobagoResponseWriter;
@@ -43,6 +44,9 @@ public class FooterRenderer extends Rend
Classes.create(footer),
footer.isFixed() ? BootstrapClass.NAVBAR_FIXED_BOTTOM : null,
footer.getCustomClass());
+ writer.writeAttribute(HtmlAttributes.TITLE, footer.getTip(), true);
+ writer.writeStyleAttribute(footer.getStyle());
+// HtmlRendererUtils.writeDataAttributes(facesContext, writer, footer);
}
@Override
Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/HeaderRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/HeaderRenderer.java?rev=1730846&r1=1730845&r2=1730846&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/HeaderRenderer.java (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/HeaderRenderer.java Wed Feb 17 14:47:34 2016
@@ -22,6 +22,8 @@ package org.apache.myfaces.tobago.render
import org.apache.myfaces.tobago.component.UIHeader;
import org.apache.myfaces.tobago.renderkit.RendererBase;
import org.apache.myfaces.tobago.renderkit.css.BootstrapClass;
+import org.apache.myfaces.tobago.renderkit.css.Classes;
+import org.apache.myfaces.tobago.renderkit.html.HtmlAttributes;
import org.apache.myfaces.tobago.renderkit.html.HtmlElements;
import org.apache.myfaces.tobago.renderkit.html.util.HtmlRendererUtils;
import org.apache.myfaces.tobago.webapp.TobagoResponseWriter;
@@ -40,15 +42,15 @@ public class HeaderRenderer extends Rend
writer.writeIdAttribute(component.getClientId(facesContext));
// TBD: NAVBAR_DARK and BG_INVERSE should not be the default
// TBD: how to configure it when it is needed, with customClass, or with markup?
- writer.writeClassAttribute(BootstrapClass.NAVBAR, /*BootstrapClass.NAVBAR_DARK, BootstrapClass.BG_INVERSE,*/
- header.isFixed() ? BootstrapClass.NAVBAR_FIXED_TOP : null);
+ writer.writeClassAttribute(
+ Classes.create(header),
+ BootstrapClass.NAVBAR, /*BootstrapClass.NAVBAR_DARK, BootstrapClass.BG_INVERSE,*/
+ header.isFixed() ? BootstrapClass.NAVBAR_FIXED_TOP : null,
+ header.getCustomClass());
// TBD: should NAVBAR class be in the NavRenderer?
-
-/*
- if (header.isFixed()) {
- writer.writeClassAttribute(BootstrapClass.NAVBAR_FIXED_TOP);
- }
-*/
+ writer.writeAttribute(HtmlAttributes.TITLE, header.getTip(), true);
+ writer.writeStyleAttribute(header.getStyle());
+// HtmlRendererUtils.writeDataAttributes(facesContext, writer, header);
}
@Override