Author: abelevich
Date: 2008-01-15 07:55:54 -0500 (Tue, 15 Jan 2008)
New Revision: 5379
Modified:
trunk/sandbox/ui/combobox/src/main/config/component/combobox.xml
trunk/sandbox/ui/combobox/src/main/resources/org/richfaces/renderkit/html/css/combobox.xcss
trunk/sandbox/ui/combobox/src/main/templates/combobox.jspx
Log:
add inactive css class/styles set
Modified: trunk/sandbox/ui/combobox/src/main/config/component/combobox.xml
===================================================================
--- trunk/sandbox/ui/combobox/src/main/config/component/combobox.xml 2008-01-15 12:22:55
UTC (rev 5378)
+++ trunk/sandbox/ui/combobox/src/main/config/component/combobox.xml 2008-01-15 12:55:54
UTC (rev 5379)
@@ -68,15 +68,13 @@
<description></description>
<defaultvalue><![CDATA[0]]></defaultvalue>
</property>
-
<property>
<name>width</name>
<classname>java.lang.String</classname>
<description></description>
<defaultvalue><![CDATA["150"]]></defaultvalue>
</property>
-
- <property>
+ <property>
<name>width</name>
<classname>java.lang.String</classname>
<description></description>
@@ -134,7 +132,7 @@
<defaultvalue><![CDATA[""]]></defaultvalue>
</property>
<property>
- <name>buttonIconNormal</name>
+ <name>buttonIconInactive</name>
<classname>java.lang.String</classname>
<description>URI</description>
<defaultvalue><![CDATA[""]]></defaultvalue>
@@ -157,38 +155,40 @@
<description></description>
</property>
<property>
- <name>listDisabledClass</name>
+ <name>inputStyle</name>
<classname>java.lang.String</classname>
<description></description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
</property>
<property>
- <name>listDisabledStyle</name>
+ <name>inputClass</name>
<classname>java.lang.String</classname>
<description></description>
</property>
<property>
- <name>inputStyle</name>
+ <name>inputDisabledStyle</name>
<classname>java.lang.String</classname>
<description></description>
<defaultvalue><![CDATA[""]]></defaultvalue>
</property>
<property>
- <name>inputClass</name>
+ <name>inputDisabledClass</name>
<classname>java.lang.String</classname>
<description></description>
</property>
<property>
- <name>itemClass</name>
+ <name>inputInactiveStyle</name>
<classname>java.lang.String</classname>
<description></description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
</property>
<property>
- <name>itemDisabledClass</name>
+ <name>inputInactiveClass</name>
<classname>java.lang.String</classname>
<description></description>
</property>
<property>
- <name>itemSelectedClass</name>
+ <name>itemClass</name>
<classname>java.lang.String</classname>
<description></description>
</property>
@@ -215,6 +215,17 @@
<defaultvalue><![CDATA[""]]></defaultvalue>
</property>
<property>
+ <name>buttonInactiveStyle</name>
+ <classname>java.lang.String</classname>
+ <description></description>
+ </property>
+ <property>
+ <name>buttonInactiveClass</name>
+ <classname>java.lang.String</classname>
+ <description></description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
<name>style</name>
<classname>java.lang.String</classname>
<description></description>
@@ -226,6 +237,7 @@
<description></description>
<defaultvalue><![CDATA[""]]></defaultvalue>
</property>
+
&html_input_attributes;
&html_input_events;
&html_events;
Modified:
trunk/sandbox/ui/combobox/src/main/resources/org/richfaces/renderkit/html/css/combobox.xcss
===================================================================
---
trunk/sandbox/ui/combobox/src/main/resources/org/richfaces/renderkit/html/css/combobox.xcss 2008-01-15
12:22:55 UTC (rev 5378)
+++
trunk/sandbox/ui/combobox/src/main/resources/org/richfaces/renderkit/html/css/combobox.xcss 2008-01-15
12:55:54 UTC (rev 5379)
@@ -6,40 +6,24 @@
<f:verbatim>
<![CDATA[
-cb_width_field.{
- width: 400px;
-}
-
.rich-combobox-button-pressed {
}
-.rich-combobox-button-disabled {
-}
-
.rich-combobox-button-hovered {
}
-.rich-combobox-item-normal {
-}
-
-.rich-combobox-font {
- font-size : 11px/*generalSizeFont*/; font-family : arial/*generalFamilyFont*/; color :
#000000/*generalTextColor*/
-}
-
-.rich-combobox-font-disabled {
-}
-
-.rich-combobox-input-default {
-}
-
.rich-combobox-input {
+ position : absolute;
+ top : 0px; left : 0;
+ padding-right :20px;
+ padding-left :3px;
+ margin : 0px;
+ border : 1px solid;
+ background-position:left top;
+ background-repeat:repeat-x;
}
.rich-combobox-input-disabled {
-}
-
-
-.rich-combobox-input-default-disabled {
position : absolute;
top : 0px; left : 0;
padding-right :20px;
@@ -50,7 +34,7 @@
background-repeat:repeat-x;
}
-.rich-combobox-input-default {
+.rich-combobox-input-inactive {
position : absolute;
top : 0px;
left : 0px;
@@ -62,8 +46,6 @@
background-repeat:repeat-x;
} /*panelBorderColor*/
-.cb_strut{ position : relative; visibility : hidden; margin : 0px; padding : 2px;
-}
/*.rich-combobox-list {
z-index: 1000;
@@ -140,7 +122,13 @@
border : 1px solid;
}
-.rich-combobox-button-hovered {
+.rich-combobox-button-inactive {
+ position : absolute;
+ top : 0px;
+ right : 0px; //left: fullWidth - 17px;
+ width : 17px;
+ margin : 0px;
+ border : 1px solid;
}
.rich-combobox-button-background {
@@ -153,7 +141,12 @@
cursor : pointer;
}
+.rich-combobox-button-background-inactive {
+ background : top repeat-x;
+ cursor : pointer;
+}
+
.rich-combobox-button-pressed-background {
background : top repeat-x;
cursor : pointer;
@@ -167,13 +160,15 @@
background : center no-repeat; cursor : pointer;
}
+.rich-combobox-button-icon-inactive {
+ background : center no-repeat; cursor : pointer;
+}
+
+
]]>
</f:verbatim>
-
-
-
<u:selector name=".rich-combobox-button-background">
<u:style name="background-image">
<f:resource f:key="org.richfaces.renderkit.images.ComboBoxButtonGradient"
/>
@@ -188,6 +183,13 @@
<u:style name="background-color" skin="tabBackgroundColor"/>
</u:selector>
+ <u:selector name=".rich-combobox-button-background-inactive">
+ <u:style name="background-image">
+ <f:resource f:key="org.richfaces.renderkit.images.ComboBoxButtonGradient"
/>
+ </u:style>
+ <u:style name="background-color" skin="tabBackgroundColor"/>
+ </u:selector>
+
<u:selector name=".rich-combobox-button-pressed-background">
<u:style name="background-image">
<f:resource
f:key="org.richfaces.renderkit.images.ComboBoxButtonPressGradient" />
@@ -207,6 +209,12 @@
</u:style>
</u:selector>
+ <u:selector name=".rich-combobox-button-icon-inactive">
+ <u:style name="background-image">
+ <f:resource
f:key="org.richfaces.renderkit.images.ComboBoxArrowImageDisable" />
+ </u:style>
+ </u:selector>
+
<u:selector name=".rich-combobox-button">
<u:style name="border-color" skin="panelBorderColor"/>
</u:selector>
@@ -215,6 +223,10 @@
<u:style name="border-color" skin="panelBorderColor"/>
</u:selector>
+ <u:selector name=".rich-combobox-button-inactive">
+ <u:style name="border-color" skin="panelBorderColor"/>
+ </u:selector>
+
<u:selector name=".rich-combobox-button-hovered">
<u:style name="border-color" skin="selectControlColor"/>
</u:selector>
@@ -231,17 +243,27 @@
<u:style name="font-size" skin="headerSizeFont"/>
</u:selector>
- <u:selector name=".rich-combobox-input-default">
+ <u:selector name=".rich-combobox-font-inactive">
+ <u:style name="color" skin="tabDisabledTextColor"/>
+ <u:style name="font-family" skin="headerFamilyFont"/>
+ <u:style name="font-size" skin="headerSizeFont"/>
+ </u:selector>
+
+ <u:selector name=".rich-combobox-input">
<u:style name="background-image">
<f:resource f:key="org.richfaces.renderkit.images.ComboBoxInputGradient"
/>
</u:style>
<u:style name="border-color" skin="panelBorderColor"/>
</u:selector>
- <u:selector name=".rich-combobox-input-default-disabled">
+ <u:selector name=".rich-combobox-input-disabled">
<u:style name="border-color" skin="tabBackgroundColor"/>
</u:selector>
-
+
+ <u:selector name=".rich-combobox-input-inactive">
+ <u:style name="border-color" skin="tabBackgroundColor"/>
+ </u:selector>
+
<u:selector name=".rich-combobox-item">
<u:style name="font-size" skin="generalSizeFont"/>
<u:style name="font-family" skin="generalFamilyFont"/>
Modified: trunk/sandbox/ui/combobox/src/main/templates/combobox.jspx
===================================================================
--- trunk/sandbox/ui/combobox/src/main/templates/combobox.jspx 2008-01-15 12:22:55 UTC
(rev 5378)
+++ trunk/sandbox/ui/combobox/src/main/templates/combobox.jspx 2008-01-15 12:55:54 UTC
(rev 5379)
@@ -84,6 +84,25 @@
}
variables.setVariable("inputDisabledClass", inputDisabledClass);
+ Object inputInactiveStyle =
component.getAttributes().get("inputInactiveStyle");
+ variables.setVariable("inputInactiveStyle", inputInactiveStyle);
+
+ Object inputInactiveClass =
component.getAttributes().get("inputInactiveClass");
+ if(inputInactiveClass!=null && inputInactiveClass.equals("")) {
+ inputInactiveClass = null;
+ }
+ variables.setVariable("inputInactiveClass", inputInactiveClass);
+
+
+ Object buttonInactiveClass =
component.getAttributes().get("buttonInactiveClass");
+ if(buttonInactiveClass!=null && buttonInactiveClass.equals(""))
{
+ buttonInactiveClass = null;
+ }
+ variables.setVariable("buttonInactiveClass", buttonInactiveClass);
+
+ Object buttonInactiveStyle =
component.getAttributes().get("buttonInactiveStyle");
+ variables.setVariable("buttonInactiveStyle", buttonInactiveStyle);
+
Object buttonDisabledClass =
component.getAttributes().get("buttonDisabledClass");
if(buttonDisabledClass!=null && buttonDisabledClass.equals(""))
{
buttonDisabledClass = null;
@@ -111,16 +130,7 @@
}
variables.setVariable("listClass", listClass);
- Object listDisabledStyle =
component.getAttributes().get("listDisabledStyle");
- variables.setVariable("listDisabledStyle", listDisabledStyle);
-
- Object listDisabledClass =
component.getAttributes().get("listDisabledClass");
- if(listDisabledClass!=null && listDisabledClass.equals("")) {
- listDisabledClass = null;
- }
- variables.setVariable("listDisabledClass", listDisabledClass);
-
- Object styleClass = component.getAttributes().get("styleClass");
+ Object styleClass = component.getAttributes().get("styleClass");
variables.setVariable("styleClass", styleClass);
Object style = component.getAttributes().get("style");
@@ -132,13 +142,7 @@
}
variables.setVariable("itemClass", itemClass);
- Object itemDisabledClass =
component.getAttributes().get("itemDisabledClass");
- if(itemDisabledClass!=null && itemDisabledClass.equals("")) {
- itemDisabledClass = null;
- }
- variables.setVariable("itemDisabledClass", itemDisabledClass);
-
- Object itemSelectedClass =
component.getAttributes().get("itemSelectedClass");
+ Object itemSelectedClass =
component.getAttributes().get("itemSelectedClass");
if(itemSelectedClass!=null && itemSelectedClass.equals("")) {
itemSelectedClass = null;
}
@@ -163,11 +167,11 @@
}
variables.setVariable("buttonIconDisabled", buttonIconDisabled);
- String buttonIconNormal =
(String)component.getAttributes().get("buttonIconNormal");
- if (buttonIconNormal != null && !buttonIconNormal.equals("")) {
- buttonIconNormal = "url('" + buttonIconNormal + "')";
+ String buttonIconInactive =
(String)component.getAttributes().get("buttonIconInactive");
+ if (buttonIconInactive != null && !buttonIconInactive.equals(""))
{
+ buttonIconInactive = "url('" + buttonIconInactive +
"')";
}
- variables.setVariable("buttonIconNormal", buttonIconNormal);
+ variables.setVariable("buttonIconInactive", buttonIconInactive);
@@ -195,7 +199,7 @@
<input id="comboboxField#{clientId}"
name="comboboxField#{clientId}"
disabled="#{disabled}"
- class="rich-combobox-font-disabled rich-combobox-input-default-disabled
rich-combobox-input-disabled #{inputDisabledClass}" type="text"
+ class="rich-combobox-font-inactive rich-combobox-input-inactive
#{inputDisabledClass}" type="text"
value="#{value}"
size="#{inputSize}"
autocomplete="off"
@@ -204,9 +208,9 @@
onblur="#{component.attributes['onblur']}"
style="width:#{width}; #{inputStyle}"
/>
- <input id="comboBoxButtonBG#{clientId}" readonly="true"
type="text" value="" class="rich-combobox-font
rich-combobox-button-background rich-combobox-button"/>
+ <input id="comboBoxButtonBG#{clientId}" readonly="true"
type="text" value="" class="rich-combobox-font-inactive
rich-combobox-button-background rich-combobox-button-inactive"/>
<input id="comboboxButton#{clientId}" readonly="true"
disabled="#{disabled}" type="text" value=""
style="#{buttonStyle}; background-image: #{buttonIconNormal};"
- class="rich-combobox-font-disabled rich-combobox-button-icon-disabled
rich-combobox-button #{buttonDisabledClass}"
+ class="rich-combobox-font-inactive rich-combobox-button-icon-inactive
rich-combobox-button-inactive #{buttonDisabledClass}"
onmousedown="document.getElementById('comboBoxButtonBG#{clientId}').className='rich-combobox-font
rich-combobox-button-pressed-background rich-combobox-button';"
onmouseup="document.getElementById('comboBoxButtonBG#{clientId}').className='rich-combobox-font
rich-combobox-button-background rich-combobox-button';"/>
@@ -229,44 +233,40 @@
<script type="text/javascript">
Richfaces.ComboBox.CLASSES = {
BUTTON : {CLASSES :
- {NORMAL : "rich-combobox-font-disabled rich-combobox-button-icon-disabled
rich-combobox-button-disabled #{buttonDisabledClass}",
+ {NORMAL : "rich-combobox-font-inactive rich-combobox-button-icon-inactive
rich-combobox-button-inactive #{buttonInactiveClass}",
ACTIVE : "rich-combobox-font rich-combobox-button-icon
rich-combobox-button #{buttonClass}",
DISABLED : "rich-combobox-font-disabled rich-combobox-button-icon-disabled
rich-combobox-button-disabled #{buttonDisabledClass}",
HOVERED : "rich-combobox-button-hovered"},
STYLE :
- {NORMAL: "#{buttonDisabledStyle}",
+ {NORMAL: "#{buttonInactiveStyle}",
ACTIVE: "#{buttonStyle}",
DISABLED: "#{buttonDisabledStyle}"}
},
BUTTONBG : {CLASSES :
- {NORMAL:"rich-combobox-font-disabled
rich-combobox-button-background-disabled rich-combobox-button-disabled",
+ {NORMAL:"rich-combobox-font-inactive
rich-combobox-button-background-inactive rich-combobox-button-inactive",
ACTIVE: "rich-combobox-font
rich-combobox-button-background rich-combobox-button",
DISABLED : "rich-combobox-font-disabled
rich-combobox-button-background-disabled rich-combobox-button-disabled"}
},
BUTTONICON : {STYLE :
- {NORMAL: "#{buttonIconNormal}",
+ {NORMAL: "#{buttonIconInactive}",
ACTIVE: "#{buttonIcon}",
DISABLED: "#{buttonIconDisabled}"}
},
FIELD : {CLASSES:
- {NORMAL : "rich-combobox-font-disabled rich-combobox-input-default-disabled
rich-combobox-input-disabled #{inputDisabledClass}",
- ACTIVE : "rich-combobox-font rich-combobox-input-default rich-combobox-input
#{inputClass}",
- DISABLED : "rich-combobox-font-disabled rich-combobox-input-default-disabled
rich-combobox-input-disabled #{inputDisabledClass}"},
+ {NORMAL : "rich-combobox-font-inactive rich-combobox-input-inactive
#{inputInactiveClass}",
+ ACTIVE : "rich-combobox-font rich-combobox-input #{inputClass}",
+ DISABLED : "rich-combobox-font-disabled rich-combobox-input-disabled
#{inputDisabledClass}"},
STYLE :
- {NORMAL : "#{inputDisabledStyle}",
+ {NORMAL : "#{inputStyle}",
ACTIVE : "#{inputStyle}",
DISABLED : "#{inputDisabledStyle}"}
},
COMBO_LIST : {
- LIST : {CLASSES :
- {ACTIVE : "rich-combobox-list-cord rich-combobox-list-scroll
rich-combobox-list-decoration rich-combobox-list-position #{listClass}",
- DISABLED : "rich-combobox-list-cord rich-combobox-list-scroll
rich-combobox-list-decoration rich-combobox-list-position #{listDisabledClass}"},
- STYLE : {ACTIVE: "#{listStyle}",
- DISABLED: "#{listDisabledStyle}"}
+ LIST : {CLASSES :{ACTIVE : "rich-combobox-list-cord rich-combobox-list-scroll
rich-combobox-list-decoration rich-combobox-list-position #{listClass}"},
+ STYLE : {ACTIVE: "#{listStyle}"}
},
- ITEM : {NORMAL : "rich-combobox-item rich-combobox-item-normal
#{itemClass}",
- SELECTED : "rich-combobox-item rich-combobox-item-selected
#{itemSelectedClass}",
- DISABLED : "rich-combobox-item rich-combobox-item-disabled
#{itemDisabledClass}"
+ ITEM : {NORMAL : "rich-combobox-item #{itemClass}",
+ SELECTED : "rich-combobox-item rich-combobox-item-selected
#{itemSelectedClass}"
}
}
}