From 6d4eae15a5208dd411e9588448dcc159cbf8963d Mon Sep 17 00:00:00 2001 From: Damien Churchill Date: Wed, 22 Apr 2009 00:07:55 +0000 Subject: [PATCH] add basic options panel --- deluge/ui/web/js/Deluge.Details.Options.js | 48 ++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/deluge/ui/web/js/Deluge.Details.Options.js b/deluge/ui/web/js/Deluge.Details.Options.js index e69de29bb..fad29144e 100644 --- a/deluge/ui/web/js/Deluge.Details.Options.js +++ b/deluge/ui/web/js/Deluge.Details.Options.js @@ -0,0 +1,48 @@ +/* +Script: Deluge.Details.Options.js + The options tab displayed in the details panel. + +Copyright: + (C) Damien Churchill 2009 + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, write to: + The Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor + Boston, MA 02110-1301, USA. +*/ + +Ext.deluge.details.OptionsTab = Ext.extend(Ext.form.FormPanel, { + title: _('Options'), + cls: 'x-deluge-options', + + onRender: function(ct, position) { + Ext.deluge.details.OptionsTab.superclass.onRender.call(this, ct, position); + }, + + clear: function() { + + }, + + update: function(torrentId) { + Deluge.Client.core.get_torrent_status(torrentId, Deluge.Keys.Options, { + success: this.onRequestComplete, + scope: this, + torrentId: torrentId + }); + }, + + onRequestComplete: function(torrent, options) { + + } +}); +Deluge.Details.add(new Ext.deluge.details.OptionsTab()); \ No newline at end of file