mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-06 08:28:39 +00:00
fix tracking spinner values
This commit is contained in:
parent
6d83556ba8
commit
1c807ad7c8
2 changed files with 2 additions and 29 deletions
|
@ -210,34 +210,5 @@ Deluge.MultiOptionsManager = Ext.extend(Deluge.OptionsManager, {
|
||||||
this.fireEvent('changed', this.currentId, option, value, oldValue);
|
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);
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -97,6 +97,7 @@ Deluge.OptionsManager = Ext.extend(Ext.util.Observable, {
|
||||||
field.on('blur', this.onFieldBlur, this);
|
field.on('blur', this.onFieldBlur, this);
|
||||||
field.on('change', this.onFieldChange, this);
|
field.on('change', this.onFieldChange, this);
|
||||||
field.on('check', this.onFieldChange, this);
|
field.on('check', this.onFieldChange, this);
|
||||||
|
field.on('spin', this.onFieldChange, this);
|
||||||
return field;
|
return field;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -261,6 +262,7 @@ Deluge.OptionsManager = Ext.extend(Ext.util.Observable, {
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
onFieldChange: function(field, event) {
|
onFieldChange: function(field, event) {
|
||||||
|
if (field.field) field = field.field // fix for spinners
|
||||||
this.update(field._doption, field.getValue());
|
this.update(field._doption, field.getValue());
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue