1
0
Fork 0
mirror of https://github.com/Sonarr/Sonarr synced 2024-12-29 11:16:19 +00:00
Sonarr/UI/Series/Delete/DeleteSeriesView.js

37 lines
893 B
JavaScript
Raw Normal View History

2013-03-06 20:30:53 +00:00
'use strict';
define(['app', 'Series/SeriesModel'], function () {
2013-03-03 22:42:26 +00:00
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'
},
onRender:function () {
NzbDrone.ModelBinder.bind(this.model, this.el);
},
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();
}
});
});