myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lof...@apache.org
Subject svn commit: r1762674 - in /myfaces/tobago/trunk: tobago-core/src/main/java/org/apache/myfaces/tobago/context/ tobago-example/tobago-example-demo/src/main/webapp/content/20-component/080-sheet/ tobago-example/tobago-example-demo/src/main/webapp/content/...
Date Wed, 28 Sep 2016 14:40:30 GMT
Author: lofwyr
Date: Wed Sep 28 14:40:30 2016
New Revision: 1762674

URL: http://svn.apache.org/viewvc?rev=1762674&view=rev
Log:
TOBAGO-1368: The standard theme will use Bootstrap
* optimize height of rows

Modified:
    myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/context/Markup.java
    myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/080-sheet/10-sort/sheet-sorting.xhtml
    myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/080-sheet/20-selector/sheet-column-selector.xhtml
    myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/080-sheet/35-markup/sheet-markup.xhtml
    myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/080-sheet/80-editable/sheet-editable.xhtml
    myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/080-sheet/sheet.xhtml
    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/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SheetRenderer.java
    myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/META-INF/tobago-config.xml
    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-core/src/main/java/org/apache/myfaces/tobago/context/Markup.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/context/Markup.java?rev=1762674&r1=1762673&r2=1762674&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/context/Markup.java
(original)
+++ myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/context/Markup.java
Wed Sep 28 14:40:30 2016
@@ -89,7 +89,6 @@ public final class Markup implements Ser
   public static final Markup NUMBER = valueOf("number");
   public static final Markup ODD = valueOf("odd");
   public static final Markup PORTLET = valueOf("portlet");
-  public static final Markup PURE = valueOf("pure");
   public static final Markup READONLY = valueOf("readonly");
   public static final Markup REQUIRED = valueOf("required");
   public static final Markup RESIZABLE = valueOf("resizable");

