[WebUI] Tidy Interface page layout

This commit is contained in:
Calum Lind 2016-04-24 22:02:23 +01:00
parent cb158ca866
commit 9fbc63e6fb
1 changed files with 33 additions and 39 deletions

View File

@ -32,34 +32,31 @@ Deluge.preferences.Interface = Ext.extend(Ext.form.FormPanel, {
style: 'margin-bottom: 0px; padding-bottom: 5px; padding-top: 5px', style: 'margin-bottom: 0px; padding-bottom: 5px; padding-top: 5px',
autoHeight: true, autoHeight: true,
labelWidth: 1, labelWidth: 1,
defaultType: 'checkbox' defaultType: 'checkbox',
defaults: {
height: 17,
fieldLabel: '',
labelSeparator: ''
}
}); });
om.bind('show_session_speed', fieldset.add({ om.bind('show_session_speed', fieldset.add({
name: 'show_session_speed', name: 'show_session_speed',
height: 17,
fieldLabel: '',
labelSeparator: '',
boxLabel: _('Show session speed in titlebar') boxLabel: _('Show session speed in titlebar')
})); }));
om.bind('sidebar_show_zero', fieldset.add({ om.bind('sidebar_show_zero', fieldset.add({
name: 'sidebar_show_zero', name: 'sidebar_show_zero',
height: 17,
fieldLabel: '',
labelSeparator: '',
boxLabel: _('Show filters with zero torrents') boxLabel: _('Show filters with zero torrents')
})); }));
om.bind('sidebar_multiple_filters', fieldset.add({ om.bind('sidebar_multiple_filters', fieldset.add({
name: 'sidebar_multiple_filters', name: 'sidebar_multiple_filters',
height: 17,
fieldLabel: '',
labelSeparator: '',
boxLabel: _('Allow the use of multiple filters at once') boxLabel: _('Allow the use of multiple filters at once')
})); }));
var languagePanel = this.add({ var languagePanel = this.add({
xtype: 'fieldset', xtype: 'fieldset',
border: false, border: false,
title: _('Language'), title: _('Language'),
style: 'margin-bottom: 0px; padding-bottom: 5px; padding-top: 8px', style: 'margin-bottom: 0px; padding-bottom: 5px; padding-top: 5px',
autoHeight: true, autoHeight: true,
labelWidth: 1, labelWidth: 1,
defaultType: 'checkbox' defaultType: 'checkbox'
@ -82,46 +79,43 @@ Deluge.preferences.Interface = Ext.extend(Ext.form.FormPanel, {
fieldset = this.add({ fieldset = this.add({
xtype: 'fieldset', xtype: 'fieldset',
border: false, border: false,
title: _('Password'), title: _('WebUI Password'),
style: 'margin-bottom: 0px; padding-bottom: 0px; padding-top: 5px', style: 'margin-bottom: 0px; padding-bottom: 5px; padding-top: 5px',
autoHeight: true, autoHeight: true,
labelWidth: 110, labelWidth: 100,
defaultType: 'textfield', defaultType: 'textfield',
defaults: { defaults: {
width: 180, width: 100,
inputType: 'password' inputType: 'password',
labelStyle: 'padding-left: 5px',
height: 20,
labelSeparator: ''
} }
}); });
this.oldPassword = fieldset.add({ this.oldPassword = fieldset.add({
name: 'old_password', name: 'old_password',
fieldLabel: _('Old Password:'), fieldLabel: _('Old:'),
height: 20,
labelSeparator: ''
}); });
this.newPassword = fieldset.add({ this.newPassword = fieldset.add({
name: 'new_password', name: 'new_password',
fieldLabel: _('New Password:'), fieldLabel: _('New:'),
height: 20,
labelSeparator: ''
}); });
this.confirmPassword = fieldset.add({ this.confirmPassword = fieldset.add({
name: 'confirm_password', name: 'confirm_password',
fieldLabel: _('Confirm Password:'), fieldLabel: _('Confirm:'),
height: 20,
labelSeparator: ''
}); });
var panel = fieldset.add({ var panel = fieldset.add({
xtype: 'panel', xtype: 'panel',
autoHeight: true, autoHeight: true,
border: false, border: false,
width: 320, width: 310,
bodyStyle: 'padding-left: 230px' bodyStyle: 'padding-left: 110px'
}) })
panel.add({ panel.add({
xtype: 'button', xtype: 'button',
text: _('Change'), text: _('Change Password'),
listeners: { listeners: {
'click': { 'click': {
fn: this.onPasswordChange, fn: this.onPasswordChange,
@ -134,18 +128,20 @@ Deluge.preferences.Interface = Ext.extend(Ext.form.FormPanel, {
xtype: 'fieldset', xtype: 'fieldset',
border: false, border: false,
title: _('Server'), title: _('Server'),
style: 'margin-top: 0px; padding-top: 0px; margin-bottom: 0px; padding-bottom: 0px', style: 'padding-top: 3px; margin-bottom: 0px; padding-bottom: 5px',
autoHeight: true, autoHeight: true,
labelWidth: 110, labelWidth: 100,
defaultType: 'spinnerfield', defaultType: 'spinnerfield',
defaults: { defaults: {
labelSeparator: '',
labelStyle: 'padding-left: 5px',
height: 20,
width: 80 width: 80
} }
}); });
om.bind('session_timeout', fieldset.add({ om.bind('session_timeout', fieldset.add({
name: 'session_timeout', name: 'session_timeout',
fieldLabel: _('Session Timeout:'), fieldLabel: _('Session Timeout:'),
labelSeparator: '',
decimalPrecision: 0, decimalPrecision: 0,
minValue: -1, minValue: -1,
maxValue: 99999 maxValue: 99999
@ -153,18 +149,17 @@ Deluge.preferences.Interface = Ext.extend(Ext.form.FormPanel, {
om.bind('port', fieldset.add({ om.bind('port', fieldset.add({
name: 'port', name: 'port',
fieldLabel: _('Port:'), fieldLabel: _('Port:'),
labelSeparator: '',
decimalPrecision: 0, decimalPrecision: 0,
minValue: -1, minValue: 1,
maxValue: 99999 maxValue: 65535
})); }));
this.httpsField = om.bind('https', fieldset.add({ this.httpsField = om.bind('https', fieldset.add({
xtype: 'checkbox', xtype: 'checkbox',
name: 'https', name: 'https',
hideLabel: true, hideLabel: true,
width: 280, width: 300,
height: 17, style: 'margin-left: 5px',
boxLabel: _('Use SSL (paths relative to Deluge config folder)') boxLabel: _('Enable SSL (paths relative to Deluge config folder)')
})); }));
this.httpsField.on('check', this.onSSLCheck, this); this.httpsField.on('check', this.onSSLCheck, this);
this.pkeyField = om.bind('pkey', fieldset.add({ this.pkeyField = om.bind('pkey', fieldset.add({
@ -173,7 +168,7 @@ Deluge.preferences.Interface = Ext.extend(Ext.form.FormPanel, {
name: 'pkey', name: 'pkey',
width: 180, width: 180,
fieldLabel: _('Private Key:'), fieldLabel: _('Private Key:'),
labelSeparator: ''
})); }));
this.certField = om.bind('cert', fieldset.add({ this.certField = om.bind('cert', fieldset.add({
xtype: 'textfield', xtype: 'textfield',
@ -181,7 +176,6 @@ Deluge.preferences.Interface = Ext.extend(Ext.form.FormPanel, {
name: 'cert', name: 'cert',
width: 180, width: 180,
fieldLabel: _('Certificate:'), fieldLabel: _('Certificate:'),
labelSeparator: ''
})); }));
}, },