Fix #2037: webui 'Add Torrents' dialog torrents list not scrolling
This commit is contained in:
parent
0ccf0730ea
commit
38210ae11e
|
@ -1,6 +1,6 @@
|
||||||
/*!
|
/*!
|
||||||
* Deluge.add.AddWindow.js
|
* Deluge.add.AddWindow.js
|
||||||
*
|
*
|
||||||
* Copyright (c) Damien Churchill 2009-2010 <damoxc@gmail.com>
|
* Copyright (c) Damien Churchill 2009-2010 <damoxc@gmail.com>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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(_('Cancel'), this.onCancelClick, this);
|
||||||
this.addButton(_('Add'), this.onAddClick, this);
|
this.addButton(_('Add'), this.onAddClick, this);
|
||||||
|
|
||||||
function torrentRenderer(value, p, r) {
|
function torrentRenderer(value, p, r) {
|
||||||
if (r.data['info_hash']) {
|
if (r.data['info_hash']) {
|
||||||
return String.format('<div class="x-deluge-add-torrent-name">{0}</div>', value);
|
return String.format('<div class="x-deluge-add-torrent-name">{0}</div>', value);
|
||||||
|
@ -73,7 +73,7 @@ Deluge.add.AddWindow = Ext.extend(Deluge.add.Window, {
|
||||||
sortable: true,
|
sortable: true,
|
||||||
renderer: torrentRenderer,
|
renderer: torrentRenderer,
|
||||||
dataIndex: 'text'
|
dataIndex: 'text'
|
||||||
}],
|
}],
|
||||||
stripeRows: true,
|
stripeRows: true,
|
||||||
singleSelect: true,
|
singleSelect: true,
|
||||||
listeners: {
|
listeners: {
|
||||||
|
@ -84,6 +84,7 @@ Deluge.add.AddWindow = Ext.extend(Deluge.add.Window, {
|
||||||
},
|
},
|
||||||
hideHeaders: true,
|
hideHeaders: true,
|
||||||
autoExpandColumn: 'torrent',
|
autoExpandColumn: 'torrent',
|
||||||
|
height: '100%',
|
||||||
autoScroll: true
|
autoScroll: true
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -114,7 +115,7 @@ Deluge.add.AddWindow = Ext.extend(Deluge.add.Window, {
|
||||||
}]
|
}]
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
|
|
||||||
this.optionsPanel = this.add(new Deluge.add.OptionsPanel());
|
this.optionsPanel = this.add(new Deluge.add.OptionsPanel());
|
||||||
this.on('hide', this.onHide, this);
|
this.on('hide', this.onHide, this);
|
||||||
this.on('show', this.onShow, 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];
|
var torrent = this.list.getSelectedRecords()[0];
|
||||||
this.list.getStore().remove(torrent);
|
this.list.getStore().remove(torrent);
|
||||||
this.optionsPanel.clear();
|
this.optionsPanel.clear();
|
||||||
|
|
||||||
if (this.torrents && this.torrents[torrent.id]) delete this.torrents[torrent.id];
|
if (this.torrents && this.torrents[torrent.id]) delete this.torrents[torrent.id];
|
||||||
},
|
},
|
||||||
|
|
||||||
onSelect: function(list, selections) {
|
onSelect: function(list, selections) {
|
||||||
if (selections.length) {
|
if (selections.length) {
|
||||||
var record = this.list.getRecord(selections[0]);
|
var record = this.list.getRecord(selections[0]);
|
||||||
this.optionsPanel.setTorrent(record.get('info_hash'));
|
this.optionsPanel.setTorrent(record.get('info_hash'));
|
||||||
this.optionsPanel.files.setDisabled(false);
|
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('beforeadd', this.onTorrentBeforeAdd, this);
|
||||||
this.file.on('add', this.onTorrentAdd, this);
|
this.file.on('add', this.onTorrentAdd, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.optionsPanel.form.getDefaults();
|
this.optionsPanel.form.getDefaults();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue