Author: vmolotkov
Date: 2008-03-26 15:45:31 -0400 (Wed, 26 Mar 2008)
New Revision: 7277
Modified:
trunk/ui/inplaceInput/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceinput.js
trunk/ui/inplaceInput/src/main/templates/inplaceinput.jspx
Log:
RF-2685, 2656
Modified:
trunk/ui/inplaceInput/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceinput.js
===================================================================
---
trunk/ui/inplaceInput/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceinput.js 2008-03-26
19:45:25 UTC (rev 7276)
+++
trunk/ui/inplaceInput/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceinput.js 2008-03-26
19:45:31 UTC (rev 7277)
@@ -143,7 +143,7 @@
tmpValueKeyDownHandler : function(e) {
switch (e.keyCode) {
case Event.KEY_ESC :
- this.cancel();
+ this.cancel(e, this.valueKeeper.value);
break;
case Event.KEY_RETURN :
Event.stop(e);
@@ -166,7 +166,7 @@
},
cancelHandler : function(e) {
- this.cancel(e);
+ this.cancel(e, this.valueKeeper.value);
Event.stop(e);
},
@@ -259,9 +259,10 @@
this.currentState = newState;
},
- cancel : function() {
+ cancel : function(e, value) {
this.endEditableState();
- this.tempValueKeeper.value = this.valueKeeper.value;
+ this.tempValueKeeper.value = value;
+ this.currentText = value;
if (this.tempValueKeeper.value == "") {
this.setDefaultText();
}
Modified: trunk/ui/inplaceInput/src/main/templates/inplaceinput.jspx
===================================================================
--- trunk/ui/inplaceInput/src/main/templates/inplaceinput.jspx 2008-03-26 19:45:25 UTC
(rev 7276)
+++ trunk/ui/inplaceInput/src/main/templates/inplaceinput.jspx 2008-03-26 19:45:31 UTC
(rev 7277)
@@ -14,7 +14,7 @@
<h:styles>css/inplaceinput.xcss</h:styles>
<h:scripts>
new org.ajax4jsf.javascript.PrototypeScript(),
- scripts/inplaceinput.js
+ scripts/inplaceinput.js,
scripts/utils.js
</h:scripts>
<f:resource var="saveIcon"
name="org.richfaces.renderkit.html.images.SaveControlIcon"/>
Show replies by date