add a changeId method to the OptionManager
This commit is contained in:
parent
7dfce33065
commit
7bc81fbaf9
@ -43,7 +43,7 @@ Deluge.OptionsManager = Ext.extend(Ext.util.Observable, {
|
||||
this.changed = {};
|
||||
this.defaults = config['defaults'] || {};
|
||||
this.options = {};
|
||||
|
||||
this.currentId = null;
|
||||
|
||||
this.addEvents({
|
||||
'add': true,
|
||||
@ -86,6 +86,18 @@ Deluge.OptionsManager = Ext.extend(Ext.util.Observable, {
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Changes bound fields to use the specified id.
|
||||
* @param {String} id
|
||||
*/
|
||||
changeId: function(id) {
|
||||
this.currentId = id;
|
||||
for (var option in this.defaults) {
|
||||
if (!this.binds[option]) continue;
|
||||
this.binds[option].setValue(this.getValue(id, option));
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Returns the changed values for a specified id.
|
||||
* @param {String} id
|
||||
|
||||
File diff suppressed because one or more lines are too long
Loading…
x
Reference in New Issue
Block a user