Modified: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/080-sheet/10-sort/sheet-sorting.xhtml
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/080-sheet/10-sort/sheet-sorting.xhtml?rev=1762674&r1=1762673&r2=1762674&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/080-sheet/10-sort/sheet-sorting.xhtml
(original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/080-sheet/10-sort/sheet-sorting.xhtml
Wed Sep 28 14:40:30 2016
@@ -37,15 +37,15 @@
     <p>In this example, the <code>sortable</code> attribute is 'true' for
all columns.
       Notice, that there are negative periods.</p>
     <pre><code class="language-markup">&lt;tc:column label="Name" sortable="true"></code></pre>
-    <tc:sheet id="s1" value="#{sheetSortingController.solarList}" var="object" rows="4">
+    <tc:sheet id="s1" value="#{sheetSortingController.solarList}" var="object" rows="4"
markup="small">
       <tc:column label="Name" sortable="true">
-        <tc:out value="#{object.name}"/>
+        <tc:out value="#{object.name}" labelLayout="skip"/>
       </tc:column>
       <tc:column label="Period (Days)" sortable="true">
-        <tc:out value="#{object.period}"/>
+        <tc:out value="#{object.period}" labelLayout="skip"/>
       </tc:column>
       <tc:column label="Discovery Year" sortable="true">
-        <tc:out value="#{object.discoverYear}"/>
+        <tc:out value="#{object.discoverYear}" labelLayout="skip"/>
       </tc:column>
     </tc:sheet>
   </tc:section>
@@ -62,15 +62,15 @@
     </code></pre>
 
     <tc:sheet id="s2" value="#{sheetSortingController.solarList}" var="object" rows="4"
-              sortActionListener="#{sheetSortingController.sheetSorter}">
+              sortActionListener="#{sheetSortingController.sheetSorter}" markup="small">
       <tc:column id="namecol" label="Name" sortable="true">
-        <tc:out value="#{object.name}"/>
+        <tc:out value="#{object.name}" labelLayout="skip"/>
       </tc:column>
       <tc:column id="periodcol" label="Period (Days)" sortable="true">
-        <tc:out value="#{object.period}"/>
+        <tc:out value="#{object.period}" labelLayout="skip"/>
       </tc:column>
       <tc:column id="yearcol" label="Discovery Year" sortable="true">
-        <tc:out value="#{object.discoverYear}"/>
+        <tc:out value="#{object.discoverYear}" labelLayout="skip"/>
       </tc:column>
     </tc:sheet>
   </tc:section>

Modified: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/080-sheet/20-selector/sheet-column-selector.xhtml
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/080-sheet/20-selector/sheet-column-selector.xhtml?rev=1762674&r1=1762673&r2=1762674&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/080-sheet/20-selector/sheet-column-selector.xhtml
(original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/080-sheet/20-selector/sheet-column-selector.xhtml
Wed Sep 28 14:40:30 2016
@@ -47,19 +47,19 @@
               selectable="singleOrNone" state="#{sheetController.sheetState}">
       <tc:columnSelector/>
       <tc:column label="Name">
-        <tc:out value="#{object.name}"/>
+        <tc:in value="#{object.name}" labelLayout="skip"/>
       </tc:column>
       <tc:column label="Orbit">
-        <tc:out value="#{object.orbit}"/>
+        <tc:out value="#{object.orbit}" labelLayout="skip"/>
       </tc:column>
       <tc:column label="Period (Days)">
-        <tc:out value="#{object.period}"/>
+        <tc:out value="#{object.period}" labelLayout="skip"/>
       </tc:column>
       <tc:column label="Discoverer">
-        <tc:out value="#{object.discoverer}"/>
+        <tc:out value="#{object.discoverer}" labelLayout="skip"/>
       </tc:column>
       <tc:column label="Year">
-        <tc:out value="#{object.discoverYear}"/>
+        <tc:out value="#{object.discoverYear}" labelLayout="skip"/>
       </tc:column>
     </tc:sheet>
 

Modified: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/080-sheet/35-markup/sheet-markup.xhtml
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/080-sheet/35-markup/sheet-markup.xhtml?rev=1762674&r1=1762673&r2=1762674&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/080-sheet/35-markup/sheet-markup.xhtml
(original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/080-sheet/35-markup/sheet-markup.xhtml
Wed Sep 28 14:40:30 2016
@@ -50,19 +50,19 @@
     <tc:sheet markup="#{sheetController.markup}" value="#{sheetController.solarList}"
var="object" rows="4"
               columns="#{sheetController.automaticLayout ? null : '*;*;*;*;*'}">
       <tc:column label="Name">
-        <tc:out value="#{object.name}"/>
+        <tc:out value="#{object.name}" labelLayout="skip"/>
       </tc:column>
       <tc:column label="Orbit">
-        <tc:out value="#{object.orbit}"/>
+        <tc:out value="#{object.orbit}" labelLayout="skip"/>
       </tc:column>
       <tc:column label="Period (Days)">
-        <tc:out value="#{object.period}"/>
+        <tc:out value="#{object.period}" labelLayout="skip"/>
       </tc:column>
       <tc:column label="Discoverer">
-        <tc:out value="#{object.discoverer}"/>
+        <tc:out value="#{object.discoverer}" labelLayout="skip"/>
       </tc:column>
       <tc:column label="Year">
-        <tc:out value="#{object.discoverYear}"/>
+        <tc:out value="#{object.discoverYear}" labelLayout="skip"/>
       </tc:column>
     </tc:sheet>
   </tc:section>

Modified: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/080-sheet/80-editable/sheet-editable.xhtml
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/080-sheet/80-editable/sheet-editable.xhtml?rev=1762674&r1=1762673&r2=1762674&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/080-sheet/80-editable/sheet-editable.xhtml
(original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/080-sheet/80-editable/sheet-editable.xhtml
Wed Sep 28 14:40:30 2016
@@ -36,21 +36,21 @@
       'Result' section.</p>
     <tc:sheet id="editSheet" value="#{sheetController.solarList}" var="object" rows="5">
       <tc:column label="Name">
-        <tc:in id="nameCol" value="#{object.name}">
+        <tc:in id="nameCol" value="#{object.name}" labelLayout="skip">
           <f:ajax execute="nameCol" render="resultSheet"/>
         </tc:in>
       </tc:column>
       <tc:column label="Orbit">
-        <tc:in value="#{object.orbit}"/>
+        <tc:in value="#{object.orbit}" labelLayout="skip"/>
       </tc:column>
       <tc:column label="Period (Days)">
-        <tc:in value="#{object.period}"/>
+        <tc:in value="#{object.period}" labelLayout="skip"/>
       </tc:column>
       <tc:column label="Discoverer">
-        <tc:in value="#{object.discoverer}"/>
+        <tc:in value="#{object.discoverer}" labelLayout="skip"/>
       </tc:column>
       <tc:column label="Year">
-        <tc:date value="#{object.discoverYear}" converter="#{sheetController.yearConverter}"/>
+        <tc:date value="#{object.discoverYear}" converter="#{sheetController.yearConverter}"
labelLayout="skip"/>
       </tc:column>
     </tc:sheet>
     <tc:button label="Submit">

Modified: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/080-sheet/sheet.xhtml
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/080-sheet/sheet.xhtml?rev=1762674&r1=1762673&r2=1762674&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/080-sheet/sheet.xhtml
(original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/080-sheet/sheet.xhtml
Wed Sep 28 14:40:30 2016
@@ -47,19 +47,19 @@
     <tc:sheet id="s1" value="#{sheetController.solarList}" var="object" rows="4">
       <tc:style maxHeight="500px"/>
       <tc:column label="Name">
-        <tc:out value="#{object.name}"/>
+        <tc:out value="#{object.name}" labelLayout="skip"/>
       </tc:column>
       <tc:column label="Orbit">
-        <tc:out value="#{object.orbit}"/>
+        <tc:out value="#{object.orbit}" labelLayout="skip"/>
       </tc:column>
       <tc:column label="Period (Days)">
-        <tc:out value="#{object.period}"/>
+        <tc:out value="#{object.period}" labelLayout="skip"/>
       </tc:column>
       <tc:column label="Discoverer">
-        <tc:out value="#{object.discoverer}"/>
+        <tc:out value="#{object.discoverer}" labelLayout="skip"/>
       </tc:column>
       <tc:column label="Year">
-        <tc:out value="#{object.discoverYear}"/>
+        <tc:out value="#{object.discoverYear}" labelLayout="skip"/>
       </tc:column>
     </tc:sheet>
   </tc:section>

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=1762674&r1=1762673&r2=1762674&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 Sep 28 14:40:30 2016
@@ -110,6 +110,9 @@ public abstract class LabelLayoutRendere
     final LabelLayout labelLayout = getType(component);
     final CssItem divClass;
     switch (labelLayout) {
+      case skip:
+        // skip rendering the surrounding element
+        return;
       case flexLeft:
       case flexRight:
         divClass = TobagoClass.FLEX_LAYOUT;
@@ -174,6 +177,8 @@ public abstract class LabelLayoutRendere
     final LabelLayout labelLayout = getType(component);
 
     switch (labelLayout) {
+      case skip:
+        return;
       case flexRight:
       case flowRight:
         encodeLabel(component, writer, labelLayout);

Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SheetRenderer.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/SheetRenderer.java?rev=1762674&r1=1762673&r2=1762674&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SheetRenderer.java
(original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SheetRenderer.java
Wed Sep 28 14:40:30 2016
@@ -21,11 +21,11 @@ package org.apache.myfaces.tobago.render
 
 import org.apache.myfaces.tobago.component.Attributes;
 import org.apache.myfaces.tobago.component.Facets;
+import org.apache.myfaces.tobago.component.LabelLayout;
 import org.apache.myfaces.tobago.component.RendererTypes;
 import org.apache.myfaces.tobago.component.UIColumnEvent;
 import org.apache.myfaces.tobago.component.UIColumnSelector;
 import org.apache.myfaces.tobago.component.UICommand;
-import org.apache.myfaces.tobago.component.UILink;
 import org.apache.myfaces.tobago.component.UIOut;
 import org.apache.myfaces.tobago.component.UIPanel;
 import org.apache.myfaces.tobago.component.UIReload;
@@ -177,6 +177,7 @@ public class SheetRenderer extends Rende
           } else {
             out.setRendered(ComponentUtils.getBooleanAttribute(column, Attributes.rendered));
           }
+          out.setLabelLayout(LabelLayout.skip);
           header.getChildren().add(out);
         }
         i++;
@@ -426,9 +427,6 @@ public class SheetRenderer extends Rende
           if (rowActionId != null) {
             markup = markup.add(Markup.CLICKABLE);
           }
-          if (isPure(column)) {
-            markup = markup.add(Markup.PURE);
-          }
           markup = markup.add(getMarkupForAlign(column));
           writer.writeClassAttribute(Classes.create(sheet, "cell", markup));
 
@@ -767,7 +765,6 @@ public class SheetRenderer extends Rende
           }
 
           final UIComponent cellComponent = cell.getComponent();
-          final boolean pure = !(cellComponent instanceof UIOut);
 
           writer.startElement(HtmlElements.DIV);
           final CssItem align;
@@ -842,9 +839,6 @@ public class SheetRenderer extends Rende
             }
           }
 
-          if (pure) {
-            markup = markup.add(Markup.PURE);
-          }
           writer.writeClassAttribute(Classes.create(sheet, "header", markup));
           writer.writeAttribute(HtmlAttributes.TITLE, tip, true);
 
@@ -948,23 +942,6 @@ public class SheetRenderer extends Rende
     writer.endElement(HtmlElements.COL);
   }
 
-  /**
-   * Differ between simple content and complex content.
-   * Decide if the content of a cell needs usually the whole possible space or
-   * is the character of the content like flowing text.
-   * In the second case, the style usually sets a padding.<br/>
-   * Pure is needed for &lt;tc:panel>,  &lt;tc:in>, etc.<br/>
-   * Pure is not needed for  &lt;tc:out> and &lt;tc:link>
-   */
-  private boolean isPure(final UIColumn column) {
-    for (final UIComponent child : column.getChildren()) {
-      if (!(child instanceof UIOut) && !(child instanceof UILink)) {
-        return true;
-      }
-    }
-    return false;
-  }
-
   private Markup markupForLeftCenterRight(final ShowPosition position) {
     switch (position) {
       case left:

Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/META-INF/tobago-config.xml
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/META-INF/tobago-config.xml?rev=1762674&r1=1762673&r2=1762674&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/META-INF/tobago-config.xml
(original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/resources/META-INF/tobago-config.xml
Wed Sep 28 14:40:30 2016
@@ -53,13 +53,6 @@
           </supported-markup>
         </renderer>
         <renderer>
-          <name>Column</name>
-          <supported-markup>
-            <!-- XXX needed for "cell", is here to ignore the warning -->
-            <markup>pure</markup>
-          </supported-markup>
-        </renderer>
-        <renderer>
           <name>Command</name>
           <supported-markup>
             <markup>disabled</markup>
@@ -272,7 +265,6 @@
             <markup>clickable</markup>
             <markup>filler</markup>
             <markup>first</markup>
-            <markup>pure</markup>
             <!-- internal: for the paging fields -->
             <markup>left</markup>
             <markup>center</markup>

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=1762674&r1=1762673&r2=1762674&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 Sep 28 14:40:30 2016
@@ -610,11 +610,6 @@ p.tobago-separator:after {
   cursor: pointer;
 }
 
-table.tobago-sheet-headerTable>tbody>tr>th,
-table.tobago-sheet-bodyTable>tbody>tr>td {
-  padding: 0;
-}
-
 .tobago-sheet-body {
   overflow-y: auto;
   flex: 1 1 auto;
@@ -642,10 +637,6 @@ table.tobago-sheet-bodyTable>tbody>tr>td
   cursor: col-resize;
 }
 
-.tobago-sheet-cell > .form-group {
-  margin-bottom: 0;
-}
-
 /* suggest ---------------------------------------------------------------------- */
 
 .tobago-suggest {



Mime
View raw message