1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2024-12-23 02:05:27 +02:00
Sonarr/NzbDrone.Web/_backboneApp/Series/Delete/DeleteSeriesView.js
kay.one c01f982698 removed series layout.
datatables doesn't load properly.
2013-02-15 16:53:00 -08:00

37 lines
889 B
JavaScript

'use strict';
define(['app', 'Series/SeriesModel'], function () {
NzbDrone.Series.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();
}
});
});