Author: abelevich
Date: 2008-03-27 10:55:03 -0400 (Thu, 27 Mar 2008)
New Revision: 7304
Modified:
trunk/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/css/inplaceselect.xcss
trunk/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceselect.js
Log:
http://jira.jboss.com/jira/browse/RF-2794
Modified:
trunk/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/css/inplaceselect.xcss
===================================================================
---
trunk/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/css/inplaceselect.xcss 2008-03-27
14:54:47 UTC (rev 7303)
+++
trunk/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/css/inplaceselect.xcss 2008-03-27
14:55:03 UTC (rev 7304)
@@ -100,6 +100,7 @@
top:0;
left:0;
position : absolute;
+ font-size: 11px;
}
.rich-inplace-select-list-shadow{
Modified:
trunk/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceselect.js
===================================================================
---
trunk/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceselect.js 2008-03-27
14:54:47 UTC (rev 7303)
+++
trunk/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceselect.js 2008-03-27
14:55:03 UTC (rev 7304)
@@ -132,9 +132,10 @@
saveValue : function($super) {
this.applyTmpValue();
- if (!this.comboList.isList || this.clickOnBar) {
+ if ((!this.comboList.isList || this.clickOnBar) && this.tempValueKeeper.value)
{
this.save(this.currentItemValue, this.tempValueKeeper.value);
}
+ this.comboList.hide();
},
applyTmpValue : function() {
@@ -169,11 +170,15 @@
cancel : function($super, e) {
var item = this.getLabelItem(this.valueKeeper.value);
- if (this.comboList.selectedItem) {
- this.comboList.doNormalItem(this.comboList.selectedItem);
+ if (item) {
+ if (this.comboList.selectedItem) {
+ this.comboList.doNormalItem(this.comboList.selectedItem);
+ }
+ this.comboList.doSelectItem(item);
+ $super(e, item.innerHTML);
+ this.comboList.hide();
}
- this.comboList.doSelectItem(item);
- $super(e, item.innerHTML);
+ return false;
}
});