begin to add the options form and also fix the binds on the got_torrent_info calls

This commit is contained in:
Damien Churchill 2009-04-02 20:40:24 +00:00
parent 00bfd1a442
commit 5162d5d7e2

View File

@ -220,7 +220,21 @@ Deluge.Add.Options = new Ext.TabPanel({
items: [Deluge.Add.Files] items: [Deluge.Add.Files]
},{ },{
id: 'options', 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(); var filename = upload.result.toString();
this.form.items.get('torrentFile').setValue(''); this.form.items.get('torrentFile').setValue('');
Deluge.Client.web.get_torrent_info(filename, { 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) { onDownload: function(filename) {
this.form.items.get('url').setValue(''); this.form.items.get('url').setValue('');
Deluge.Client.web.get_torrent_info(filename, { Deluge.Client.web.get_torrent_info(filename, {
onSuccess: Deluge.Add.onTorrentAdded.bindWithEvent(this) onSuccess: Deluge.Add.onTorrentAdded.bindWithEvent(Deluge.Add)
}); });
} }
} }