mirror of
https://github.com/Sonarr/Sonarr.git
synced 2024-11-01 08:22:35 +01:00
32 lines
768 B
JavaScript
32 lines
768 B
JavaScript
'use strict';
|
|
define(
|
|
[
|
|
'app',
|
|
'marionette'
|
|
], function (App, Marionette) {
|
|
|
|
return Marionette.ItemView.extend({
|
|
template: 'Series/Delete/DeleteSeriesTemplate',
|
|
|
|
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 },
|
|
wait: true
|
|
}).done(function () {
|
|
App.modalRegion.close();
|
|
});
|
|
}
|
|
});
|
|
});
|