From eb64909db646348db3fcacae2bb324c378fce645 Mon Sep 17 00:00:00 2001 From: Benjamin Renard Date: Mon, 28 Jul 2008 17:14:37 +0000 Subject: [PATCH] =?UTF-8?q?-=20LSformElement=5Ftext=5Ffield.js=20:=20=09->?= =?UTF-8?q?=20Correction=20d'un=20bug=20lors=20d'FX=20concurrent=20=09->?= =?UTF-8?q?=20this.onChangeColor=20:=20mis=20en=20param=C3=A8tre=20de=20la?= =?UTF-8?q?=20couleur=20lors=20d'un=20changement.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- trunk/includes/js/LSformElement_text_field.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/trunk/includes/js/LSformElement_text_field.js b/trunk/includes/js/LSformElement_text_field.js index cd662cf8..069c0a73 100644 --- a/trunk/includes/js/LSformElement_text_field.js +++ b/trunk/includes/js/LSformElement_text_field.js @@ -6,6 +6,7 @@ var LSformElement_text_field = new Class({ this.params = varLSdefault.LSjsConfig[this.name]; this._auto=1; this.input.addEvent('change',this.unauto.bind(this)); + this.onChangeColor = '#f16d6d'; }, start: function() { @@ -24,6 +25,7 @@ var LSformElement_text_field = new Class({ var input = this.parent.getInput.bind(this.parent)(el); input.addEvent('change',this.refreshValue.bind(this)); },this); + this.oldBg=this.input.getStyle('background-color'); this.fx = new Fx.Tween(this.input,{property: 'background-color',duration:600}); } } @@ -41,8 +43,7 @@ var LSformElement_text_field = new Class({ refreshValue: function() { if (this._auto) { this.input.value=getFData(this.format,this.parent,'getValue'); - this.oldBg=this.input.getStyle('background-color'); - this.fx.start('#f16d6d'); + this.fx.start(this.onChangeColor); (function() {this.fx.start(this.oldBg);}).delay(1000,this); } },