From 38210ae11eb00caa8902a65a44d4a441745caafa Mon Sep 17 00:00:00 2001 From: Calum Lind Date: Thu, 23 Feb 2012 00:13:27 +0000 Subject: [PATCH] Fix #2037: webui 'Add Torrents' dialog torrents list not scrolling --- deluge/ui/web/js/deluge-all/add/AddWindow.js | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/deluge/ui/web/js/deluge-all/add/AddWindow.js b/deluge/ui/web/js/deluge-all/add/AddWindow.js index 85c0da162..0f270de2a 100644 --- a/deluge/ui/web/js/deluge-all/add/AddWindow.js +++ b/deluge/ui/web/js/deluge-all/add/AddWindow.js @@ -1,6 +1,6 @@ /*! * Deluge.add.AddWindow.js - * + * * Copyright (c) Damien Churchill 2009-2010 * * This program is free software; you can redistribute it and/or modify @@ -50,7 +50,7 @@ Deluge.add.AddWindow = Ext.extend(Deluge.add.Window, { this.addButton(_('Cancel'), this.onCancelClick, this); this.addButton(_('Add'), this.onAddClick, this); - + function torrentRenderer(value, p, r) { if (r.data['info_hash']) { return String.format('
{0}
', value); @@ -73,7 +73,7 @@ Deluge.add.AddWindow = Ext.extend(Deluge.add.Window, { sortable: true, renderer: torrentRenderer, dataIndex: 'text' - }], + }], stripeRows: true, singleSelect: true, listeners: { @@ -84,6 +84,7 @@ Deluge.add.AddWindow = Ext.extend(Deluge.add.Window, { }, hideHeaders: true, autoExpandColumn: 'torrent', + height: '100%', autoScroll: true }); @@ -114,7 +115,7 @@ Deluge.add.AddWindow = Ext.extend(Deluge.add.Window, { }] }) }); - + this.optionsPanel = this.add(new Deluge.add.OptionsPanel()); this.on('hide', this.onHide, this); this.on('show', this.onShow, this); @@ -165,12 +166,12 @@ Deluge.add.AddWindow = Ext.extend(Deluge.add.Window, { var torrent = this.list.getSelectedRecords()[0]; this.list.getStore().remove(torrent); this.optionsPanel.clear(); - + if (this.torrents && this.torrents[torrent.id]) delete this.torrents[torrent.id]; }, onSelect: function(list, selections) { - if (selections.length) { + if (selections.length) { var record = this.list.getRecord(selections[0]); this.optionsPanel.setTorrent(record.get('info_hash')); this.optionsPanel.files.setDisabled(false); @@ -193,7 +194,7 @@ Deluge.add.AddWindow = Ext.extend(Deluge.add.Window, { this.file.on('beforeadd', this.onTorrentBeforeAdd, this); this.file.on('add', this.onTorrentAdd, this); } - + this.optionsPanel.form.getDefaults(); },