mirror of
https://git.deluge-torrent.org/deluge
synced 2025-04-21 03:54:50 +00:00
add a changeId method to the OptionManager
This commit is contained in:
parent
7dfce33065
commit
7bc81fbaf9
2 changed files with 14 additions and 2 deletions
|
@ -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…
Add table
Reference in a new issue