mirror of
https://github.com/Sonarr/Sonarr.git
synced 2024-12-16 11:37:58 +02:00
35 lines
868 B
JavaScript
35 lines
868 B
JavaScript
'use strict';
|
|
define(
|
|
[
|
|
'app',
|
|
'Series/SeriesModel'
|
|
], function () {
|
|
|
|
NzbDrone.Series.Delete.DeleteSeriesView = Backbone.Marionette.ItemView.extend({
|
|
template: 'Series/Delete/DeleteSeriesTemplate',
|
|
|
|
events: {
|
|
'click .x-confirm-delete': 'removeSeries'
|
|
},
|
|
|
|
ui: {
|
|
deleteFiles: '.x-delete-files'
|
|
},
|
|
|
|
removeSeries: function () {
|
|
|
|
var deleteFiles = this.ui.deleteFiles.prop('checked');
|
|
|
|
this.model.destroy({
|
|
data: { 'deleteFiles': deleteFiles },
|
|
wait: true
|
|
}).done(function () {
|
|
NzbDrone.modalRegion.close();
|
|
});
|
|
}
|
|
});
|
|
|
|
return NzbDrone.Series.Delete.DeleteSeriesView;
|
|
|
|
});
|