mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-21 22:04:31 -04:00
everything should be moved to require.js
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
'use strict';
|
||||
|
||||
define(['app', 'Series/SeriesModel'], function () {
|
||||
|
||||
NzbDrone.Series.DeleteSeriesView = Backbone.Marionette.ItemView.extend({
|
||||
template: 'Series/Delete/DeleteSeriesTemplate',
|
||||
tagName: 'div',
|
||||
className: "modal",
|
||||
|
||||
ui: {
|
||||
'progressbar': '.progress .bar',
|
||||
},
|
||||
|
||||
events: {
|
||||
'click .x-confirm-delete': 'removeSeries',
|
||||
},
|
||||
|
||||
onRender: function () {
|
||||
NzbDrone.ModelBinder.bind(this.model, this.el);
|
||||
},
|
||||
|
||||
removeSeries: function () {
|
||||
//Todo: why the fuck doesn't destroy send the ID?
|
||||
this.model.destroy({ wait: true, headers: { id: this.model.get('id'), deleteFiles: $('#delete-from-disk').prop('checked') } });
|
||||
this.model.collection.remove(this.model);
|
||||
this.$el.parent().modal('hide');
|
||||
},
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user