fix the layout of the options tab
This commit is contained in:
parent
d011c61971
commit
6669dbb4a0
|
@ -22,20 +22,22 @@ Copyright:
|
||||||
*/
|
*/
|
||||||
|
|
||||||
Ext.deluge.details.OptionsTab = Ext.extend(Ext.form.FormPanel, {
|
Ext.deluge.details.OptionsTab = Ext.extend(Ext.form.FormPanel, {
|
||||||
|
|
||||||
title: _('Options'),
|
title: _('Options'),
|
||||||
cls: 'x-deluge-options',
|
cls: 'x-deluge-options',
|
||||||
|
|
||||||
constructor: function(config) {
|
constructor: function(config) {
|
||||||
config = Ext.apply({
|
this.initialConfig = {
|
||||||
title: _('Options'),
|
|
||||||
frame: true,
|
|
||||||
autoScroll:true,
|
autoScroll:true,
|
||||||
deferredRender:false,
|
|
||||||
|
|
||||||
|
deferredRender:false
|
||||||
|
}
|
||||||
|
config = Ext.apply({
|
||||||
items: [{
|
items: [{
|
||||||
layout: 'column',
|
layout: 'column',
|
||||||
|
border: false,
|
||||||
|
bodyStyle: 'padding: 5px;',
|
||||||
defaults: {
|
defaults: {
|
||||||
//columnWidth: '.33',
|
|
||||||
border: false
|
border: false
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -57,6 +59,7 @@ Ext.deluge.details.OptionsTab = Ext.extend(Ext.form.FormPanel, {
|
||||||
cls: 'x-deluge-options-label'
|
cls: 'x-deluge-options-label'
|
||||||
}, {
|
}, {
|
||||||
id: 'max_download_speed',
|
id: 'max_download_speed',
|
||||||
|
name: 'max_download_speed',
|
||||||
width: 100,
|
width: 100,
|
||||||
value: -1,
|
value: -1,
|
||||||
strategy: new Ext.ux.form.Spinner.NumberStrategy({
|
strategy: new Ext.ux.form.Spinner.NumberStrategy({
|
||||||
|
@ -171,6 +174,8 @@ Ext.deluge.details.OptionsTab = Ext.extend(Ext.form.FormPanel, {
|
||||||
}]
|
}]
|
||||||
}, {
|
}, {
|
||||||
layout: 'column',
|
layout: 'column',
|
||||||
|
border: false,
|
||||||
|
defaults: {border: false},
|
||||||
items: [{
|
items: [{
|
||||||
items: [{
|
items: [{
|
||||||
id: 'edit_trackers',
|
id: 'edit_trackers',
|
||||||
|
@ -178,6 +183,7 @@ Ext.deluge.details.OptionsTab = Ext.extend(Ext.form.FormPanel, {
|
||||||
text: _('Edit Trackers'),
|
text: _('Edit Trackers'),
|
||||||
cls: 'x-btn-text-icon',
|
cls: 'x-btn-text-icon',
|
||||||
iconCls: 'x-deluge-edit-trackers',
|
iconCls: 'x-deluge-edit-trackers',
|
||||||
|
border: false,
|
||||||
width: 100
|
width: 100
|
||||||
}]
|
}]
|
||||||
}, {
|
}, {
|
||||||
|
@ -186,6 +192,7 @@ Ext.deluge.details.OptionsTab = Ext.extend(Ext.form.FormPanel, {
|
||||||
xtype: 'button',
|
xtype: 'button',
|
||||||
text: _('Apply'),
|
text: _('Apply'),
|
||||||
style: 'margin-left: 10px',
|
style: 'margin-left: 10px',
|
||||||
|
border: false,
|
||||||
width: 100
|
width: 100
|
||||||
}]
|
}]
|
||||||
}]
|
}]
|
||||||
|
@ -198,22 +205,23 @@ Ext.deluge.details.OptionsTab = Ext.extend(Ext.form.FormPanel, {
|
||||||
|
|
||||||
onRender: function(ct, position) {
|
onRender: function(ct, position) {
|
||||||
Ext.deluge.details.OptionsTab.superclass.onRender.call(this, ct, position);
|
Ext.deluge.details.OptionsTab.superclass.onRender.call(this, ct, position);
|
||||||
this.layout = new Ext.layout.FormLayout();
|
this.layout = new Ext.layout.ColumnLayout();
|
||||||
this.layout.setContainer(this);
|
this.layout.setContainer(this);
|
||||||
this.doLayout();
|
this.doLayout();
|
||||||
},
|
},
|
||||||
|
|
||||||
clear: function() {
|
clear: function() {
|
||||||
this.findField('max_download_speed').setValue(0);
|
var form = this.getForm();
|
||||||
this.findField('max_upload_speed').setValue(0);
|
//form.findField('max_download_speed').setValue(0);
|
||||||
this.findField('max_connections').setValue(0);
|
//form.findField('max_upload_speed').setValue(0);
|
||||||
this.findField('max_upload_slots').setValue(0);
|
//form.findField('max_connections').setValue(0);
|
||||||
this.findField('stop_ratio').setValue(0);
|
//form.findField('max_upload_slots').setValue(0);
|
||||||
this.findField('is_auto_managed').setValue(false);
|
//form.findField('stop_ratio').setValue(0);
|
||||||
this.findField('stop_at_ratio').setValue(false);
|
//form.findField('is_auto_managed').setValue(false);
|
||||||
this.findField('remove_at_ratio').setValue(false);
|
//form.findField('stop_at_ratio').setValue(false);
|
||||||
this.findField('private').setValue(false);
|
//form.findField('remove_at_ratio').setValue(false);
|
||||||
this.findField('prioritize_first_last').setValue(false);
|
//form.findField('private').setValue(false);
|
||||||
|
//form.findField('prioritize_first_last').setValue(false);
|
||||||
},
|
},
|
||||||
|
|
||||||
reset: function() {
|
reset: function() {
|
||||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue