Author: damoxc

Revision: 5692

Log:
        include yet more preferences (ssl, port, certificate locations)

Diff:
Modified: trunk/deluge/ui/web/js/Deluge.Preferences.Interface.js
===================================================================
--- trunk/deluge/ui/web/js/Deluge.Preferences.Interface.js      2009-08-20 
00:54:57 UTC (rev 5691)
+++ trunk/deluge/ui/web/js/Deluge.Preferences.Interface.js      2009-08-20 
00:55:58 UTC (rev 5692)
@@ -18,7 +18,8 @@
                var fieldset = this.add({
                        xtype: 'fieldset',
                        border: false,
-                       title: _('Window'),
+                       title: _('Interface'),
+                       style: 'margin-bottom: 5px; padding-bottom: 5px;',
                        autoHeight: true,
                        labelWidth: 1,
                        defaultType: 'checkbox'
@@ -29,15 +30,6 @@
                        labelSeparator: '',
                        boxLabel: _('Show session speed in titlebar')
                }));
-               
-               fieldset = this.add({
-                       xtype: 'fieldset',
-                       border: false,
-                       title: _('Sidebar'),
-                       autoHeight: true,
-                       labelWidth: 1,
-                       defaultType: 'checkbox'
-               });
                optMan.bind('sidebar_show_zero', fieldset.add({
                        name: 'sidebar_show_zero',
                        fieldLabel: '',
@@ -55,6 +47,7 @@
                        xtype: 'fieldset',
                        border: false,
                        title: _('Password'),
+                       style: 'margin-bottom: 0px; padding-bottom: 0px;',
                        autoHeight: true,
                        labelWidth: 110,
                        defaultType: 'textfield',
@@ -98,7 +91,7 @@
                fieldset = this.add({
                        xtype: 'fieldset',
                        border: false,
-                       title: _('Session'),
+                       title: _('Server'),
                        autoHeight: true,
                        labelWidth: 110,
                        defaultType: 'uxspinner',
@@ -108,8 +101,46 @@
                });
                optMan.bind('session_timeout', fieldset.add({
                        name: 'session_timeout',
-                       fieldLabel: _('Session Timeout')
+                       fieldLabel: _('Session Timeout'),
+                       strategy: {
+                               xtype: 'number',
+                               decimalPrecision: 0,
+                               minValue: -1,
+                               maxValue: 99999
+                       }
                }));
+               optMan.bind('port', fieldset.add({
+                       name: 'port',
+                       fieldLabel: _('Port'),
+                       strategy: {
+                               xtype: 'number',
+                               decimalPrecision: 0,
+                               minValue: -1,
+                               maxValue: 99999
+                       }
+               }));
+               this.httpsField = optMan.bind('https', fieldset.add({
+                       xtype: 'checkbox',
+                       name: 'https',
+                       hideLabel: true,
+                       width: 320,
+                       boxLabel: _('Use SSL (paths relative to the Deluge 
config folder)')
+               }));
+               this.httpsField.on('check', this.onSSLCheck, this);
+               this.pkeyField = optMan.bind('pkey', fieldset.add({
+                       xtype: 'textfield',
+                       disabled: true,
+                       name: 'pkey',
+                       width: 180,
+                       fieldLabel: _('Private Key')
+               }));
+               this.certField = optMan.bind('cert', fieldset.add({
+                       xtype: 'textfield',
+                       disabled: true,
+                       name: 'cert',
+                       width: 180,
+                       fieldLabel: _('Certificate')
+               }));
        },
        
        onApply: function() {
@@ -172,7 +203,7 @@
        },
        
        onSetConfig: function() {
-               this.getOptionsManager().commit();
+               this.optionsManager.commit();
        },
        
        onShow: function() {
@@ -181,6 +212,11 @@
                        success: this.onGotConfig,
                        scope: this
                })
+       },
+       
+       onSSLCheck: function(e, checked) {
+               this.pkeyField.setDisabled(!checked);
+               this.certField.setDisabled(!checked);
        }
 });
 Deluge.Preferences.addPage(new Ext.deluge.preferences.Interface());
\ No newline at end of file



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