mirror of
https://gitlab.easter-eggs.com/ee/ldapsaisie.git
synced 2024-11-26 11:52:59 +01:00
- LSformElement_text_field.js :
-> Correction d'un bug lors d'FX concurrent -> this.onChangeColor : mis en paramètre de la couleur lors d'un changement.
This commit is contained in:
parent
dd5815ee8f
commit
eb64909db6
1 changed files with 3 additions and 2 deletions
|
@ -6,6 +6,7 @@ var LSformElement_text_field = new Class({
|
||||||
this.params = varLSdefault.LSjsConfig[this.name];
|
this.params = varLSdefault.LSjsConfig[this.name];
|
||||||
this._auto=1;
|
this._auto=1;
|
||||||
this.input.addEvent('change',this.unauto.bind(this));
|
this.input.addEvent('change',this.unauto.bind(this));
|
||||||
|
this.onChangeColor = '#f16d6d';
|
||||||
},
|
},
|
||||||
|
|
||||||
start: function() {
|
start: function() {
|
||||||
|
@ -24,6 +25,7 @@ var LSformElement_text_field = new Class({
|
||||||
var input = this.parent.getInput.bind(this.parent)(el);
|
var input = this.parent.getInput.bind(this.parent)(el);
|
||||||
input.addEvent('change',this.refreshValue.bind(this));
|
input.addEvent('change',this.refreshValue.bind(this));
|
||||||
},this);
|
},this);
|
||||||
|
this.oldBg=this.input.getStyle('background-color');
|
||||||
this.fx = new Fx.Tween(this.input,{property: 'background-color',duration:600});
|
this.fx = new Fx.Tween(this.input,{property: 'background-color',duration:600});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -41,8 +43,7 @@ var LSformElement_text_field = new Class({
|
||||||
refreshValue: function() {
|
refreshValue: function() {
|
||||||
if (this._auto) {
|
if (this._auto) {
|
||||||
this.input.value=getFData(this.format,this.parent,'getValue');
|
this.input.value=getFData(this.format,this.parent,'getValue');
|
||||||
this.oldBg=this.input.getStyle('background-color');
|
this.fx.start(this.onChangeColor);
|
||||||
this.fx.start('#f16d6d');
|
|
||||||
(function() {this.fx.start(this.oldBg);}).delay(1000,this);
|
(function() {this.fx.start(this.oldBg);}).delay(1000,this);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue