1
0
Fork 0
mirror of https://github.com/Sonarr/Sonarr synced 2024-12-27 02:07:41 +00:00
Sonarr/UI/Series/Delete/DeleteSeriesView.js
2013-04-10 18:24:34 -07:00

33 lines
No EOL
807 B
JavaScript

'use strict';
define(['app', 'Series/SeriesModel'], function () {
NzbDrone.Series.Delete.DeleteSeriesView = Backbone.Marionette.ItemView.extend({
template : 'Series/Delete/DeleteSeriesTemplate',
tagName : 'div',
className: "modal",
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 },
success: function (model) {
model.collection.remove(model);
}
});
NzbDrone.modalRegion.close();
}
});
});