- Allow the user to use CTRL key to select multiple item in Web UI transfer list

This commit is contained in:
Christophe Dumez 2008-09-27 10:08:07 +00:00
parent cdd1f9b86c
commit 56885cc914
3 changed files with 50 additions and 18 deletions

View file

@ -55,17 +55,22 @@ function attachMochaLinkEvents(){
addClickEvent('delete', function(e){
new Event(e).stop();
var h = myTable.selectedId();
if(h && confirm('Are you sure you want to delete the selected item in download list?'))
new Request({url: '/command/delete', method: 'post', data: {hash: h}}).send();
var h = myTable.selectedIds();
if(h.length && confirm('Are you sure you want to delete the selected item in download list?')) {
h.each(function(item, index){
new Request({url: '/command/delete', method: 'post', data: {hash: item}}).send();
});
}
});
['pause','resume'].each(function(item) {
addClickEvent(item, function(e){
new Event(e).stop();
var h = myTable.selectedId();
if(h){
new Request({url: '/command/'+item, method: 'post', data: {hash: h}}).send();
var h = myTable.selectedIds();
if(h.length){
h.each(function(item, index){
new Request({url: '/command/'+item, method: 'post', data: {hash: item}}).send();
});
}
});