Author: abelevich
Date: 2008-05-07 15:13:40 -0400 (Wed, 07 May 2008)
New Revision: 8486
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/inplaceselectlist.js
Log:
http://jira.jboss.com/jira/browse/RF-3276,
http://jira.jboss.com/jira/browse/RF-3323
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-05-07
19:12:00 UTC (rev 8485)
+++
trunk/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceselect.js 2008-05-07
19:13:40 UTC (rev 8486)
@@ -208,12 +208,12 @@
var currentText;
// IE6 support
if (this.comboList.iframe) {
- this.inplaceInput.childNodes[7];
+ currentText = this.inplaceInput.childNodes[7];
} else {
- this.inplaceInput.childNodes[6];
+ currentText = this.inplaceInput.childNodes[6];
}
- return
+ return currentText;
},
getLabelItem : function(value) {
@@ -229,15 +229,13 @@
cancel : function($super, e) {
var item = this.getLabelItem(this.valueKeeper.value);
this.comboList.resetSelection();
-
+ this.comboList.hide();
if (item) {
this.comboList.doSelectItem(item);
$super(e, item.innerHTML.unescapeHTML());
} else {
$super(e, "");
}
-
- this.comboList.hide();
}
});
Modified:
trunk/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceselectlist.js
===================================================================
---
trunk/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceselectlist.js 2008-05-07
19:12:00 UTC (rev 8485)
+++
trunk/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceselectlist.js 2008-05-07
19:13:40 UTC (rev 8486)
@@ -14,14 +14,14 @@
this.createIframe(this.listParent.parentNode, this.width, this.list.id,
"");
}
- if(!this.listInjected) {
- $super(fieldTop, fieldLeft, field.offsetHeight);
- }
+ $super(fieldTop, fieldLeft, field.offsetHeight);
},
show : function($super) {
- this.isListOpened = true;
- $super();
+ if(!this.listInjected) {
+ this.isListOpened = true;
+ $super();
+ }
},
resetState : function() {
@@ -87,11 +87,20 @@
},
doActiveItem : function($super, item) {
+ this.listParent.show();
$super(item);
//
http://jira.jboss.com/jira/browse/RF-2859
- item.style.width = this.list.scrollWidth + "px";
+ var listWidth = this.list.scrollWidth;
+ if( listWidth == this.list.offsetWidth) {
+ listWidth = listWidth- Richfaces.getScrollWidth(this.list);
+ }
+
+ if (Prototype.Browser.Gecko) {
+ listWidth = listWidth - (Richfaces.getBorderWidth(item,"lr") +
Richfaces.getPaddingWidth(item,"lr") +
Richfaces.getMarginWidth(item,"lr"));
+ }
+ item.style.width = listWidth + "px";
},
-
+
doNormalItem : function($super, item) {
$super(item);
item.style.width = "";