Christophe Dumez
14 years ago
8 changed files with 91 additions and 25 deletions
Before Width: | Height: | Size: 2.6 KiB |
Before Width: | Height: | Size: 1.6 KiB |
@ -0,0 +1,69 @@
@@ -0,0 +1,69 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> |
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr"> |
||||
<head> |
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> |
||||
<title>_(Deletion confirmation - qBittorrent)</title> |
||||
<link rel="stylesheet" href="css/style.css" type="text/css" /> |
||||
<script type="text/javascript" src="scripts/mootools-1.2-core-yc.js" charset="utf-8"></script> |
||||
<script type="text/javascript" src="scripts/mootools-1.2-more.js" charset="utf-8"></script> |
||||
|
||||
<script type="text/javascript"> |
||||
function $get(key,url){ |
||||
if(arguments.length < 2) url =location.href; |
||||
if(arguments.length > 0 && key != ""){ |
||||
if(key == "#"){ |
||||
var regex = new RegExp("[#]([^$]*)"); |
||||
} else if(key == "?"){ |
||||
var regex = new RegExp("[?]([^#$]*)"); |
||||
} else { |
||||
var regex = new RegExp("[?&]"+key+"=([^&#]*)"); |
||||
} |
||||
var results = regex.exec(url); |
||||
return (results == null )? "" : results[1].replace(/%22/g, "'"); |
||||
} else { |
||||
url = url.split("?"); |
||||
var results = {}; |
||||
if(url.length > 1){ |
||||
url = url[1].split("#"); |
||||
if(url.length > 1) results["hash"] = url[1]; |
||||
url[0].split("&").each(function(item,index){ |
||||
item = item.split("="); |
||||
results[item[0]] = item[1].replace(/%22/g, "'"); |
||||
}); |
||||
} |
||||
return results; |
||||
} |
||||
} |
||||
|
||||
var hashes = JSON.decode($get('hashes')); |
||||
|
||||
window.addEvent('domready', function(){ |
||||
$('cancelBtn').focus(); |
||||
$('cancelBtn').addEvent('click', function(e){ |
||||
new Event(e).stop(); |
||||
window.parent.document.getElementById('confirmDeletionPage').parentNode.removeChild(window.parent.document.getElementById('confirmDeletionPage')); |
||||
}); |
||||
$('confirmBtn').addEvent('click', function(e){ |
||||
new Event(e).stop(); |
||||
var cmd = '/command/delete'; |
||||
if($('deleteFromDiskCB').get('checked')) |
||||
cmd = '/command/deletePerm'; |
||||
hashes.each(function(item, index){ |
||||
new Request({url: cmd, method: 'post', data: {hash: item}}).send(); |
||||
}); |
||||
window.parent.document.getElementById('confirmDeletionPage').parentNode.removeChild(window.parent.document.getElementById('confirmDeletionPage')); |
||||
}); |
||||
}); |
||||
</script> |
||||
|
||||
</head> |
||||
<body> |
||||
<br/> |
||||
|
||||
<p>_(Are you sure you want to delete the selected torrents from the transfer list?)</p> |
||||
<input type="checkbox" id="deleteFromDiskCB"/> <i>_(Also delete the files on the hard disk)</i><br/><br/> |
||||
<div style="text-align: right;"> |
||||
<input type="button" id="cancelBtn" value="_(No)" /> <input type="button" id="confirmBtn" value="Yes"/> |
||||
</div> |
||||
</body> |
||||
</html> |
Loading…
Reference in new issue