Author: abelevich
Date: 2010-12-13 10:51:32 -0500 (Mon, 13 Dec 2010)
New Revision: 20531
Modified:
trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/inplaceBase.js
trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/inplaceInput.js
Log:
RF-9870
Modified:
trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/inplaceBase.js
===================================================================
---
trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/inplaceBase.js 2010-12-13
15:17:39 UTC (rev 20530)
+++
trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/inplaceBase.js 2010-12-13
15:51:32 UTC (rev 20531)
@@ -71,7 +71,6 @@
this.isSaved = true;
this.__applyChangedStyles();
- this.__hide();
this.onsave();
},
@@ -82,7 +81,6 @@
}
this.setValue(text);
this.isSaved = true;
- this.__hide();
this.oncancel();
},
Modified:
trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/inplaceInput.js
===================================================================
---
trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/inplaceInput.js 2010-12-13
15:17:39 UTC (rev 20530)
+++
trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/inplaceInput.js 2010-12-13
15:51:32 UTC (rev 20531)
@@ -65,14 +65,8 @@
__blurHandler: function(e) {
this.onblur(e);
},
-
- __changeHandler: function(e) {
- if(!this.isValueSaved()) {
- this.save();
- }
- },
-
- __isSaveOnBlur: function() {
+
+ __isSaveOnBlur: function() {
return this.saveOnBlur;
},
@@ -131,12 +125,14 @@
this.__setFocused(false);
this.invokeEvent.call(this, "blur", document.getElementById(this.id +
'Input'), e);
- if(!this.isValueSaved() && this.__isSaveOnBlur()) {
+ if(this.isValueSaved() || this.__isSaveOnBlur()) {
this.save();
} else {
- this.__hide();
+ this.cancel();
}
+ this.__hide();
+
if(!this.cancelButton) {
if(this.__isValueChanged()) {
this.invokeEvent.call(this, "change",
document.getElementById(this.id + 'Input'), e);