From deac8e0128245a66f4d594fedb9285336eee7477 Mon Sep 17 00:00:00 2001 From: Damien Churchill Date: Tue, 28 Jul 2009 22:04:00 +0000 Subject: [PATCH] add a property to the field object since we can't use a bi directional lookup in javascript :( --- deluge/ui/web/js/Deluge.OptionsManager.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/deluge/ui/web/js/Deluge.OptionsManager.js b/deluge/ui/web/js/Deluge.OptionsManager.js index 58058f599..2416c14ab 100644 --- a/deluge/ui/web/js/Deluge.OptionsManager.js +++ b/deluge/ui/web/js/Deluge.OptionsManager.js @@ -79,7 +79,7 @@ Deluge.OptionsManager = Ext.extend(Ext.util.Observable, { */ bind: function(option, field) { this.binds[option] = field; - this.binds[field] = option; + field._doption = option; field.on('focus', this.onFieldFocus, this); field.on('blur', this.onFieldBlur, this); @@ -218,8 +218,7 @@ Deluge.OptionsManager = Ext.extend(Ext.util.Observable, { * @private */ onFieldChange: function(field, event) { - var option = this.binds[field]; - this.update(option, field.getValue()); + this.update(field._doption, field.getValue()); }, /**