myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hno...@apache.org
Subject svn commit: r1790153 - in /myfaces/tobago/branches/TOBAGO-1719: tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/ tobago-core/src/main/resources/scss/ tobago-example/tobago-example-demo/src/main/webapp/content/20-componen...
Date Tue, 04 Apr 2017 18:11:47 GMT
Author: hnoeth
Date: Tue Apr  4 18:11:47 2017
New Revision: 1790153

URL: http://svn.apache.org/viewvc?rev=1790153&view=rev
Log:
TOBAGO-1719 Update Bootstrap to 4.0.0 alpha 6 (from alpha 5)
* <tc:box> is more bootstrap-like
* workaround for popup: https://github.com/twbs/bootstrap/issues/21607
* remove CSS class 'navbar' from <tc:header>
* fix checkstyle error on BootstrapClassUnitTest

Modified:
    myfaces/tobago/branches/TOBAGO-1719/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/BoxRenderer.java
    myfaces/tobago/branches/TOBAGO-1719/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/HeaderRenderer.java
    myfaces/tobago/branches/TOBAGO-1719/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/PopupRenderer.java
    myfaces/tobago/branches/TOBAGO-1719/tobago-core/src/main/resources/scss/_tobago.scss
    myfaces/tobago/branches/TOBAGO-1719/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/050-container/10-box/box.xhtml
    myfaces/tobago/branches/TOBAGO-1719/tobago-theme/tobago-theme-standard/src/test/java/org/apache/myfaces/tobago/renderkit/css/BootstrapClassUnitTest.java

Modified: myfaces/tobago/branches/TOBAGO-1719/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/BoxRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/TOBAGO-1719/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/BoxRenderer.java?rev=1790153&r1=1790152&r2=1790153&view=diff
==============================================================================
--- myfaces/tobago/branches/TOBAGO-1719/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/BoxRenderer.java
(original)
+++ myfaces/tobago/branches/TOBAGO-1719/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/BoxRenderer.java
Tue Apr  4 18:11:47 2017
@@ -69,9 +69,7 @@ public class BoxRenderer extends PanelRe
 
     if (label != null || labelString != null || bar != null) {
       writer.startElement(HtmlElements.DIV);
-      writer.writeClassAttribute(BootstrapClass.CARD_HEADER);
-      writer.startElement(HtmlElements.DIV);
-      writer.writeClassAttribute(TobagoClass.BOX__HEADER);
+      writer.writeClassAttribute(BootstrapClass.CARD_HEADER, TobagoClass.BOX__HEADER);
 
       writer.startElement(HtmlElements.H3);
       if (labelString != null) {
@@ -81,13 +79,11 @@ public class BoxRenderer extends PanelRe
         RenderUtils.encode(facesContext, label);
       }
       writer.endElement(HtmlElements.H3);
-
       if (bar != null) {
         RenderUtils.encode(facesContext, bar);
       }
 
       writer.endElement(HtmlElements.DIV);
-      writer.endElement(HtmlElements.DIV);
     }
 
     writer.startElement(HtmlElements.DIV);
@@ -100,5 +96,4 @@ public class BoxRenderer extends PanelRe
     writer.endElement(HtmlElements.DIV);
     writer.endElement(HtmlElements.DIV);
   }
-
 }

Modified: myfaces/tobago/branches/TOBAGO-1719/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/HeaderRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/TOBAGO-1719/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/HeaderRenderer.java?rev=1790153&r1=1790152&r2=1790153&view=diff
==============================================================================
--- myfaces/tobago/branches/TOBAGO-1719/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/HeaderRenderer.java
(original)
+++ myfaces/tobago/branches/TOBAGO-1719/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/HeaderRenderer.java
Tue Apr  4 18:11:47 2017
@@ -44,7 +44,6 @@ public class HeaderRenderer extends Rend
     // TBD: how to configure it when it is needed, with customClass, or with markup?
     writer.writeClassAttribute(
         Classes.create(header),
-        BootstrapClass.NAVBAR, /*BootstrapClass.NAVBAR_DARK, BootstrapClass.BG_INVERSE,*/
         header.isFixed() ? BootstrapClass.FIXED_TOP : null,
         header.getCustomClass());
 // TBD: should NAVBAR class be in the LinksRenderer?

Modified: myfaces/tobago/branches/TOBAGO-1719/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/PopupRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/TOBAGO-1719/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/PopupRenderer.java?rev=1790153&r1=1790152&r2=1790153&view=diff
==============================================================================
--- myfaces/tobago/branches/TOBAGO-1719/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/PopupRenderer.java
(original)
+++ myfaces/tobago/branches/TOBAGO-1719/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/renderkit/renderer/PopupRenderer.java
Tue Apr  4 18:11:47 2017
@@ -52,7 +52,9 @@ public class PopupRenderer extends Panel
     writer.writeClassAttribute(
         Classes.create(popup),
         BootstrapClass.MODAL,
-        BootstrapClass.FADE,
+        //XXX fade class removed due to a bug in bootstrap-alpha6
+        //https://github.com/twbs/bootstrap/issues/21607
+        //BootstrapClass.FADE,
         popup.getCustomClass());
     writer.writeIdAttribute(clientId);
     writer.writeAttribute(HtmlAttributes.TABINDEX, -1);

Modified: myfaces/tobago/branches/TOBAGO-1719/tobago-core/src/main/resources/scss/_tobago.scss
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/TOBAGO-1719/tobago-core/src/main/resources/scss/_tobago.scss?rev=1790153&r1=1790152&r2=1790153&view=diff
==============================================================================
--- myfaces/tobago/branches/TOBAGO-1719/tobago-core/src/main/resources/scss/_tobago.scss (original)
+++ myfaces/tobago/branches/TOBAGO-1719/tobago-core/src/main/resources/scss/_tobago.scss Tue
Apr  4 18:11:47 2017
@@ -54,12 +54,28 @@ Todo: check, if this is needed? (It does
 
 /* box -------------------------------------------------------------- */
 
+.tobago-box {
+  margin-bottom: $card-spacer-y;
+}
+
 .tobago-box-header {
   display: flex;
   justify-content: space-between;
   align-content: center;
 }
 
+.card-header {
+
+  > h3:first-child {
+    margin-bottom: 0;
+    align-self: center;
+  }
+
+  .navbar {
+    padding: 0;
+  }
+}
+
 /* button -------------------------------------------------------------- */
 
 /* XXX fixes a problem with image in button inside a segmentLayout (with FF40 and IE11)

Modified: myfaces/tobago/branches/TOBAGO-1719/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/050-container/10-box/box.xhtml
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/TOBAGO-1719/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/050-container/10-box/box.xhtml?rev=1790153&r1=1790152&r2=1790153&view=diff
==============================================================================
--- myfaces/tobago/branches/TOBAGO-1719/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/050-container/10-box/box.xhtml
(original)
+++ myfaces/tobago/branches/TOBAGO-1719/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/050-container/10-box/box.xhtml
Tue Apr  4 18:11:47 2017
@@ -21,16 +21,25 @@
                 xmlns="http://www.w3.org/1999/xhtml"
                 xmlns:tc="http://myfaces.apache.org/tobago/component"
                 xmlns:ui="http://java.sun.com/jsf/facelets"
-                xmlns:f="http://java.sun.com/jsf/core">
+                xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html">
   <ui:param name="title" value="#{demoBundle.box} &lt;tc:box>"/>
   <p>A content box is created with <code class="language-markup">&lt;tc:box/></code>.</p>
   <tc:link label="Tag Library Documentation" image="#{request.contextPath}/image/feather-leaf.png"
            link="#{demoBundle.tagDocUrl}/#{info.stableVersion}/tld/tc/box.html"/>
   <tc:section label="Basics">
-    <p>The title of the box is set by the <code>label</code> attribute.</p>
+    <p>The title of the box is set by the <code>label</code> attribute
or with
+      <code class="language-markup">&lt;f:facet name="label"></code>.</p>
     <pre><code class="language-markup">&lt;tc:box label="Box">Content&lt;/tc:box></code></pre>
-    <tc:box id="b1" label="Box">Content</tc:box>
-    <tc:box>Contentbox without a title.</tc:box>
+    <tc:box id="labelAttrBox" label="Box">
+      Title set by <code>label</code> attribute.
+    </tc:box>
+    <tc:box id="labelFacetBox">
+      <f:facet name="label">
+        <h:outputText value="#{outController.html}" escape="false"/>
+      </f:facet>
+      Title set by <code class="language-markup">&lt;f:facet name="label"></code>.
+    </tc:box>
+    <tc:box id="noTitleBox">Contentbox without a title.</tc:box>
   </tc:section>
 
   <tc:section label="Collapse/Expand">
@@ -47,17 +56,16 @@
     <p>It's possible to add a bar to the header of a content box. For that, the content
box must contain the tag
       <code class="language-markup">&lt;f:facet name="bar"></code>. The
facet may contain
       <code class="language-markup">&lt;tc:bar></code> or other suitable
tags.</p>
-    <tc:box>
-      <f:facet name="label">
-        Label
-      </f:facet>
+    <tc:box label="Title">
       <f:facet name="bar">
-        <tc:buttons>
-          <tc:button label="Button 1"/>
-          <tc:button label="Button 2"/>
-        </tc:buttons>
+        <tc:bar>
+          <tc:buttons>
+            <tc:button label="Left"/>
+            <tc:button label="Right"/>
+          </tc:buttons>
+        </tc:bar>
       </f:facet>
-      Content
+      Box with <code class="language-markup">&lt;f:facet name="bar"></code>.
     </tc:box>
   </tc:section>
 </ui:composition>

Modified: myfaces/tobago/branches/TOBAGO-1719/tobago-theme/tobago-theme-standard/src/test/java/org/apache/myfaces/tobago/renderkit/css/BootstrapClassUnitTest.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/TOBAGO-1719/tobago-theme/tobago-theme-standard/src/test/java/org/apache/myfaces/tobago/renderkit/css/BootstrapClassUnitTest.java?rev=1790153&r1=1790152&r2=1790153&view=diff
==============================================================================
--- myfaces/tobago/branches/TOBAGO-1719/tobago-theme/tobago-theme-standard/src/test/java/org/apache/myfaces/tobago/renderkit/css/BootstrapClassUnitTest.java
(original)
+++ myfaces/tobago/branches/TOBAGO-1719/tobago-theme/tobago-theme-standard/src/test/java/org/apache/myfaces/tobago/renderkit/css/BootstrapClassUnitTest.java
Tue Apr  4 18:11:47 2017
@@ -32,7 +32,7 @@ import java.util.List;
  */
 public class BootstrapClassUnitTest {
 
-  private List<BootstrapClass> NOT = Arrays.asList(
+  private List<BootstrapClass> not = Arrays.asList(
       BootstrapClass.COL_XS_1,
       BootstrapClass.COL_XS_2,
       BootstrapClass.COL_XS_3,
@@ -58,7 +58,7 @@ public class BootstrapClassUnitTest {
     final BootstrapClass[] allValues = BootstrapClass.values();
     final List<BootstrapClass> toCheck = new ArrayList<BootstrapClass>();
     for (BootstrapClass value : allValues) {
-      if (!NOT.contains(value)) {
+      if (!not.contains(value)) {
         toCheck.add(value);
       }
     }



Mime
View raw message