Author: abelevich
Date: 2011-01-28 12:07:14 -0500 (Fri, 28 Jan 2011)
New Revision: 21309
Modified:
trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/inplaceSelect.js
Log:
https://issues.jboss.org/browse/RF-10163 inplaceSelect: showPopup js API works wrong with
default label
Modified:
trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/inplaceSelect.js
===================================================================
---
trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/inplaceSelect.js 2011-01-28
15:56:14 UTC (rev 21308)
+++
trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/inplaceSelect.js 2011-01-28
17:07:14 UTC (rev 21309)
@@ -56,21 +56,34 @@
onshow: function() {
$super.onshow.call(this);
if(this.openOnEdit) {
- this.showPopup();
+ this.__showPopup();
}
},
onhide: function() {
- this.hidePopup();
+ this.__hidePopup();
},
showPopup: function() {
+ this.editState = true;
+ this.scrollElements = rf.Event.bindScrollEventHandlers(this.id, this.__scrollHandler,
this);
+ this.__setInputFocus();
+ this.__setFocused(true);
+ this.focusValue = this.getValue();
+ this.invokeEvent.call(this, "focus", document.getElementById(this.id +
'Input'));
+ this.__showPopup();
+
+
+ },
+
+ __showPopup: function() {
this.popupList.show();
- this.__hideLabel();
+ this.__hideLabel();
},
- hidePopup: function() {
+ __hidePopup: function() {
this.popupList.hide();
+ this.__showLabel();
},
onsave: function() {
@@ -91,7 +104,7 @@
},
onblur: function(e) {
- this.hidePopup();
+ this.__hidePopup();
$super.onblur.call(this);
},
@@ -108,7 +121,7 @@
this.setValue(label);
this.__setInputFocus();
- this.hidePopup();
+ this.__hidePopup();
if(this.saveOnSelect) {
this.save();
@@ -133,7 +146,7 @@
saveItemValue: function(value) {
this.selValueInput.val(value);
- this.__showLabel();
+
},
getItemLabel: function(item) {
@@ -203,7 +216,7 @@
},
__clickHandler: function(e) {
- this.showPopup();
+ this.__showPopup();
},
__onListMouseDown: function(e) {