mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2026-01-01 13:18:06 -06:00
- Allow to delete permanently from WebUI
This commit is contained in:
@@ -41,6 +41,7 @@
|
||||
<li class="divider"><a id="resumeLink">Start</a></li>
|
||||
<li><a id="pauseLink">Pause</a></li>
|
||||
<li class="divider"><a id="deleteLink">Delete</a></li>
|
||||
<li><a id="deletePermLink">Delete from HD</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
@@ -57,7 +58,8 @@
|
||||
<div id="mochaToolbar">
|
||||
<a id="downloadButton"><img class="mochaToolButton" title="Download from URL" src="images/skin/url.png"/></a>
|
||||
<a id="uploadButton"><img class="mochaToolButton" title="Download local torrent" src="images/skin/open.png"/></a>
|
||||
<a id="deleteButton"><img class="mochaToolButton" title="Delete" src="images/skin/delete.png"/></a>
|
||||
<a id="deleteButton"><img class="mochaToolButton" title="Delete" src="images/skin/delete.png"/></a>
|
||||
<a id="deletePermButton"><img class="mochaToolButton" title="Delete from HD" src="images/skin/delete_perm.png"/></a>
|
||||
<a id="resumeButton"><img class="mochaToolButton" title="Resume" src="images/skin/play.png"/></a>
|
||||
<a id="pauseButton"><img class="mochaToolButton" title="Pause" src="images/skin/pause.png"/></a>
|
||||
<a id="resumeAllButton"><img class="mochaToolButton" title="Resume all" src="images/skin/play_all.png"/></a>
|
||||
|
||||
@@ -68,6 +68,20 @@ initializeWindows = function(){
|
||||
}
|
||||
});
|
||||
|
||||
addClickEvent('deletePerm', function(e){
|
||||
new Event(e).stop();
|
||||
if($("Tab1").hasClass('active')) {
|
||||
var h = myTable.selectedIds();
|
||||
} else {
|
||||
var h = myTableUP.selectedIds();
|
||||
}
|
||||
if(h.length && confirm('Are you sure you want to delete from hard drive the selected item in download list?')) {
|
||||
h.each(function(item, index){
|
||||
new Request({url: '/command/deletePerm', method: 'post', data: {hash: item}}).send();
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
['pause','resume'].each(function(item) {
|
||||
addClickEvent(item, function(e){
|
||||
new Event(e).stop();
|
||||
|
||||
Reference in New Issue
Block a user