WebUI: Use Map instead of Mootools Hash in Torrents table
[qBittorrent.git] / src / webui / www / private / confirmfeeddeletion.html
blobdcb0ce79d9db83a692957f3ebb20892274385707
1 <!DOCTYPE html>
2 <html lang="${LANG}">
4 <head>
5 <meta charset="UTF-8">
6 <title>QBT_TR(Deletion confirmation)QBT_TR[CONTEXT=RSSWidget]</title>
7 <link rel="stylesheet" href="css/style.css?v=${CACHEID}" type="text/css">
8 <script src="scripts/lib/MooTools-Core-1.6.0-compat-compressed.js"></script>
9 <script src="scripts/lib/MooTools-More-1.6.0-compat-compressed.js"></script>
10 <script>
11 "use strict";
13 window.addEventListener("DOMContentLoaded", () => {
14 const paths = new URI().getData("paths").split("|");
15 $("cancelBtn").focus();
16 $("cancelBtn").addEventListener("click", (e) => {
17 e.preventDefault();
18 e.stopPropagation();
19 window.parent.qBittorrent.Client.closeWindows();
20 });
21 $("confirmBtn").addEventListener("click", (e) => {
22 e.preventDefault();
23 e.stopPropagation();
25 let completionCount = 0;
26 paths.forEach((path) => {
27 new Request({
28 url: "api/v2/rss/removeItem",
29 method: "post",
30 data: {
31 path: decodeURIComponent(path)
33 onComplete: (response) => {
34 ++completionCount;
35 if (completionCount === paths.length) {
36 window.parent.qBittorrent.Rss.updateRssFeedList();
37 window.parent.qBittorrent.Client.closeWindows();
40 }).send();
41 });
42 });
43 });
44 </script>
45 </head>
47 <body>
48 <div style="padding: 10px 10px 0px 10px;">
49 <p>QBT_TR(Are you sure you want to delete the selected RSS feeds?)QBT_TR[CONTEXT=RSSWidget]</p>
50 <div style="text-align: right;">
51 <input type="button" id="cancelBtn" value="QBT_TR(No)QBT_TR[CONTEXT=MainWindow]">
52 <input type="button" id="confirmBtn" value="QBT_TR(Yes)QBT_TR[CONTEXT=MainWindow]">
53 </div>
54 </div>
55 </body>
57 </html>