Author: artdaw
Date: 2009-03-26 19:44:14 -0400 (Thu, 26 Mar 2009)
New Revision: 13237
Modified:
trunk/ui/colorPicker/src/main/resources/org/richfaces/renderkit/html/scripts/ui.colorpicker.js
Log:
https://jira.jboss.org/jira/browse/RF-6614 - empty input fields (R,G,B for example) are
filled with 0 value. Bug is fixed
Modified:
trunk/ui/colorPicker/src/main/resources/org/richfaces/renderkit/html/scripts/ui.colorpicker.js
===================================================================
---
trunk/ui/colorPicker/src/main/resources/org/richfaces/renderkit/html/scripts/ui.colorpicker.js 2009-03-26
20:28:49 UTC (rev 13236)
+++
trunk/ui/colorPicker/src/main/resources/org/richfaces/renderkit/html/scripts/ui.colorpicker.js 2009-03-26
23:44:14 UTC (rev 13237)
@@ -149,6 +149,12 @@
var col;
target = target || e.target;
+ for (i=0; i <= this.fields.length; i++){
+ if(this.fields.eq(i).val() == "" || this.fields.eq(i).val() == null){
+ this.fields.eq(i).val(0);
+ }
+ }
+
if (target.parentNode.className.indexOf('-hex') > 0) {
if(this.patternHex.test(target.value)){
target.value = 0;