Module: deluge
Branch: master
Commit: 1c807ad7c8aa0af920de384f8b8c48ba004d1818

Author: Damien Churchill <[email protected]>
Date:   Tue Mar 30 14:27:41 2010 +0100

fix tracking spinner values

---

 deluge/ui/web/js/deluge-all/MultiOptionsManager.js |   29 --------------------
 deluge/ui/web/js/deluge-all/OptionsManager.js      |    2 +
 2 files changed, 2 insertions(+), 29 deletions(-)

diff --git a/deluge/ui/web/js/deluge-all/MultiOptionsManager.js 
b/deluge/ui/web/js/deluge-all/MultiOptionsManager.js
index 154d842..79ff916 100644
--- a/deluge/ui/web/js/deluge-all/MultiOptionsManager.js
+++ b/deluge/ui/web/js/deluge-all/MultiOptionsManager.js
@@ -210,34 +210,5 @@ Deluge.MultiOptionsManager = 
Ext.extend(Deluge.OptionsManager, {
                                this.fireEvent('changed', this.currentId, 
option, value, oldValue);
                        }
                }
-       },
-
-       // Event Handlers 
-       /**
-        * Stops a form fields value from being blocked by the change functions
-        * @param {Ext.form.Field} field
-        * @private
-        */
-       onFieldChange: function(field, event) {
-               this.update(field._doption, field.getValue());
-       },
-
-       /**
-        * Handles updating binds when an option's value is changed.
-        * @param {String} id The current option id
-        * @param {String} option The option that has changed.
-        * @param {Mixed} newValue The new value
-        * @private
-        */
-       onChange: function(id, option, newValue, oldValue) {
-               // If we don't have a bind there's nothing to do.
-               if (Ext.isEmpty(this.binds[option])) return;
-               Ext.each(this.binds[option], function(bind) {
-                       // The field is currently focused so we don't want to 
-                       // change it.
-                       if (bind == this.focused) return;
-                       // Set the form field to the new value.
-                       bind.setValue(newValue);
-               }, this);
        }
 });
diff --git a/deluge/ui/web/js/deluge-all/OptionsManager.js 
b/deluge/ui/web/js/deluge-all/OptionsManager.js
index ba5c606..abbcbb5 100644
--- a/deluge/ui/web/js/deluge-all/OptionsManager.js
+++ b/deluge/ui/web/js/deluge-all/OptionsManager.js
@@ -97,6 +97,7 @@ Deluge.OptionsManager = Ext.extend(Ext.util.Observable, {
                field.on('blur', this.onFieldBlur, this);
                field.on('change', this.onFieldChange, this);
                field.on('check', this.onFieldChange, this);
+               field.on('spin', this.onFieldChange, this);
                return field;
        },
 
@@ -261,6 +262,7 @@ Deluge.OptionsManager = Ext.extend(Ext.util.Observable, {
         * @private
         */
        onFieldChange: function(field, event) {
+               if (field.field) field = field.field // fix for spinners
                this.update(field._doption, field.getValue());
        },
 

-- 
You received this message because you are subscribed to the Google Groups 
"deluge-commit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/deluge-commit?hl=en.

Reply via email to