Author: damoxc

Revision: 5848

Log:
        add support for returning all options for an id in the get() method

Diff:
Modified: branches/1.2_RC/deluge/ui/web/js/Deluge.MultiOptionsManager.js
===================================================================
--- branches/1.2_RC/deluge/ui/web/js/Deluge.MultiOptionsManager.js      
2009-10-19 02:10:43 UTC (rev 5847)
+++ branches/1.2_RC/deluge/ui/web/js/Deluge.MultiOptionsManager.js      
2009-10-20 21:32:32 UTC (rev 5848)
@@ -75,7 +75,13 @@
         */
        get: function() {
                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];
                        return (this.isDirty(id, option)) ? 
this.changed[id][option] : this.getDefault(id, option);
                } else {



--~--~---------~--~----~------------~-------~--~----~
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