[richfaces-svn-commits] JBoss Rich Faces SVN: r430 - trunk/richfaces/inputnumber-spinner/src/main/resources/org/richfaces/renderkit/html/script.

richfaces-svn-commits at lists.jboss.org richfaces-svn-commits at lists.jboss.org
Sat Apr 14 13:49:02 EDT 2007


Author: sergeyhalipov
Date: 2007-04-14 13:49:02 -0400 (Sat, 14 Apr 2007)
New Revision: 430

Modified:
   trunk/richfaces/inputnumber-spinner/src/main/resources/org/richfaces/renderkit/html/script/SpinnerScript.js
Log:
Fix input style for various values enableManualInput and disabled attributes.

Modified: trunk/richfaces/inputnumber-spinner/src/main/resources/org/richfaces/renderkit/html/script/SpinnerScript.js
===================================================================
--- trunk/richfaces/inputnumber-spinner/src/main/resources/org/richfaces/renderkit/html/script/SpinnerScript.js	2007-04-14 16:52:43 UTC (rev 429)
+++ trunk/richfaces/inputnumber-spinner/src/main/resources/org/richfaces/renderkit/html/script/SpinnerScript.js	2007-04-14 17:49:02 UTC (rev 430)
@@ -90,16 +90,12 @@
 	},
 
 	_load: function(){
-		if (this.edited){
-			if (this.options.disabled){
-				this.controls.edit.disabled = "disabled";
-				this.controls.edit.style.color = "gray";
-			} else {
-				this.controls.edit.readOnly = "";
-				this.controls.edit.style.color = this.controls.originalColor;
-			}
-		} else{
-			this.controls.edit.readOnly = "readOnly";		
+		this.controls.edit.readOnly = this.edited ? "" : "readOnly";
+		if (this.options.disabled) {
+			this.controls.edit.readOnly = "readOnly";
+			Element.setStyle(this.controls.edit, {color: "gray"});
+		} else {
+			Element.setStyle(this.controls.edit, {color: ""});
 		}
 	},
 




More information about the richfaces-svn-commits mailing list