Changeset 28215

Show
Ignore:
Timestamp:
12/17/07 20:39:50 (1 year ago)
Author:
atchertchian
Message:

NXP-1877: Cannot set style class on date time component

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • org.nuxeo.ecm.platform/branches/5.1/nuxeo-platform-ui-web/src/main/java/org/nuxeo/ecm/platform/ui/web/component/date/InputDateTimeRenderer.java

    r27082 r28215  
    8484        writer.writeAttribute("value", getFormattedValue(context, component, 
    8585                currentValue), null); 
     86        String styleClass = (String) component.getAttributes().get("styleClass"); 
     87        if (styleClass != null) { 
     88            writer.writeAttribute("class", styleClass, "styleClass"); 
     89        } 
    8690        writer.endElement("input"); 
    8791 
     
    9195        writer.writeAttribute("id", triggerButtonId, null); 
    9296        writer.writeAttribute("name", triggerButtonId, null); 
     97        String triggerStyleClass = (String) component.getAttributes().get( 
     98                "triggerStyleClass"); 
     99        if (triggerStyleClass != null) { 
     100            writer.writeAttribute("class", triggerStyleClass, "styleClass"); 
     101        } 
    93102        writer.writeText(dateTimeComp.getTriggerLabel(), null); 
    94103        writer.endElement("button"); 
     
    163172        List<String> strOptions = new ArrayList<String>(); 
    164173        for (Map.Entry<String, String> option : options.entrySet()) { 
    165             strOptions.add(String.format("%s : \"%s\"", option.getKey(), option 
    166                     .getValue())); 
     174            strOptions.add(String.format("%s : \"%s\"", option.getKey(), 
     175                    option.getValue())); 
    167176        } 
    168177        StringBuffer res = new StringBuffer(); 
  • org.nuxeo.ecm.platform/branches/5.1/nuxeo-platform-ui-web/src/main/resources/WEB/nxweb-util.tld

    r25667 r28215  
    498498        Label to display in the trigger button. Defaults to "...". 
    499499      </description> 
     500    </attribute> 
     501    <attribute> 
     502      <name>styleClass</name> 
     503      <required>false</required> 
     504      <rtexprvalue>false</rtexprvalue> 
     505      <description>style class to set on the input tag.</description> 
     506    </attribute> 
     507    <attribute> 
     508      <name>triggerStyleClass</name> 
     509      <required>false</required> 
     510      <rtexprvalue>false</rtexprvalue> 
     511      <description>style class to set on the trigger button tag.</description> 
    500512    </attribute> 
    501513    <example>