mirror of
https://github.com/Carve/qbittorrent-webui-cjratliff.com.git
synced 2024-11-15 03:07:38 +01:00
58 lines
2.1 KiB
HTML
58 lines
2.1 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="${LANG}">
|
|
|
|
<head>
|
|
<meta charset="UTF-8" />
|
|
<title>Rule deletion confirmation</title>
|
|
<link rel="stylesheet" href="css/style.css?v=${CACHEID}" type="text/css" />
|
|
<link rel="stylesheet" type="text/css" href="css/Core.css?v=${CACHEID}" />
|
|
<script src="scripts/lib/MooTools-Core-1.6.0-compat-compressed.js"></script>
|
|
<script src="scripts/lib/MooTools-More-1.6.0-compat-compressed.js"></script>
|
|
<script>
|
|
'use strict';
|
|
|
|
window.addEvent('domready', () => {
|
|
const rules = new URI().getData('rules').split('|');
|
|
|
|
$('cancelBtn').focus();
|
|
$('cancelBtn').addEvent('click', (e) => {
|
|
new Event(e).stop();
|
|
window.parent.MochaUI.closeWindow(window.parent.$('removeRulePage'));
|
|
});
|
|
$('confirmBtn').addEvent('click', (e) => {
|
|
new Event(e).stop();
|
|
let completionCount = 0;
|
|
rules.forEach((rule) => {
|
|
new Request({
|
|
url: 'api/v2/rss/removeRule',
|
|
noCache: true,
|
|
method: 'post',
|
|
data: {
|
|
ruleName: decodeURIComponent(rule)
|
|
},
|
|
onComplete: (response) => {
|
|
++completionCount;
|
|
if (completionCount === rules.length) {
|
|
window.parent.qBittorrent.RssDownloader.updateRulesList();
|
|
window.parent.MochaUI.closeWindow(window.parent.$('removeRulePage'));
|
|
}
|
|
}
|
|
}).send();
|
|
});
|
|
});
|
|
});
|
|
</script>
|
|
</head>
|
|
|
|
<body>
|
|
<div style="padding: 10px 10px 0px 10px;">
|
|
<p>Are you sure you want to remove the selected download rules?</p>
|
|
<div style="text-align: right;">
|
|
<input type="button" id="cancelBtn" value="No" />
|
|
<input type="button" id="confirmBtn" value="Yes" />
|
|
</div>
|
|
</div>
|
|
</body>
|
|
|
|
</html>
|