Author: vmolotkov
Date: 2008-08-15 15:38:08 -0400 (Fri, 15 Aug 2008)
New Revision: 10122
Modified:
trunk/ui/inplaceInput/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceinput.js
trunk/ui/inplaceInput/src/main/templates/inplaceinput.jspx
Log:
https://jira.jboss.org/jira/browse/RF-2826
https://jira.jboss.org/jira/browse/RF-4147
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-08-15
16:39:23 UTC (rev 10121)
+++
trunk/ui/inplaceInput/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceinput.js 2008-08-15
19:38:08 UTC (rev 10122)
@@ -5,13 +5,13 @@
Richfaces.InplaceInput.prototype = {
//TODO: remove $$$$$
initialize: function(clientId, temValueKeepId, valueKeepId, tabberId, attributes,
events, classes, barParams) {
+ //TODO: delete tabberId from parameters
this.inplaceInput = $(clientId);
this.inplaceInput.component = this;
this.tempValueKeeper = $(temValueKeepId);
this.valueKeeper = $(valueKeepId);
this.attributes = attributes;
- //this.tabber = $(tabberId);
this.events = events;
this.classes = classes;
@@ -123,7 +123,7 @@
},
tmpValueBlurHandler : function() {
- if (this.clickOnBar || this.byTab) {
+ if (this.clickOnBar) {
this.clickOnBar = false;
return;
}
@@ -136,7 +136,8 @@
tmpValueKeyDownHandler : function(e) {
switch (e.keyCode) {
case Event.KEY_ESC :
- this.cancel(e);
+ this.cancel(e);
+ Event.stop(e);
break;
case Event.KEY_RETURN :
if (this.attributes.showControls) {
@@ -147,8 +148,9 @@
}
break;
case Event.KEY_TAB :
- this.save();
- //this.byTab = true;
+ if (this.attributes.showControls) {
+ this.save();
+ }
break;
}
},
@@ -173,7 +175,7 @@
this.bar.hide();
}
- this.tempValueKeeper.style.clip = 'rect(0px,0px,10px,10px)';
+ this.tempValueKeeper.style.clip = 'rect(0px 0px 10px 10px)';
},
/*endChangedState : function() {
@@ -189,7 +191,7 @@
var textWidth= this.inplaceInput.offsetWidth;
var inputSize = this.setInputWidth(textWidth);
- this.tempValueKeeper.style.clip = 'rect(auto,auto,auto,auto)';
+ this.tempValueKeeper.style.clip = 'rect(auto auto auto auto)';
this.inplaceInput.className = this.classes.COMPONENT.EDITABLE;
if (this.bar) {
Modified: trunk/ui/inplaceInput/src/main/templates/inplaceinput.jspx
===================================================================
--- trunk/ui/inplaceInput/src/main/templates/inplaceinput.jspx 2008-08-15 16:39:23 UTC
(rev 10121)
+++ trunk/ui/inplaceInput/src/main/templates/inplaceinput.jspx 2008-08-15 19:38:08 UTC
(rev 10122)
@@ -88,7 +88,7 @@
<input id='#{clientId}tempValue'
class='rich-inplace-field'
- style='clip:rect(0px,0px,10px,10px)'
+ style='clip:rect(0px 0px 10px 10px)'
type='text'
autocomplete="off"
value='#{fieldValue}'