incubator-adffaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jwald...@apache.org
Subject svn commit: r497160 - in /incubator/adffaces/branches/jwaldman-portal/trinidad: trinidad-demo/src/main/webapp/demos/CustomPortletStyles.css trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/skin/SimplePortletSkin.java
Date Wed, 17 Jan 2007 20:25:26 GMT
Author: jwaldman
Date: Wed Jan 17 12:25:25 2007
New Revision: 497160

URL: http://svn.apache.org/viewvc?view=rev&rev=497160
Log:
Added .portlet-form-field and mappings to it from checkbox/listbox/radio/shuttle content in
the SimplePortletSkin.java

Modified:
    incubator/adffaces/branches/jwaldman-portal/trinidad/trinidad-demo/src/main/webapp/demos/CustomPortletStyles.css
    incubator/adffaces/branches/jwaldman-portal/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/skin/SimplePortletSkin.java

Modified: incubator/adffaces/branches/jwaldman-portal/trinidad/trinidad-demo/src/main/webapp/demos/CustomPortletStyles.css
URL: http://svn.apache.org/viewvc/incubator/adffaces/branches/jwaldman-portal/trinidad/trinidad-demo/src/main/webapp/demos/CustomPortletStyles.css?view=diff&rev=497160&r1=497159&r2=497160
==============================================================================
--- incubator/adffaces/branches/jwaldman-portal/trinidad/trinidad-demo/src/main/webapp/demos/CustomPortletStyles.css
(original)
+++ incubator/adffaces/branches/jwaldman-portal/trinidad/trinidad-demo/src/main/webapp/demos/CustomPortletStyles.css
Wed Jan 17 12:25:25 2007
@@ -70,6 +70,12 @@
   color:Navy;
 }
 
+.portlet-form-field {
+  font-family:Helvetica;
+  font-size: 10pt;
+  color:aqua;   
+}
+
 .portlet-form-input-field {
   font-family:Helvetica;
   font-size: 10pt;

Modified: incubator/adffaces/branches/jwaldman-portal/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/skin/SimplePortletSkin.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/branches/jwaldman-portal/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/skin/SimplePortletSkin.java?view=diff&rev=497160&r1=497159&r2=497160
==============================================================================
--- incubator/adffaces/branches/jwaldman-portal/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/skin/SimplePortletSkin.java
(original)
+++ incubator/adffaces/branches/jwaldman-portal/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/skin/SimplePortletSkin.java
Wed Jan 17 12:25:25 2007
@@ -115,6 +115,21 @@
     "af|inputListOfValues::content", 
     "af|panelLabelAndMessage::content", 
   };  
+  
+  // all these map to portlet-form-field - Text for a field (not input field. e.g., checkboxes)
+  private static final String[] _FORM_FIELD_SELECTORS = new String[]
+  {
+    "af|selectBooleanCheckbox::content",
+    "af|selectBooleanRadio::content",
+    "af|selectManyCheckbox::content",
+    "af|selectManyChoice::content",
+    "af|selectManyListbox::content",
+    "af|selectManyShuttle::content",
+    "af|selectOneChoice::content",
+    "af|selectOneListbox::content",
+    "af|selectOneRadio::content",
+    "af|selectOrderShuttle::content"
+  };  
    
   // portlet-form-button
   private static final String[] _PORTLET_FORM_BUTTON = new String[]
@@ -200,13 +215,17 @@
     
     
     for (int i=0; i < _FORM_LABEL_SELECTORS.length; i++)
-     _STYLES_MAP.put(_FORM_LABEL_SELECTORS[i], "portlet-form-label");
+      _STYLES_MAP.put(_FORM_LABEL_SELECTORS[i], "portlet-form-label");
      
     for (int i=0; i < _FORM_INPUT_SELECTORS.length; i++)
-     _STYLES_MAP.put(_FORM_INPUT_SELECTORS[i], "portlet-form-input-field"); 
+      _STYLES_MAP.put(_FORM_INPUT_SELECTORS[i], "portlet-form-input-field"); 
+    
+    for (int i=0; i < _FORM_FIELD_SELECTORS.length; i++)
+      _STYLES_MAP.put(_FORM_FIELD_SELECTORS[i], "portlet-form-field");      
+    
      
     for (int i=0; i < _PORTLET_FORM_BUTTON.length; i++)
-     _STYLES_MAP.put(_PORTLET_FORM_BUTTON[i], "portlet-form-button");      
+      _STYLES_MAP.put(_PORTLET_FORM_BUTTON[i], "portlet-form-button");      
     
     _STYLES_MAP.put(XhtmlLafConstants.AF_PANEL_FORM_LABEL_CELL_STYLE_CLASS, _NULL_STYLE);
     
@@ -253,25 +272,25 @@
     _STYLES_MAP.put(SkinSelectors.AF_CHOOSE_DATE_CONTENT_STYLE_CLASS, "portlet-table-body");
 
 
     // add portlet-table-body + itself
-     for (int i=0; i < _TABLE_BODY_PLUS_ITSELF.length; i++)
-     {
-       _STYLES_MAP.put(_TABLE_BODY_PLUS_ITSELF[i], "portlet-table-text " + 
-          StyleUtils.convertToValidSelector(_TABLE_BODY_PLUS_ITSELF[i]));
-     }
+    for (int i=0; i < _TABLE_BODY_PLUS_ITSELF.length; i++)
+    {
+      _STYLES_MAP.put(_TABLE_BODY_PLUS_ITSELF[i], "portlet-table-text " + 
+        StyleUtils.convertToValidSelector(_TABLE_BODY_PLUS_ITSELF[i]));
+    }
     
     // add portlet-table-alternate + itself
