diff --git a/src/webui/www/private/rename_files.html b/src/webui/www/private/rename_files.html index bef7ce84c..6e6385d6e 100644 --- a/src/webui/www/private/rename_files.html +++ b/src/webui/www/private/rename_files.html @@ -310,7 +310,7 @@ const addRowsToTable = (rows, selectedRows) => { let rowId = 0; const rootNode = new window.qBittorrent.FileTree.FolderNode(); - rootNode.autoCheckFolders = false; + rootNode.autoCalculateCheckedState = false; rows.forEach((row) => { const pathItems = row.path.split(window.qBittorrent.Filesystem.PathSeparator); @@ -334,7 +334,7 @@ if (folderNode === null) { folderNode = new window.qBittorrent.FileTree.FolderNode(); - folderNode.autoCheckFolders = false; + folderNode.autoCalculateCheckedState = false; folderNode.rowId = rowId; folderNode.path = (parent.path === "") ? folderName diff --git a/src/webui/www/private/scripts/file-tree.js b/src/webui/www/private/scripts/file-tree.js index 4c4c32ed0..c426279cc 100644 --- a/src/webui/www/private/scripts/file-tree.js +++ b/src/webui/www/private/scripts/file-tree.js @@ -151,9 +151,9 @@ window.qBittorrent.FileTree ??= (() => { class FolderNode extends FileNode { /** - * Will automatically tick the checkbox for a folder if all subfolders and files are also ticked + * When true, the folder's `checked` state will be calculately automatically based on its children */ - autoCheckFolders = true; + autoCalculateCheckedState = true; isFolder = true; fileId = -1; @@ -212,7 +212,7 @@ window.qBittorrent.FileTree ??= (() => { } } - root.checked = root.autoCheckFolders ? root.checked : TriState.Checked; + root.checked = root.autoCalculateCheckedState ? root.checked : TriState.Checked; root.progress /= root.size; root.availability /= root.size; }