Author: damoxc

Revision: 5008

Log:
        begin implementing the options panel logic

Diff:
Modified: trunk/deluge/ui/web/js/deluge-details.js
===================================================================
--- trunk/deluge/ui/web/js/deluge-details.js    2009-04-04 11:32:34 UTC (rev 
5007)
+++ trunk/deluge/ui/web/js/deluge-details.js    2009-04-04 13:02:26 UTC (rev 
5008)
@@ -349,6 +349,36 @@
                panel.layout = new Ext.layout.FormLayout();
                panel.layout.setContainer(panel);
                panel.doLayout();
+               this.form = panel.getForm();
+       },
+       
+       onRequestComplete: function(torrent) {
+               
+       },
+       
+       clear: function() {
+               this.form.findField('max_download_speed').setValue(0);
+               this.form.findField('max_upload_speed').setValue(0);
+               this.form.findField('max_connections').setValue(0);
+               this.form.findField('max_upload_slots').setValue(0);
+               this.form.findField('stop_ratio').setValue(0);
+               this.form.findField('is_auto_managed').setValue(false);
+               this.form.findField('stop_at_ratio').setValue(false);
+               this.form.findField('remove_at_ratio').setValue(false);
+               this.form.findField('private').setValue(false);
+               this.form.findField('prioritize_first_last').setValue(false);
+       },
+       
+       update: function(torrentId) {
+               Deluge.Client.core.get_torrent_status(torrentId, 
Deluge.Keys.Options, {
+                       onSuccess: this.onRequestComplete.bindWithEvent(this, 
torrentId)
+               });
+       },
+       
+       reset: function() {
+               if (this.torrentId) {
+                       delete this.changed[this.torrentId];
+               }
        }
 }
 
@@ -605,17 +635,17 @@
                                                fieldLabel: '',
                                                labelSeparator: '',
                                                boxLabel: _('Auto Managed'),
-                                               id: 'auto_managed'
+                                               id: 'is_auto_managed'
                                        }, {
                                                fieldLabel: '',
                                                labelSeparator: '',
                                                boxLabel: _('Stop seed at 
ratio'),
-                                               id: 'stop_ratio'
+                                               id: 'stop_at_ratio'
                                        }, {
                                                fieldLabel: '',
                                                labelSeparator: '',
                                                boxLabel: _('Remove at ratio'),
-                                               id: 'remove_ratio'
+                                               id: 'remove_at_ratio'
                                        }, {
                                                fieldLabel: '',
                                                labelSeparator: '',
@@ -641,7 +671,7 @@
                                                fieldLabel: '',
                                                labelSeparator: '',
                                                boxLabel: _('Prioritize 
First/Last'),
-                                               id: 'prioritize_first'
+                                               id: 'prioritize_first_last'
                                        }]
                                }, {
                                        layout: 'column',



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