1
0
Fork 0
mirror of https://github.com/lidarr/Lidarr synced 2024-12-26 17:47:08 +00:00
Lidarr/UI/Series/Delete/DeleteSeriesView.js

31 lines
783 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,
success: function (model) {
model.collection.remove(model);
}
});
NzbDrone.modalRegion.close();
}
});
});