mirror of
https://github.com/Radarr/Radarr.git
synced 2026-04-21 22:05:43 -04:00
Remove from queue improvements
New: option to blacklist a release when removing it from download client
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
'use strict';
|
||||
define(
|
||||
[
|
||||
'vent',
|
||||
'marionette'
|
||||
], function (vent, Marionette) {
|
||||
|
||||
return Marionette.ItemView.extend({
|
||||
template: 'Activity/Queue/RemoveFromQueueViewTemplate',
|
||||
|
||||
events: {
|
||||
'click .x-confirm-remove' : 'removeItem'
|
||||
},
|
||||
|
||||
ui: {
|
||||
blacklist : '.x-blacklist',
|
||||
indicator : '.x-indicator'
|
||||
},
|
||||
|
||||
initialize: function (options) {
|
||||
this.templateHelpers = {
|
||||
showBlacklist: options.showBlacklist
|
||||
};
|
||||
},
|
||||
|
||||
removeItem: function () {
|
||||
var blacklist = this.ui.blacklist.prop('checked');
|
||||
|
||||
this.ui.indicator.show();
|
||||
|
||||
this.model.destroy({
|
||||
data: { 'blacklist': blacklist },
|
||||
wait: true
|
||||
}).done(function () {
|
||||
vent.trigger(vent.Commands.CloseModalCommand);
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user