You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Sonarr/src/UI/Activity/Queue/RemoveFromQueueView.js

40 lines
1.0 KiB

'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') || false;
this.ui.indicator.show();
this.model.destroy({
data: { 'blacklist': blacklist },
wait: true
}).done(function () {
vent.trigger(vent.Commands.CloseModalCommand);
});
}
});
});