mirror of
https://github.com/ronggang/transmission-web-control.git
synced 2026-05-07 17:47:18 +02:00
增加 当前数据目录为第一候选下载路径
This commit is contained in:
@@ -85,6 +85,8 @@ var system = {
|
||||
checkedRows: [],
|
||||
uiIsInitialized: false,
|
||||
popoverCount: 0,
|
||||
// 当前数据目录,用于添加任务的快速保存路径选择
|
||||
currentListDir: "",
|
||||
/**
|
||||
* 设置语言
|
||||
*/
|
||||
@@ -636,6 +638,7 @@ var system = {
|
||||
system.loadTorrentToList({
|
||||
node: node
|
||||
});
|
||||
system.currentListDir = node.downDir;
|
||||
},
|
||||
lines: true
|
||||
});
|
||||
@@ -3000,6 +3003,7 @@ var system = {
|
||||
this.appendTreeNode(parentkey, [{
|
||||
id: key,
|
||||
path: path,
|
||||
downDir: fullkey,
|
||||
text: text,
|
||||
iconCls: "iconfont tr-icon-file"
|
||||
}]);
|
||||
|
||||
@@ -80,6 +80,12 @@
|
||||
$.merge(downloadDirs,system.dictionary.folders.split("\n"));
|
||||
}
|
||||
downloadDirs = uniq(downloadDirs);
|
||||
|
||||
if (system.config.hideSubfolders == false && system.currentListDir != null && system.currentListDir != "") {
|
||||
// 增加 当前数据目录为第一候选
|
||||
downloadDirs.unshift(system.currentListDir);
|
||||
}
|
||||
|
||||
if (downloadDirs == null)
|
||||
{
|
||||
$("<option/>").text(system.downloadDir).val(system.downloadDir).attr("selected",true).appendTo(thisDialog.find("#download-dir"));
|
||||
|
||||
@@ -69,6 +69,12 @@
|
||||
$.merge(downloadDirs,system.dictionary.folders.split("\n"));
|
||||
}
|
||||
downloadDirs = uniq(downloadDirs);
|
||||
|
||||
if (system.config.hideSubfolders == false && system.currentListDir != null && system.currentListDir != "") {
|
||||
// 增加 当前数据目录为第一候选
|
||||
downloadDirs.unshift(system.currentListDir);
|
||||
}
|
||||
|
||||
if (downloadDirs == null)
|
||||
{
|
||||
$("<option/>").text(system.downloadDir).val(system.downloadDir).attr("selected",true).appendTo(thisDialog.find("#download-dir"));
|
||||
|
||||
Reference in New Issue
Block a user