-     for (int i=0; i < _TABLE_ALT_PLUS_ITSELF.length; i++)
-     {
-       _STYLES_MAP.put(_TABLE_ALT_PLUS_ITSELF[i], "portlet-table-text " + 
-          StyleUtils.convertToValidSelector(_TABLE_ALT_PLUS_ITSELF[i])); 
-     }
+    for (int i=0; i < _TABLE_ALT_PLUS_ITSELF.length; i++)
+    {
+      _STYLES_MAP.put(_TABLE_ALT_PLUS_ITSELF[i], "portlet-table-text " + 
+        StyleUtils.convertToValidSelector(_TABLE_ALT_PLUS_ITSELF[i])); 
+    }
      
     // add portlet-table-header + itself
-     for (int i=0; i < _TABLE_HDR_PLUS_ITSELF.length; i++)
-     {
-       _STYLES_MAP.put(_TABLE_HDR_PLUS_ITSELF[i], "portlet-table-text " + 
-       StyleUtils.convertToValidSelector(_TABLE_HDR_PLUS_ITSELF[i]));   
-     }
+    for (int i=0; i < _TABLE_HDR_PLUS_ITSELF.length; i++)
+    {
+      _STYLES_MAP.put(_TABLE_HDR_PLUS_ITSELF[i], "portlet-table-text " + 
+        StyleUtils.convertToValidSelector(_TABLE_HDR_PLUS_ITSELF[i]));   
+    }
 
     // Since we null'd out the properties, there is no reason to output this
     _STYLES_MAP.put(SkinSelectors.TABLE_BORDER_0001_STYLE, _NULL_STYLE);
@@ -298,17 +317,17 @@
     _STYLES_MAP.put(SkinSelectors.AF_NAVIGATION_PATH_SELECTED_STEP_STYLE_CLASS, _PORTLET_FONT);

     _STYLES_MAP.put(SkinSelectors.AF_NAVIGATION_PATH_STEP_STYLE_CLASS, _PORTLET_FONT); 
     _STYLES_MAP.put(SkinSelectors.NAV_BAR_ILINK_STYLE_CLASS, _PORTLET_FONT_DIM);    
-     _STYLES_MAP.put("AFInstructionTextDisabled", _PORTLET_FONT_DIM);
+    _STYLES_MAP.put("AFInstructionTextDisabled", _PORTLET_FONT_DIM);
     _STYLES_MAP.put("AFFieldTextDisabled", _PORTLET_FONT_DIM);
     _STYLES_MAP.put("AFFieldTextLTRDisabled", _PORTLET_FONT_DIM);
-     _STYLES_MAP.put("AFPhoneFieldTextDisabled", _PORTLET_FONT_DIM);
+    _STYLES_MAP.put("AFPhoneFieldTextDisabled", _PORTLET_FONT_DIM);
     _STYLES_MAP.put("AFPostalCodeFieldTextDisabled", _PORTLET_FONT_DIM);
     _STYLES_MAP.put("AFAddressFieldTextDisabled", _PORTLET_FONT_DIM);
 
 
     _STYLES_MAP.put(SkinSelectors.IN_CONTEXT_TEXT_STYLE_CLASS, _PORTLET_FONT_DIM);
-     _STYLES_MAP.put(SkinSelectors.LINK_DISABLED_STYLE_CLASS, _PORTLET_FONT_DIM);
-     _STYLES_MAP.put(XhtmlLafConstants.DISABLED_STYLE_CLASS, _PORTLET_FONT_DIM);
+    _STYLES_MAP.put(SkinSelectors.LINK_DISABLED_STYLE_CLASS, _PORTLET_FONT_DIM);
+    _STYLES_MAP.put(XhtmlLafConstants.DISABLED_STYLE_CLASS, _PORTLET_FONT_DIM);
     _STYLES_MAP.put(SkinSelectors.AF_SELECT_INPUT_DATE_DISABLED_STYLE_CLASS, _PORTLET_FONT_DIM);
     _STYLES_MAP.put(SkinSelectors.AF_CHOOSE_DATE_DISABLED_STYLE_CLASS, _PORTLET_FONT_DIM);
      
@@ -342,11 +361,13 @@
     // keep boldness and alignment
     _STYLES_MAP.put("AFDataNumber", "portlet-font AFDataNumber");
     _STYLES_MAP.put("AFFieldNumber", "portlet-font AFFieldNumber");
-
-    _STYLES_MAP.put("af|selectOneChoice::content",_PORTLET_FONT); 
-    _STYLES_MAP.put("af|selectOneListbox::content",_PORTLET_FONT);     
-    _STYLES_MAP.put("af|selectManyShuttle::content",_PORTLET_FONT);     
-    _STYLES_MAP.put("af|selectOrderShuttle::content",_PORTLET_FONT);     
+    // af|document has a portlet-font style on it. This is important because all elements
in the
+    // dom tree that do not have text info on it will pick up the portlet-font styling. This
+    // makes it so that I don't have to map every styleclass to portlet-font.
+    // NOTE: right now we don't render a af|document, but we could, so just in case that
changes,
+    // I'll leave this in.
+    _STYLES_MAP.put("af|document", "portlet-font " +
+      StyleUtils.convertToValidSelector("af|document"));
     
     _STYLES_MAP.put(SkinSelectors.AF_SELECT_INPUT_DATE_ENABLED_STYLE_CLASS,_PORTLET_FONT);
     _STYLES_MAP.put(SkinSelectors.NAV_BAR_ALINK_STYLE_CLASS, _PORTLET_FONT);



Mime
View raw message