Author: vmolotkov
Date: 2008-01-11 10:46:22 -0500 (Fri, 11 Jan 2008)
New Revision: 5309
Modified:
trunk/sandbox/ui/combobox/src/main/config/component/combobox.xml
trunk/sandbox/ui/combobox/src/main/templates/combobox.jspx
Log:
input width was added
Modified: trunk/sandbox/ui/combobox/src/main/config/component/combobox.xml
===================================================================
--- trunk/sandbox/ui/combobox/src/main/config/component/combobox.xml 2008-01-11 15:45:30
UTC (rev 5308)
+++ trunk/sandbox/ui/combobox/src/main/config/component/combobox.xml 2008-01-11 15:46:22
UTC (rev 5309)
@@ -67,6 +67,12 @@
<description></description>
</property>
+ <property>
+ <name>width</name>
+ <classname>java.lang.String</classname>
+ <description></description>
+ <defaultvalue><![CDATA["150"]]></defaultvalue>
+ </property>
<property>
<name>listWidth</name>
<classname>java.lang.String</classname>
Modified: trunk/sandbox/ui/combobox/src/main/templates/combobox.jspx
===================================================================
--- trunk/sandbox/ui/combobox/src/main/templates/combobox.jspx 2008-01-11 15:45:30 UTC
(rev 5308)
+++ trunk/sandbox/ui/combobox/src/main/templates/combobox.jspx 2008-01-11 15:46:22 UTC
(rev 5309)
@@ -44,6 +44,12 @@
}
variables.setVariable("listWidth", listWidth);
+ String width = (String) component.getAttributes().get("width");
+ if (width != null) {
+ width = HtmlUtil.qualifySize(width);
+ }
+ variables.setVariable("width", width);
+
String inputSize = (String) component.getAttributes().get("inputSize");
variables.setVariable("inputSize", inputSize);
@@ -158,29 +164,25 @@
</jsp:scriptlet>
<div id="#{clientId}" class="rich-combobox-font rich-combobox-shell
#{styleClass}" style="width:#{listWidth}; #{style}">
- <div class="cb_width_field rich-combobox-font rich-combobox-shell">
+ <div class="rich-combobox-font rich-combobox-shell"
style="width:#{width}">
<input id="comboboxField#{clientId}"
name="comboboxField#{clientId}"
disabled="#{disabled}"
- class="cb_width_field rich-combobox-font-disabled
rich-combobox-input-default-disabled rich-combobox-input-disabled
#{inputDisabledClass}" type="text"
+ class="rich-combobox-font-disabled rich-combobox-input-default-disabled
rich-combobox-input-disabled #{inputDisabledClass}" type="text"
value="#{value}"
size="#{inputSize}"
autocomplete="off"
- style="width:#{listWidth}; #{inputStyle}"
+ style="width:#{width}; #{inputStyle}"
x:passThruWithExclusions="value,name,type,id,styleClass,class,style,size,autocomplete,disabled"
- >
- </input>
- <input id="comboBoxButtonBG#{clientId}" readonly="true"
type="text" value="" class="rich-combobox-font
rich-combobox-button-background rich-combobox-button">
- </input>
+ />
+ <input id="comboBoxButtonBG#{clientId}" readonly="true"
type="text" value="" class="rich-combobox-font
rich-combobox-button-background rich-combobox-button"/>
<input id="comboboxButton#{clientId}" readonly="true"
disabled="#{disabled}" type="text" value=""
style="#{buttonStyle}"
class="rich-combobox-font-disabled rich-combobox-button-icon-disabled
rich-combobox-button #{buttonDisabledClass}"
onmousedown="document.getElementById('comboBoxButtonBG#{clientId}').className='rich-combobox-font
rich-combobox-button-pressed-background rich-combobox-button';
this.className='rich-combobox-button rich-combobox-button-pressed rich-combobox-font
rich-combobox-button-icon';"
onmouseup="document.getElementById('comboBoxButtonBG#{clientId}').className='rich-combobox-font
rich-combobox-button-background rich-combobox-button';
this.className='rich-combobox-button rich-combobox-font
rich-combobox-button-icon'"
onmouseout="this.className='rich-combobox-font rich-combobox-button-icon
rich-combobox-button'"
- onmouseover="this.className='rich-combobox-font rich-combobox-button-icon
rich-combobox-button-hovered'">
- </input>
- <input type="text" class="cb_width_field rich-combobox-strut
rich-combobox-font">
- </input>
+ onmouseover="this.className='rich-combobox-font rich-combobox-button-icon
rich-combobox-button-hovered'"/>
+ <input type="text" class="rich-combobox-strut
rich-combobox-font" style="width:#{width}"/>
</div>
<div id="listParent#{clientId}" class="rich-combobox-list-cord
#{listClass}" style="display:none; #{listStyle};">