Add option to rename torrent from WebUI

Addresses #6815.
This commit is contained in:
Thomas Piccirello 2017-07-04 05:54:43 -04:00 committed by Vladimir Golovnev (qlassez)
parent 1b8cda7924
commit 798c230634
No known key found for this signature in database
GPG key ID: 52A2C7DEE2DFA6F7
7 changed files with 115 additions and 0 deletions

View file

@ -338,6 +338,30 @@ initializeWindows = function() {
}
};
renameFN = function() {
var hashes = torrentsTable.selectedRowsIds();
if (hashes.length == 1) {
var hash = hashes[0];
var row = torrentsTable.rows[hash];
if (row) {
var name = row.full_data.name;
new MochaUI.Window({
id: 'renamePage',
title: "QBT_TR(Rename)QBT_TR[CONTEXT=TransferListWidget]",
loadMethod: 'iframe',
contentURL: 'rename.html?hash=' + hashes[0] + '&name=' + name,
scrollbars: false,
resizable: false,
maximizable: false,
paddingVertical: 0,
paddingHorizontal: 0,
width: 250,
height: 100
});
}
}
};
torrentNewCategoryFN = function () {
var hashes = torrentsTable.selectedRowsIds();
if (hashes.length) {