Changeset 8582915 for deluge/ui/web/js/Deluge.Add.Url.js
- Timestamp:
- 04/27/2009 08:48:39 PM (16 years ago)
- Branches:
- 2.0.x, develop, extjs4-port, master
- Children:
- b88542f
- Parents:
- 2ac545d
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
deluge/ui/web/js/Deluge.Add.Url.js
r2ac545d r8582915 71 71 var field = this.form.items.get('url'); 72 72 var url = field.getValue(); 73 var torrentId = this.createTorrentId(); 73 74 74 75 Deluge.Client.web.download_torrent_from_url(url, { 75 76 success: this.onDownload, 76 scope: this 77 scope: this, 78 torrentId: torrentId 77 79 }); 78 80 this.hide(); 79 this.fireEvent('beforeadd', url);81 this.fireEvent('beforeadd', torrentId, url); 80 82 }, 81 83 82 onDownload: function(filename ) {84 onDownload: function(filename, obj, resp, req) { 83 85 this.form.items.get('url').setValue(''); 84 86 Deluge.Client.web.get_torrent_info(filename, { 85 87 success: this.onGotInfo, 86 88 scope: this, 87 filename: filename 89 filename: filename, 90 torrentId: req.options.torrentId 88 91 }); 89 92 }, … … 91 94 onGotInfo: function(info, obj, response, request) { 92 95 info['filename'] = request.options.filename; 93 this.fireEvent('add', info);96 this.fireEvent('add', request.options.torrentId, info); 94 97 } 95 98 });
Note:
See TracChangeset
for help on using the changeset viewer.