From 5162d5d7e2be7c61dd1529645516032c33c22291 Mon Sep 17 00:00:00 2001 From: Damien Churchill Date: Thu, 2 Apr 2009 20:40:24 +0000 Subject: [PATCH] begin to add the options form and also fix the binds on the got_torrent_info calls --- deluge/ui/web/js/deluge-add.js | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/deluge/ui/web/js/deluge-add.js b/deluge/ui/web/js/deluge-add.js index 70b156737..d0c50a3bc 100644 --- a/deluge/ui/web/js/deluge-add.js +++ b/deluge/ui/web/js/deluge-add.js @@ -220,7 +220,21 @@ Deluge.Add.Options = new Ext.TabPanel({ items: [Deluge.Add.Files] },{ id: 'options', - title: _('Options') + title: _('Options'), + items: [new Ext.form.FormPanel({ + xtype: 'form', + defaultType: 'textfield', + items: [{ + xtype: 'fieldset', + title: _('Download Location'), + items: [{ + fieldLabel: '', + id: 'download_location', + name: 'download_location', + anchor: '100%' + }] + }] + })] }] }); @@ -240,7 +254,7 @@ Deluge.Add.File = { var filename = upload.result.toString(); this.form.items.get('torrentFile').setValue(''); Deluge.Client.web.get_torrent_info(filename, { - onSuccess: Deluge.Add.onTorrentAdded.bindWithEvent(this) + onSuccess: Deluge.Add.onTorrentAdded.bindWithEvent(Deluge.Add) }); } } @@ -298,7 +312,7 @@ Deluge.Add.Url = { onDownload: function(filename) { this.form.items.get('url').setValue(''); Deluge.Client.web.get_torrent_info(filename, { - onSuccess: Deluge.Add.onTorrentAdded.bindWithEvent(this) + onSuccess: Deluge.Add.onTorrentAdded.bindWithEvent(Deluge.Add) }); } }