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 2015/06/03 13:45:56 UTC

svn commit: r1683300 - in /myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag: ImageRenderer.java PopupRenderer.java

Author: lofwyr
Date: Wed Jun  3 11:45:56 2015
New Revision: 1683300

URL: http://svn.apache.org/r1683300
Log:
TOBAGO-1368: Create a new theme which uses Bootstrap
 - sizes of image and popup: setting more explicit

Modified:
    myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/ImageRenderer.java
    myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/PopupRenderer.java

Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/ImageRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/ImageRenderer.java?rev=1683300&r1=1683299&r2=1683300&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/ImageRenderer.java (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/ImageRenderer.java Wed Jun  3 11:45:56 2015
@@ -79,7 +79,6 @@ public class ImageRenderer extends Layou
 
     writer.startElement(HtmlElements.IMG, image);
     writer.writeIdAttribute(image.getClientId(facesContext));
-    writer.writeStyleAttribute(new Style(facesContext, image));
     HtmlRendererUtils.writeDataAttributes(facesContext, writer, image);
     if (src != null) {
       writer.writeAttribute(HtmlAttributes.SRC, src, true);
@@ -90,7 +89,9 @@ public class ImageRenderer extends Layou
       writer.writeAttribute(HtmlAttributes.TITLE, title, true);
     }
     writer.writeAttribute(HtmlAttributes.BORDER, border, false);
-    final Style style = new Style(facesContext, image);
+    final Style style = new Style();
+    style.setWidth(image.getWidth());
+    style.setHeight(image.getHeight());
     writer.writeStyleAttribute(style);
     if (ComponentUtils.findAncestor(image, UINav.class) != null) { // todo: may set a marker in the context in the
       // todo: NavRenderer, or the additional class, to avoid tree traversing

Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/PopupRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/PopupRenderer.java?rev=1683300&r1=1683299&r2=1683300&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/PopupRenderer.java (original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/PopupRenderer.java Wed Jun  3 11:45:56 2015
@@ -53,7 +53,10 @@ public class PopupRenderer extends Layou
     writer.writeIdAttribute(popup.getClientId(facesContext));
     writer.startElement(HtmlElements.DIV, null);
     writer.writeClassAttribute(BootstrapClass.MODAL_DIALOG);
-    writer.writeStyleAttribute(new Style(facesContext, popup));
+    final Style style = new Style();
+    style.setWidth(popup.getWidth());
+    style.setHeight(popup.getHeight());
+    writer.writeStyleAttribute(style);
     writer.startElement(HtmlElements.DIV, null);
     writer.writeClassAttribute(BootstrapClass.MODAL_CONTENT);
   }