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/06/02 06:00:54 UTC

svn commit: r1746531 - in /myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main: java/org/apache/myfaces/tobago/renderkit/css/ java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/ resources/org/apache/myfaces/tobago/renderki...

Author: lofwyr
Date: Thu Jun  2 06:00:54 2016
New Revision: 1746531

URL: http://svn.apache.org/viewvc?rev=1746531&view=rev
Log:
TOBAGO-1529: Navbar, Toolbar, Menu, etc. for Bootstrap
* "bar" facet for tc:section

Modified:
    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/SectionRenderer.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-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=1746531&r1=1746530&r2=1746531&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 Thu Jun  2 06:00:54 2016
@@ -49,6 +49,7 @@ public enum TobagoClass implements CssIt
   MESSAGES("tobago-messages"),
   PANEL("tobago-panel"),
   POPUP("tobago-popup"),
+  SECTION__HEADER("tobago-section-header"),
   SHEET__PAGING_INPUT("tobago-sheet-pagingInput"),
   SHEET__PAGING_OUTPUT("tobago-sheet-pagingOutput"),
   SUGGEST("tobago-suggest");

Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SectionRenderer.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/SectionRenderer.java?rev=1746531&r1=1746530&r2=1746531&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SectionRenderer.java (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SectionRenderer.java Thu Jun  2 06:00:54 2016
@@ -19,11 +19,15 @@
 
 package org.apache.myfaces.tobago.renderkit.html.standard.standard.tag;
 
+import org.apache.myfaces.tobago.component.Facets;
 import org.apache.myfaces.tobago.component.UISection;
 import org.apache.myfaces.tobago.renderkit.RendererBase;
 import org.apache.myfaces.tobago.renderkit.css.Classes;
+import org.apache.myfaces.tobago.renderkit.css.TobagoClass;
 import org.apache.myfaces.tobago.renderkit.html.HtmlElements;
 import org.apache.myfaces.tobago.renderkit.html.util.HtmlRendererUtils;
+import org.apache.myfaces.tobago.renderkit.util.RenderUtils;
+import org.apache.myfaces.tobago.util.ComponentUtils;
 import org.apache.myfaces.tobago.webapp.TobagoResponseWriter;
 
 import javax.faces.component.UIComponent;
@@ -65,10 +69,19 @@ public class SectionRenderer extends Ren
                 tag = HtmlElements.H6;
         }
 
+        writer.startElement(HtmlElements.DIV);
+        writer.writeClassAttribute(TobagoClass.SECTION__HEADER);
         writer.startElement(tag);
         final String image = section.getImage();
         HtmlRendererUtils.encodeIconWithLabel(writer, image, label);
         writer.endElement(tag);
+
+        final UIComponent bar = ComponentUtils.getFacet(section, Facets.bar);
+        if (bar != null) {
+            RenderUtils.encode(facesContext, bar);
+        }
+
+        writer.endElement(HtmlElements.DIV);
     }
 
     @Override

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=1746531&r1=1746530&r2=1746531&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 Thu Jun  2 06:00:54 2016
@@ -339,6 +339,12 @@ h6 > .fa:first-child {
   margin-right: 0.7em;
 }
 
+.tobago-section-header {
+  display: flex;
+  justify-content: space-between;
+  align-content: center;
+}
+
 /* selectBooleanCheckbox ----------------------------------------------- */
 .tobago-selectBooleanCheckbox input {
   margin-right: 6px;