From 8cb55983bbf186daac7b49c3a5d7dd565a2aae24 Mon Sep 17 00:00:00 2001 From: Chase Sterling Date: Fri, 4 Jan 2013 18:43:06 -0500 Subject: [PATCH] Add move complete location to webui add torrent dialog. --- ChangeLog | 1 + .../ui/web/js/deluge-all/add/OptionsPanel.js | 2 +- deluge/ui/web/js/deluge-all/add/OptionsTab.js | 23 +++++++++++++++++-- 3 files changed, 23 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5b08a05d8..5b080bc78 100644 --- a/ChangeLog +++ b/ChangeLog @@ -83,6 +83,7 @@ * #1397: Add support for -s STATE in info command ==== WebUI ==== + * Add move completed option to add torrent dialog * #2112: Fix world readable tmp directory in json_api * #2069: Fix login window layout problem when using larger than default font size * #1890: Fix columns in files and peers view could use some spacing diff --git a/deluge/ui/web/js/deluge-all/add/OptionsPanel.js b/deluge/ui/web/js/deluge-all/add/OptionsPanel.js index 629c46d85..466b0a0f0 100644 --- a/deluge/ui/web/js/deluge-all/add/OptionsPanel.js +++ b/deluge/ui/web/js/deluge-all/add/OptionsPanel.js @@ -39,7 +39,7 @@ Deluge.add.OptionsPanel = Ext.extend(Ext.TabPanel, { region: 'south', margins: '5 5 5 5', activeTab: 0, - height: 220, + height: 265, initComponent: function() { Deluge.add.OptionsPanel.superclass.initComponent.call(this); diff --git a/deluge/ui/web/js/deluge-all/add/OptionsTab.js b/deluge/ui/web/js/deluge-all/add/OptionsTab.js index 9ea306c73..04ee39fac 100644 --- a/deluge/ui/web/js/deluge-all/add/OptionsTab.js +++ b/deluge/ui/web/js/deluge-all/add/OptionsTab.js @@ -60,13 +60,29 @@ Deluge.add.OptionsTab = Ext.extend(Ext.form.FormPanel, { fieldLabel: '', style: 'padding-bottom: 5px; margin-bottom: 0px;' }); - this.optionsManager.bind('download_location', fieldset.add({ fieldLabel: '', name: 'download_location', width: 400, labelSeparator: '' })); + var fieldset = this.add({ + xtype: 'fieldset', + title: _('Move Completed Location'), + border: false, + autoHeight: true, + defaultType: 'togglefield', + labelWidth: 1, + fieldLabel: '', + style: 'padding-bottom: 5px; margin-bottom: 0px;' + }); + var field = fieldset.add({ + fieldLabel: '', + name: 'move_completed_path', + width: 425 + }); + this.optionsManager.bind('move_completed', field.toggle) + this.optionsManager.bind('move_completed_path', field.input) var panel = this.add({ border: false, @@ -77,7 +93,7 @@ Deluge.add.OptionsTab = Ext.extend(Ext.form.FormPanel, { title: _('Allocation'), border: false, autoHeight: true, - defaultType: 'radio', + defaultType: 'radio' }); this.optionsManager.bind('compact_allocation', fieldset.add({ @@ -156,6 +172,7 @@ Deluge.add.OptionsTab = Ext.extend(Ext.form.FormPanel, { getDefaults: function() { var keys = ['add_paused','compact_allocation','download_location', 'max_connections_per_torrent','max_download_speed_per_torrent', + 'move_completed', 'move_completed_path', 'max_upload_slots_per_torrent','max_upload_speed_per_torrent', 'prioritize_first_last_pieces']; @@ -166,6 +183,8 @@ Deluge.add.OptionsTab = Ext.extend(Ext.form.FormPanel, { 'add_paused': config.add_paused, 'compact_allocation': config.compact_allocation, 'download_location': config.download_location, + 'move_completed': config.move_completed, + 'move_completed_path': config.move_completed_path, 'max_connections': config.max_connections_per_torrent, 'max_download_speed': config.max_download_speed_per_torrent, 'max_upload_slots': config.max_upload_slots_per_torrent,