Allow to refresh existing search
[qBittorrent.git] / src / webui / www / private / views / transferlist.html
blob40dfdac7a1572806e686db523ed737c114d98f34
1 <div id="torrentsTableFixedHeaderDiv" class="dynamicTableFixedHeaderDiv">
2 <table class="dynamicTable unselectable" style="position:relative;">
3 <thead>
4 <tr class="dynamicTableHeader"></tr>
5 </thead>
6 </table>
7 </div>
9 <div id="torrentsTableDiv" class="dynamicTableDiv">
10 <table class="dynamicTable unselectable">
11 <thead>
12 <tr class="dynamicTableHeader"></tr>
13 </thead>
14 <tbody></tbody>
15 </table>
16 </div>
18 <script>
19 "use strict";
21 window.qBittorrent ??= {};
22 window.qBittorrent.TransferList ??= (() => {
23 const exports = () => {
24 return {
25 setup: setup,
26 contextMenu: contextMenu,
30 // create a context menu
31 const contextMenu = new window.qBittorrent.ContextMenu.TorrentsTableContextMenu({
32 targets: "#torrentsTableDiv tr",
33 menu: "torrentsTableMenu",
34 actions: {
35 start: (element, ref) => {
36 startFN();
38 stop: (element, ref) => {
39 stopFN();
41 forceStart: (element, ref) => {
42 setForceStartFN();
45 delete: (element, ref) => {
46 deleteSelectedTorrentsFN();
49 setLocation: (element, ref) => {
50 setLocationFN();
53 rename: (element, ref) => {
54 renameFN();
56 renameFiles: (element, ref) => {
57 renameFilesFN();
59 queueTop: (element, ref) => {
60 setQueuePositionFN("topPrio");
62 queueUp: (element, ref) => {
63 setQueuePositionFN("increasePrio");
65 queueDown: (element, ref) => {
66 setQueuePositionFN("decreasePrio");
68 queueBottom: (element, ref) => {
69 setQueuePositionFN("bottomPrio");
72 downloadLimit: (element, ref) => {
73 downloadLimitFN();
75 uploadLimit: (element, ref) => {
76 uploadLimitFN();
78 shareRatio: (element, ref) => {
79 shareRatioFN();
82 sequentialDownload: (element, ref) => {
83 toggleSequentialDownloadFN();
85 firstLastPiecePrio: (element, ref) => {
86 toggleFirstLastPiecePrioFN();
89 autoTorrentManagement: (element, ref) => {
90 autoTorrentManagementFN();
92 forceRecheck: (element, ref) => {
93 recheckFN();
95 forceReannounce: (element, ref) => {
96 reannounceFN();
99 superSeeding: (element, ref) => {
100 setSuperSeedingFN(!ref.getItemChecked("superSeeding"));
103 exportTorrent: (element, ref) => {
104 exportTorrentFN();
107 offsets: {
108 x: 0,
109 y: 2
113 const setup = () => {
114 torrentsTable.setup("torrentsTableDiv", "torrentsTableFixedHeaderDiv", contextMenu);
117 return exports();
118 })();
119 Object.freeze(window.qBittorrent.TransferList);
121 window.qBittorrent.TransferList.setup();
122 </script>