myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lof...@apache.org
Subject svn commit: r1644355 - in /myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-bootstrap/src/main: java/org/apache/myfaces/tobago/renderkit/html/bootstrap/ java/org/apache/myfaces/tobago/renderkit/html/bootstrap/standard/tag/ resources/org/a...
Date Wed, 10 Dec 2014 09:24:48 GMT
Author: lofwyr
Date: Wed Dec 10 09:24:47 2014
New Revision: 1644355

URL: http://svn.apache.org/r1644355
Log:
TOBAGO-1368: Create a new theme which uses Bootstrap

Added:
    myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-bootstrap/src/main/java/org/apache/myfaces/tobago/renderkit/html/bootstrap/BootstrapClass.java
Modified:
    myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-bootstrap/src/main/java/org/apache/myfaces/tobago/renderkit/html/bootstrap/standard/tag/PageRenderer.java
    myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-bootstrap/src/main/java/org/apache/myfaces/tobago/renderkit/html/bootstrap/standard/tag/ToolBarRenderer.java
    myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-bootstrap/src/main/resources/org/apache/myfaces/tobago/renderkit/html/bootstrap/standard/style/tobago.css

Added: myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-bootstrap/src/main/java/org/apache/myfaces/tobago/renderkit/html/bootstrap/BootstrapClass.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-bootstrap/src/main/java/org/apache/myfaces/tobago/renderkit/html/bootstrap/BootstrapClass.java?rev=1644355&view=auto
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-bootstrap/src/main/java/org/apache/myfaces/tobago/renderkit/html/bootstrap/BootstrapClass.java
(added)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-bootstrap/src/main/java/org/apache/myfaces/tobago/renderkit/html/bootstrap/BootstrapClass.java
Wed Dec 10 09:24:47 2014
@@ -0,0 +1,40 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.myfaces.tobago.renderkit.html.bootstrap;
+
+/**
+ * @since 3.0.0
+ */
+public enum BootstrapClass {
+
+    CONTAINER("container"),
+    CONTAINER_FLUID("container-fluid");
+
+    private final String name;
+
+    private BootstrapClass(final String name) {
+        this.name = name;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+}

Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-bootstrap/src/main/java/org/apache/myfaces/tobago/renderkit/html/bootstrap/standard/tag/PageRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-bootstrap/src/main/java/org/apache/myfaces/tobago/renderkit/html/bootstrap/standard/tag/PageRenderer.java?rev=1644355&r1=1644354&r2=1644355&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-bootstrap/src/main/java/org/apache/myfaces/tobago/renderkit/html/bootstrap/standard/tag/PageRenderer.java
(original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-bootstrap/src/main/java/org/apache/myfaces/tobago/renderkit/html/bootstrap/standard/tag/PageRenderer.java
Wed Dec 10 09:24:47 2014
@@ -19,6 +19,7 @@
 package org.apache.myfaces.tobago.renderkit.html.bootstrap.standard.tag;
 
 import org.apache.myfaces.tobago.component.SupportsCss;
+import org.apache.myfaces.tobago.renderkit.html.bootstrap.BootstrapClass;
 
 import javax.faces.component.UIComponent;
 import javax.faces.context.FacesContext;
@@ -32,6 +33,6 @@ public class PageRenderer extends org.ap
     super.prepareRender(facesContext, component);
 
     SupportsCss css = (SupportsCss) component;
-    css.getCurrentCss().add("container");
+    css.getCurrentCss().add(BootstrapClass.CONTAINER_FLUID.getName());
   }
 }

Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-bootstrap/src/main/java/org/apache/myfaces/tobago/renderkit/html/bootstrap/standard/tag/ToolBarRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-bootstrap/src/main/java/org/apache/myfaces/tobago/renderkit/html/bootstrap/standard/tag/ToolBarRenderer.java?rev=1644355&r1=1644354&r2=1644355&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-bootstrap/src/main/java/org/apache/myfaces/tobago/renderkit/html/bootstrap/standard/tag/ToolBarRenderer.java
(original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-bootstrap/src/main/java/org/apache/myfaces/tobago/renderkit/html/bootstrap/standard/tag/ToolBarRenderer.java
Wed Dec 10 09:24:47 2014
@@ -25,6 +25,7 @@ import org.apache.myfaces.tobago.renderk
 import org.apache.myfaces.tobago.renderkit.html.HtmlButtonTypes;
 import org.apache.myfaces.tobago.renderkit.html.HtmlElements;
 import org.apache.myfaces.tobago.renderkit.html.HtmlRoleValues;
+import org.apache.myfaces.tobago.renderkit.html.bootstrap.BootstrapClass;
 import org.apache.myfaces.tobago.renderkit.html.util.HtmlRendererUtils;
 import org.apache.myfaces.tobago.webapp.TobagoResponseWriter;
 import org.slf4j.Logger;
@@ -48,7 +49,7 @@ public class ToolBarRenderer extends Lay
     writer.writeAttribute(HtmlAttributes.ROLE, HtmlRoleValues.NAVIGATION.toString(), false);
 
     writer.startElement(HtmlElements.DIV, toolBar);
-    writer.writeClassAttribute("container-fluid");
+    writer.writeClassAttribute(BootstrapClass.CONTAINER_FLUID.getName());
 
 //    Brand and toggle get grouped for better mobile display
     writer.startElement(HtmlElements.DIV);

Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-bootstrap/src/main/resources/org/apache/myfaces/tobago/renderkit/html/bootstrap/standard/style/tobago.css
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-bootstrap/src/main/resources/org/apache/myfaces/tobago/renderkit/html/bootstrap/standard/style/tobago.css?rev=1644355&r1=1644354&r2=1644355&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-bootstrap/src/main/resources/org/apache/myfaces/tobago/renderkit/html/bootstrap/standard/style/tobago.css
(original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-bootstrap/src/main/resources/org/apache/myfaces/tobago/renderkit/html/bootstrap/standard/style/tobago.css
Wed Dec 10 09:24:47 2014
@@ -60,6 +60,10 @@ fixes missing space, I thinks normal Web
     margin-left: 0;
 }
 
+.tobago-label {
+  width: 155px;
+}
+
 .tobago-sheet-pagingOuter {
   margin: 20px 0;
 }



Mime
View raw message