add support for returning all options for an id in the get() method
This commit is contained in:
parent
f55bc6c9d8
commit
b9ae412d06
@ -75,7 +75,13 @@ Deluge.MultiOptionsManager = Ext.extend(Deluge.OptionsManager, {
|
|||||||
*/
|
*/
|
||||||
get: function() {
|
get: function() {
|
||||||
var id = arguments[0];
|
var id = arguments[0];
|
||||||
if (arguments.length == 2) {
|
if (arguments.length == 1) {
|
||||||
|
var options = {};
|
||||||
|
for (var option in this.options) {
|
||||||
|
options[option] = (this.isDirty(id, option)) ? this.changed[id][option] : this.getDefault(id, option);
|
||||||
|
}
|
||||||
|
return options;
|
||||||
|
} else if (arguments.length == 2) {
|
||||||
var option = arguments[1];
|
var option = arguments[1];
|
||||||
return (this.isDirty(id, option)) ? this.changed[id][option] : this.getDefault(id, option);
|
return (this.isDirty(id, option)) ? this.changed[id][option] : this.getDefault(id, option);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user