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.
Radarr/UI/Series/Delete/DeleteSeriesView.js

33 lines
917 B

'use strict';
define(
[
'app',
'marionette'
], function (App, Marionette) {
return Marionette.ItemView.extend({
template: 'Series/Delete/DeleteSeriesTemplate',
events: {
'click .x-confirm-delete': 'removeSeries'
},
ui: {
deleteFiles: '.x-delete-files'
},
removeSeries: function () {
var self = this;
var deleteFiles = this.ui.deleteFiles.prop('checked');
this.model.destroy({
data: { 'deleteFiles': deleteFiles },
wait: true
}).done(function () {
App.vent.trigger(App.Events.SeriesDeleted, { series: self.model });
App.vent.trigger(App.Commands.CloseModalCommand);
});
}
});
});