mirror of
https://git.deluge-torrent.org/deluge
synced 2025-09-10 20:15:38 +00:00
add a property to the field object since we can't use a bi directional lookup in javascript :(
This commit is contained in:
parent
174d974da8
commit
deac8e0128
1 changed files with 2 additions and 3 deletions
|
@ -79,7 +79,7 @@ Deluge.OptionsManager = Ext.extend(Ext.util.Observable, {
|
||||||
*/
|
*/
|
||||||
bind: function(option, field) {
|
bind: function(option, field) {
|
||||||
this.binds[option] = field;
|
this.binds[option] = field;
|
||||||
this.binds[field] = option;
|
field._doption = option;
|
||||||
|
|
||||||
field.on('focus', this.onFieldFocus, this);
|
field.on('focus', this.onFieldFocus, this);
|
||||||
field.on('blur', this.onFieldBlur, this);
|
field.on('blur', this.onFieldBlur, this);
|
||||||
|
@ -218,8 +218,7 @@ Deluge.OptionsManager = Ext.extend(Ext.util.Observable, {
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
onFieldChange: function(field, event) {
|
onFieldChange: function(field, event) {
|
||||||
var option = this.binds[field];
|
this.update(field._doption, field.getValue());
|
||||||
this.update(option, field.getValue());
|
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue