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 2014/01/14 09:38:42 UTC

svn commit: r1557970 - in /myfaces/tobago/branches/tobago-3.0.x: src/site/apt/ tobago-theme/tobago-theme-speyside/src/main/java/org/apache/myfaces/tobago/renderkit/html/speyside/standard/tag/ tobago-theme/tobago-theme-speyside/src/main/less/org/apache/...

Author: lofwyr
Date: Tue Jan 14 08:38:42 2014
New Revision: 1557970

URL: http://svn.apache.org/r1557970
Log:
TOBAGO-1358 - Using CSS box-sizing: border-box instead of content-box

Added:
    myfaces/tobago/branches/tobago-3.0.x/src/site/apt/migration-3.0.apt
      - copied, changed from r1557725, myfaces/tobago/branches/tobago-3.0.x/src/site/apt/migration-2.0.apt
Modified:
    myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-speyside/src/main/java/org/apache/myfaces/tobago/renderkit/html/speyside/standard/tag/BoxRenderer.java
    myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-speyside/src/main/less/org/apache/myfaces/tobago/renderkit/html/speyside/standard/style/tobago.less
    myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-speyside/src/main/resources/org/apache/myfaces/tobago/renderkit/html/speyside/standard/property/tobago-theme-config.properties

Copied: myfaces/tobago/branches/tobago-3.0.x/src/site/apt/migration-3.0.apt (from r1557725, myfaces/tobago/branches/tobago-3.0.x/src/site/apt/migration-2.0.apt)
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/src/site/apt/migration-3.0.apt?p2=myfaces/tobago/branches/tobago-3.0.x/src/site/apt/migration-3.0.apt&p1=myfaces/tobago/branches/tobago-3.0.x/src/site/apt/migration-2.0.apt&r1=1557725&r2=1557970&rev=1557970&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/src/site/apt/migration-2.0.apt (original)
+++ myfaces/tobago/branches/tobago-3.0.x/src/site/apt/migration-3.0.apt Tue Jan 14 08:38:42 2014
@@ -14,125 +14,9 @@
  ~~ limitations under the License.
 
  ------
- Migration from Tobago 1.5 to 2.0 (work in progress)
+ Migration from Tobago 2.0 to 3.0 (work in progress)
  ------
 
-Migration from Tobago 1.5 to 2.0 (work in progress)
+Migration from Tobago 2.0 to 3.0 (work in progress)
 
-   Tobago 2.0 has some API changes compared to Tobago 1.5.
-
-   The most changes are in the tree API, which is more easy to use, but also more flexible.
-
-Artifacts (JAR-Files)
-
-  The following JAR files are no longer needed. They have to be removed from the project
-  (depends on your build system).
-
-  * tobago-taglib-extension-\<version\>.jar
-
-  * tobago-facelets-\<version\>.jar
-
-CSP
-
-  Tobago supports Content Security Policy (CSP) to prevent cross-site
-  scripting (XSS) and related attacks.
-  Specification link http://www.w3.org/TR/CSP/
-  In short: The HTML page doesn't contain any JavaScript or CSS information.
-  All allowed sources for JavaScript, CSS and other resources have to be declared in special header.
-  If you have own renderers or own JavaScript in your application, this code also needs to support CSP, to use this feature.
-
-* Warning:
-
-  CSP requires a different handling of JavaScript and other resources.
-  If you use own JavaScript in the HTML page or including resources from other sites you may need to
-  adapt your application, (or turn this feature off).
-
-* Configuration
-
-  To add sites to the CSP headers, add <<<\<directive\>>>> tags to <<<\<content-security-policy\>>>> in
-  the <<<tobago-config.xml>>>.
-
-  To turn off CSP, add an empty <<<\<content-security-policy mode="off"\>>>> tag in the configuration.
-  For development, you may also use mode="report-only", which sets the appropriate header.
-
-Java-API
-
-   The class org.apache.myfaces.tobago.model.TreeState which has been deprecated in 1.5.x is
-   used in 2.0.x with a changed API. Please check the occurrences.
-
-   Class <<<org.apache.myfaces.tobago.component.UIFileInput>>> has been renamed to
-   <<<org.apache.myfaces.tobago.component.UIFile>>>.
-
-Facelets
-
-   Tobago 2.0.x is using Facelets 2.0. When still using Facelets 1.1 in the current application,
-   this must be removed:
-
-   * Remove facelets JAR (e.g. <<<jsf-facelets-1.1.14.jar>>>) from the library.
-
-   * Remove \<view-handler\>org.apache.myfaces.tobago.internal.application.ViewHandlerImpl\</view-handler\> from the faces-config.xml file.
-
-   * Remove the parameter <<<javax.faces.DISABLE_FACELET_JSF_VIEWHANDLER>>> from the <<<web.xml>>> file.
-
-   * Remove or replace the <<<facelets.*>>> entries from the <<<web.xml>>> file.
-
-   * Rename all JSTL declarations from <<<xmlns:c="http://java.sun.com/jstl/core">>> to <<<xmlns:c="http://java.sun.com/jsp/jstl/core">>> in the Facelets.
-
-   * Ensure the version of the faces-config tag in the faces-config.xml is at least 2.0.
-
-   []
-
-Deprecated
-
-   There are also <<<...@Deprecated>>> annotations in the code and some
-   logging warning when using deprecated code via the <<<Deprecation>>> logging category.
-   Before and after migrating you should check your application about that.
-
-   For the migration phase you may add the tobago-deprecation.jar as dependency to your project. It contains classes
-   that has been moved (e. g. to the new internal package) or removed. So you can resolve any migration steps step by
-   step. It is not recommended to use the tobago-deprecation.jar for production.
-
-Internal
-
-   The package <<<org.apache.myfaces.tobago.internal>>> contains classes that should not be used directly in an application.
-   This classes may change in minor revisions without announcement. Classes in the package <<<org.apache.myfaces.tobago.renderkit>>>
-   are handled in the same manner.
-
-Tag Library
-
-  The main changes in the tag library are
-
-  TODO: What has changed with the tree?
-  The Tree now extends a UIData.
-  The tc:treeData tag should longer used.
-  The tc:treeNode has no longer the attributes: "selected", "expanded", "marked", "treeMarkedListener", "treeExpansionListener"
-
-
-  Deprecated facets "resizeAction" and "menupopup" was removed.
-
-Configuration
-
-  To define an own theme, please use now a file tobago-config.xml instead of tobago-theme.xml.
-  The content of tobago-theme.xml is a subset of the tobago-config.xml, you have only to
-  change the root node.
-
-  Please use the tobago-config-2.0.xsd to validate the configuration.
-
-JavaScript
-
-  Date/Time/Calendar components: The JavaScript for this components has been refactored.
-  All method have now a namespace and are using jQuery.
-  JavaScript code has been removed from the renderers.
-  For data the HTML5 data attribute is used instead of directly coding it into the event handler, or using
-  hidden input fields.
-
-CSS
-
-  The class <<<tobago-sheet-outer>>> is renamed to <<<tobago-sheet>>>.
-  The class <<<tobago-sheet-headerSpacerOuter>>> is renamed to <<<tobago-sheet-headerResize>>>.
-  The class <<<tobago-sheet-headerSpacer>>> is no longer needed.
-  The class <<<tobago-sheet-headerSpacer-markup-resizable>>> is no longer needed.
-
-Internal
-
-  The facet name of the picker popup is now named "popup" instead of "pickerPopup".
+  CSS: box-sizing: changed from content-box to border-box

Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-speyside/src/main/java/org/apache/myfaces/tobago/renderkit/html/speyside/standard/tag/BoxRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-speyside/src/main/java/org/apache/myfaces/tobago/renderkit/html/speyside/standard/tag/BoxRenderer.java?rev=1557970&r1=1557969&r2=1557970&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-speyside/src/main/java/org/apache/myfaces/tobago/renderkit/html/speyside/standard/tag/BoxRenderer.java (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-speyside/src/main/java/org/apache/myfaces/tobago/renderkit/html/speyside/standard/tag/BoxRenderer.java Tue Jan 14 08:38:42 2014
@@ -44,12 +44,10 @@ public class BoxRenderer extends BoxRend
   /*
   
 with shadow
-  
+
 <div class="tobago-box" style="width: 100px; height: 100px">
-  <div class="tobago-box-shadow" style="width: 99px; height: 99px">
-    <div class="tobago-box-border" style="width: 97px; height: 97px">
-      <div class="tobago-box-header">Label</div>
-    </div>
+  <div class="tobago-box-border" style="width: 97px; height: 97px">
+    <div class="tobago-box-header">Label</div>
   </div>
 
   <div style="position: absolute; top: 26px; left: 6px; width: 87px; height: 67px; background-color: blue;">
@@ -91,27 +89,29 @@ without shadow
       throws IOException {
 
     // todo: shadow = 0px means, that shadow is disabled, but it may be better, if we can set a boolean in the config.
-    // todo: this is possible after fixing 
+    // todo: this is possible after fixing
     final Measure measure = getResourceManager().getThemeMeasure(facesContext, box, "shadow");
     final boolean hasShadow = measure.greaterThan(Measure.ZERO);
 
     if (hasShadow) {
       // shadow begin
-      writer.startElement(HtmlElements.DIV, box);
-      writer.writeClassAttribute(Classes.create(box, "shadow"));
+//      writer.startElement(HtmlElements.DIV, box);
+//      writer.writeClassAttribute(Classes.create(box, "shadow"));
 
-      final Style shadow = new Style();
-      shadow.setWidth(box.getCurrentWidth().subtract(1));
-      shadow.setHeight(box.getCurrentHeight().subtract(1));
-      writer.writeStyleAttribute(shadow);
+//      final Style shadow = new Style();
+//      shadow.setWidth(box.getCurrentWidth().subtract(1));
+//      shadow.setHeight(box.getCurrentHeight().subtract(1));
+//      writer.writeStyleAttribute(shadow);
 
       // border begin
       writer.startElement(HtmlElements.DIV, box);
       writer.writeClassAttribute(Classes.create(box, "border"));
 
       final Style border = new Style();
-      border.setWidth(box.getCurrentWidth().subtract(3));
-      border.setHeight(box.getCurrentHeight().subtract(3));
+      border.setWidth(box.getCurrentWidth());
+      border.setHeight(box.getCurrentHeight());
+//      border.setWidth(box.getCurrentWidth().subtract(3));
+//      border.setHeight(box.getCurrentHeight().subtract(3));
       writer.writeStyleAttribute(border);
     }
 
@@ -140,7 +140,7 @@ without shadow
       // border end
       writer.endElement(HtmlElements.DIV);
       // shadow end
-      writer.endElement(HtmlElements.DIV);
+//      writer.endElement(HtmlElements.DIV);
     }
 
     writer.startElement(HtmlElements.DIV, null);

Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-speyside/src/main/less/org/apache/myfaces/tobago/renderkit/html/speyside/standard/style/tobago.less
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-speyside/src/main/less/org/apache/myfaces/tobago/renderkit/html/speyside/standard/style/tobago.less?rev=1557970&r1=1557969&r2=1557970&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-speyside/src/main/less/org/apache/myfaces/tobago/renderkit/html/speyside/standard/style/tobago.less (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-speyside/src/main/less/org/apache/myfaces/tobago/renderkit/html/speyside/standard/style/tobago.less Tue Jan 14 08:38:42 2014
@@ -64,14 +64,6 @@
   position: absolute;
 }
 
-.tobago-box-shadow {
-  background-color: #999999;
-  position: absolute;
-  left: 1px;
-  top: 1px;
-  .border-radius;
-}
-
 .tobago-box-border {
   border: 1px solid darken(@borderColor, 10%);
   position: absolute;
@@ -85,7 +77,7 @@
 
 .tobago-box-header {
   background: #E8E8E8 url(../image/box-header-bg.gif) repeat-x top;
-  height: 16px;
+  height: 21px;
   border: 1px solid transparent;
   border-bottom: 1px dotted black;
   .border-radius(3px 3px 0 0);
@@ -157,7 +149,7 @@
   background: #ffffff;
   font: @boldFont;
   color: @textColor2;
-  height: 14px;
+  height: 20px;
   .border-radius;
 }
 
@@ -203,7 +195,7 @@
 
 .tobago-date {
   border: 1px solid darken(@borderColor, 10%);
-  height: 14px;
+  height: 20px;
   font: @font;
   padding-left: 2px;
   padding-right: 2px;
@@ -237,7 +229,7 @@
 
 .tobago-file-pretty {
   border: 1px solid darken(@borderColor, 10%);
-  height: 14px;
+  height: 20px;
   .border-radius;
   .transitionBorder;
   &:focus {
@@ -272,7 +264,7 @@
 
 .tobago-in {
   border: 1px solid darken(@borderColor, 10%);
-  height: 14px;
+  height: 20px;
   font: @font;
   .border-radius;
   background-color: #ffffff;
@@ -301,7 +293,7 @@
 
 .tobago-label {
   background-color: #E8E8E8;
-  height: 14px;
+  height: 20px;
   .border-radius;
   font: @boldFont;
 }
@@ -344,7 +336,7 @@
   font: @boldFont;
   color: @textColor;
   text-decoration: none;
-  line-height: 14px;
+  line-height: 20px;
 }
 
 .tobago-link-markup-disabled {
@@ -866,7 +858,7 @@ div.tobago-tabGroup-toolBar {
 
 .tobago-time-input {
   font-size: 12px;
-  height: 14px;
+  height: 20px;
   width: 21px;
 }
 

Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-speyside/src/main/resources/org/apache/myfaces/tobago/renderkit/html/speyside/standard/property/tobago-theme-config.properties
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-speyside/src/main/resources/org/apache/myfaces/tobago/renderkit/html/speyside/standard/property/tobago-theme-config.properties?rev=1557970&r1=1557969&r2=1557970&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-speyside/src/main/resources/org/apache/myfaces/tobago/renderkit/html/speyside/standard/property/tobago-theme-config.properties (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-speyside/src/main/resources/org/apache/myfaces/tobago/renderkit/html/speyside/standard/property/tobago-theme-config.properties Tue Jan 14 08:38:42 2014
@@ -97,9 +97,6 @@ Tab.paddingLeft=5
 Tab.paddingTop=5
 Tab.paddingRight=5
 Tab.paddingBottom=5
-# shadow=1 activates the shadow
-# todo TabGroup.shadow=1
-# XXX with shadow add +1 to borderRight and borderBottom
 
 Textarea.minimumHeight=33