Author: vmolotkov
Date: 2008-02-29 08:51:32 -0500 (Fri, 29 Feb 2008)
New Revision: 6451
Modified:
trunk/sandbox/ui/inplaceInput/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceinput.js
Log:
defaultLabel functionality is corrected
Modified:
trunk/sandbox/ui/inplaceInput/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceinput.js
===================================================================
---
trunk/sandbox/ui/inplaceInput/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceinput.js 2008-02-29
13:36:26 UTC (rev 6450)
+++
trunk/sandbox/ui/inplaceInput/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceinput.js 2008-02-29
13:51:32 UTC (rev 6451)
@@ -214,7 +214,8 @@
startChangedState : function () {
this.changeState(Richfaces.InplaceInput.STATES[2]);
- this.createNewText(this.valueKeeper.value);
+ //this.createNewText(this.valueKeeper.value);
+ this.createNewText(this.currentText);
this.inplaceInput.className = this.classes.COMPONENT.CHANGED.NORMAL;
this.strut.hide();
},
@@ -272,16 +273,36 @@
if (userValue == "") {
this.setDefaultText();
this.valueKeeper.value = "";
- this.startViewState();
- } else if (userValue != this.value) {
+ //this.startViewState();
+ } else {
this.currentText = userValue;
this.valueKeeper.value = userValue;
+ }
+ if (userValue != this.value) {
this.startChangedState();
} else {
- this.currentText = userValue;
- this.valueKeeper.value = userValue;
this.startViewState();
- }
+ }
+ /*if (userValue != this.value) {
+ if (userValue == "") {
+ this.setDefaultText();
+ this.valueKeeper.value = "";
+ //this.startViewState();
+ } else {
+ this.currentText = userValue;
+ this.valueKeeper.value = userValue;
+ }
+ this.startChangedState();
+ } else {
+ if (userValue == "") {
+ this.setDefaultText();
+ this.valueKeeper.value = "";
+ } else {
+ this.currentText = userValue;
+ this.valueKeeper.value = userValue;
+ }
+ this.startViewState();
+ } */
if (this.events.onviewactivated) {
this.inplaceInput.fire("rich:onviewactivated", {oldValue :
this.valueKeeper.value, value : this.tempValueKeeper.value});
}
Show replies by date