From 8cfc8bd8f9a5194915b7d4e72bf7c509483f8601 Mon Sep 17 00:00:00 2001 From: imebeh Date: Wed, 25 Mar 2020 04:07:27 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=20=E5=BD=93=E5=89=8D?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E7=9B=AE=E5=BD=95=E4=B8=BA=E7=AC=AC=E4=B8=80?= =?UTF-8?q?=E5=80=99=E9=80=89=E4=B8=8B=E8=BD=BD=E8=B7=AF=E5=BE=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/tr-web-control/script/system.js | 4 ++++ src/tr-web-control/template/dialog-torrent-add.html | 6 ++++++ src/tr-web-control/template/dialog-torrent-addfile.html | 6 ++++++ 3 files changed, 16 insertions(+) diff --git a/src/tr-web-control/script/system.js b/src/tr-web-control/script/system.js index 64753b4..1d53604 100644 --- a/src/tr-web-control/script/system.js +++ b/src/tr-web-control/script/system.js @@ -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" }]); diff --git a/src/tr-web-control/template/dialog-torrent-add.html b/src/tr-web-control/template/dialog-torrent-add.html index 8ee4961..31e0044 100644 --- a/src/tr-web-control/template/dialog-torrent-add.html +++ b/src/tr-web-control/template/dialog-torrent-add.html @@ -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) { $("