add keyboard shortcut for download

This commit is contained in:
rlx 2016-01-17 15:48:03 +05:30
parent 8fde5e9111
commit a5ec6a655b

View file

@ -67,6 +67,20 @@ oml.ui.list = function() {
}
oml.$ui.statusbar.set('total', data);
},
key_control_d: function() {
var items = ui.listSelection.filter(function(id) {
return oml.$ui.list.value(id, 'mediastate') == 'unavailable';
});
if (items.length) {
oml.api.addListItems({
items: items,
list: ':'
}, function(result) {
Ox.Request.clearCache();
// FIXME: reload?
});
}
},
key_control_delete: function() {
if (that.options('selected').filter(function(id) {
return that.value(id, 'mediastate') == 'available';