1
0
Fork 0
mirror of https://github.com/lidarr/Lidarr synced 2024-12-28 02:27:13 +00:00
Lidarr/UI/Series/Delete/DeleteSeriesView.js
kay.one 663160c06a removed backbone from VS solution,
renamed NzbDrone.Backbone to UI
2013-03-29 12:18:44 -07:00

37 lines
No EOL
893 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'
},
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();
}
});
});