Author: konstantin.mishin
Date: 2011-02-02 13:33:40 -0500 (Wed, 02 Feb 2011)
New Revision: 21400
Modified:
trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/select.ecss
trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/select.js
trunk/ui/input/ui/src/main/templates/select.template.xml
Log:
RF-9805
Modified:
trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/select.ecss
===================================================================
---
trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/select.ecss 2011-02-02
18:21:44 UTC (rev 21399)
+++
trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/select.ecss 2011-02-02
18:33:40 UTC (rev 21400)
@@ -4,30 +4,31 @@
font-family: '#{richSkin.generalFamilyFont}';
}
+.rf-sel-cntr {
+ border-width: 1px;
+ border-style: solid;
+ border-color: '#{richSkin.panelBorderColor}';
+ display: inline-block;
+ font-size: 1px;
+ white-space: nowrap;
+}
+
input.rf-sel-inp {
- border-width: 0px;
- width: 100%;
- color: '#{richSkin.generalTextColor}';
- font-size: '#{richSkin.generalSizeFont}';
- font-family: '#{richSkin.generalFamilyFont}';
+ background-color: '#{richSkin.controlBackgroundColor}';
+ background-image:
url("#{resource['org.richfaces.renderkit.html.images.InputBackgroundImage']}");
+ background-position:1px 1px;
+ background-repeat:no-repeat;
+ border: 0px;
+ margin: 0px;
+ padding: 0px;
+ vertical-align: top;
+ width: 182px;
}
.rf-sel{
- width:200px;
display:inline-block;
}
-.rf-sel-fld{
- border-width: 1px;
- border-style: solid;
- border-color: '#{richSkin.panelBorderColor}';
- background-image:
"url(#{resource['org.richfaces.renderkit.html.images.AutocompleteFieldGradient']})";
- background-repeat: repeat-x;
- background-position: top left;
- background-color: '#{richSkin.controlBackgroundColor}';
- width: 100%;
-}
-
.rf-sel-fld-err input{
color: #FF0000;
}
@@ -37,18 +38,11 @@
background-repeat: repeat-x;
background-position: top left;
background-color: '#{richSkin.headerBackgroundColor}';
- text-align: center;
- border-style: solid;
- border-width: 1px;
- border-color: '#{richSkin.panelBorderColor}';
- border-left-width: 0px;
-
- width: 15px;
- position: absolute;
- top: 0px;
- right: 0px;
- height: 200px;
- padding-top: 1px
+ border-left-width: 1px;
+ border-left-style: solid;
+ border-left-color: '#{richSkin.panelBorderColor}';
+ display: inline-block;
+ vertical-align: top;
}
.rf-sel-btn-arrow{
@@ -57,7 +51,8 @@
background-image:
"url(#{resource['org.richfaces:combo_down_button.gif']})";
cursor: pointer;
width: 15px;
- height: 15px;
+ height: 16px;
+ display: inline-block;
}
.rf-sel-btn-dis {
@@ -87,7 +82,6 @@
.rf-sel-lst-scrl{
overflow: auto;
overflow-x: hidden;
- width: 200px;
}
.rf-sel-opt{
Modified: trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/select.js
===================================================================
---
trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/select.js 2011-02-02
18:21:44 UTC (rev 21399)
+++
trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/select.js 2011-02-02
18:33:40 UTC (rev 21400)
@@ -15,18 +15,13 @@
var inputLabel = this.__getValue() ;
this.initialValue = (inputLabel != this.defaultLabel) ? inputLabel :
"";
this.selValueInput = $(document.getElementById(id+"selValue"));
- this.field = $(document.getElementById(id+"Field"));
+ this.container = this.selValueInput.parent();
this.clientItems = mergedOptions.items;
if(mergedOptions.showControl && !mergedOptions.disabled) {
- this.btn = $(document.getElementById(id+"Button"));
- this.btn.bind("mousedown", $.proxy(this.__onBtnMouseDown, this));
- this.btn.bind("mouseup", $.proxy(this.__onMouseUp, this));
-
- this.fld = $(document.getElementById(id+"Field"));
- this.fld.bind("mousedown", $.proxy(this.__onBtnMouseDown, this));
- this.fld.bind("mouseup", $.proxy(this.__onMouseUp, this));
+ this.container.bind("mousedown", $.proxy(this.__onBtnMouseDown,
this))
+ .bind("mouseup", $.proxy(this.__onMouseUp, this));
}
this.selectFirst = mergedOptions.selectFirst;
@@ -158,9 +153,9 @@
var items = this.popupList.__getItems();
if(items.length != 0) {
- this.field.removeClass("rf-sel-fld-err");
+ this.container.removeClass("rf-sel-fld-err");
} else {
- this.field.addClass("rf-sel-fld-err");
+ this.container.addClass("rf-sel-fld-err");
}
if(!this.popupList.isVisible()) {
@@ -223,7 +218,7 @@
}
});
} else {
- this.field.removeClass("rf-sel-fld-err");
+ this.container.removeClass("rf-sel-fld-err");
var prevValue = this.selValueInput.val();
if(prevValue && prevValue != "") {
Modified: trunk/ui/input/ui/src/main/templates/select.template.xml
===================================================================
--- trunk/ui/input/ui/src/main/templates/select.template.xml 2011-02-02 18:21:44 UTC (rev
21399)
+++ trunk/ui/input/ui/src/main/templates/select.template.xml 2011-02-02 18:33:40 UTC (rev
21400)
@@ -20,32 +20,30 @@
<cdk:object type="java.lang.Object" name="disabled"
value="#{component.attributes['disabled']}" />
<div id="#{clientId}" class="rf-sel">
- <div style="position : relative; overflow : hidden; text-align :
left; padding-right : 18px;">
+ <span class="rf-sel-cntr">
<input id="#{clientId}selValue" name="#{clientId}"
type="hidden" value="#{getInputValue(facesContext, component)}"/>
- <div id="#{clientId}Field" class="rf-sel-fld">
- <input cdk:passThroughWithExclusions="class autocomplete id value
disabled name type readonly onchange onblur onfocus"
- id="#{clientId}Input"
- value="#{getSelectLabel(facesContext, component)}"
- disabled="#{disabled}"
- name="#{clientId}Input"
- type="text"
- class="rf-sel-inp"
- autocomplete="off"
- readonly="#{component.attributes['enableManualInput'] ? '' :
'readonly'}"/>
- </div>
+ <input cdk:passThroughWithExclusions="class autocomplete id value
disabled name type readonly onchange onblur onfocus"
+ id="#{clientId}Input"
+ value="#{getSelectLabel(facesContext, component)}"
+ disabled="#{disabled}"
+ name="#{clientId}Input"
+ type="text"
+ class="rf-sel-inp"
+ autocomplete="off"
+ readonly="#{component.attributes['enableManualInput'] ? '' :
'readonly'}"/>
<c:if
test="#{component.attributes['showButton']}">
<c:if
test="#{component.attributes['disabled']}">
- <div id="#{clientId}Button" class="rf-sel-btn
rf-sel-btn-dis">
- <div class="rf-sel-btn-arrow"></div>
- </div>
+ <span id="#{clientId}Button" class="rf-sel-btn
rf-sel-btn-dis">
+ <span class="rf-sel-btn-arrow"></span>
+ </span>
</c:if>
<c:if
test="#{!component.attributes['disabled']}">
- <div id="#{clientId}Button"
class="rf-sel-btn">
- <div class="rf-sel-btn-arrow"></div>
- </div>
+ <span id="#{clientId}Button"
class="rf-sel-btn">
+ <span class="rf-sel-btn-arrow"></span>
+ </span>
</c:if>
</c:if>
- </div>
+ </span>
<div id="#{clientId}List"
class="#{getListCss(component)}">
<cdk:call expression="renderListHandlers(facesContext,
component);"/>
Show replies by date