incubator-xap-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mtu...@apache.org
Subject svn commit: r463521 - /incubator/xap/trunk/src/xap/bridges/dojo/TextFieldBridge.js
Date Fri, 13 Oct 2006 00:15:15 GMT
Author: mturyn
Date: Thu Oct 12 17:15:13 2006
New Revision: 463521

URL: http://svn.apache.org/viewvc?view=rev&rev=463521
Log:
Short-circuits onBlur when the field is uneditable.

Modified:
    incubator/xap/trunk/src/xap/bridges/dojo/TextFieldBridge.js

Modified: incubator/xap/trunk/src/xap/bridges/dojo/TextFieldBridge.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/src/xap/bridges/dojo/TextFieldBridge.js?view=diff&rev=463521&r1=463520&r2=463521
==============================================================================
--- incubator/xap/trunk/src/xap/bridges/dojo/TextFieldBridge.js (original)
+++ incubator/xap/trunk/src/xap/bridges/dojo/TextFieldBridge.js Thu Oct 12 17:15:13 2006
@@ -77,6 +77,10 @@
 }	
 
 xap.bridges.dojo.TextFieldBridge.prototype.onblur = function( ){
+	// Only do the rest if read-only:	
+	if( this.getPeer().isReadOnly() ){
+		return ;
+	}
 	var text = this.getPeer().getText();
 	this.writeBackAttribute("text",text);
 	var clientEvent = new xap.session.ClientEvent(this.getElement(),this.getSession());
@@ -120,9 +124,11 @@
 	
 	// TODO: Move this to css a.s.a.p:
 	if( bReadonly == "true"){
-		this.setBackgroundColorAttribute("#cccccc") ;
+		this.setBackgroundColorAttribute("#ccccdd") ;
+		this.getPeer().domNode.style.borderStyle = "ridge" ;
 	} else {
-		this.setBackgroundColorAttribute("#ffffee") ;	 
+		this.setBackgroundColorAttribute("#ffffee") ;	
+		this.getPeer().domNode.style.borderStyle = "inset" ;		 
 	}	
 	
 }	



Mime
View raw message