1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2024-12-16 11:37:58 +02:00
Sonarr/UI/Series/Delete/DeleteSeriesView.js

33 lines
917 B
JavaScript
Raw Normal View History

2013-03-06 23:30:53 +03:00
'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 self = this;
var deleteFiles = this.ui.deleteFiles.prop('checked');
this.model.destroy({
data: { 'deleteFiles': deleteFiles },
wait: true
}).done(function () {
App.vent.trigger(App.Events.SeriesDeleted, { series: self.model });
2013-07-24 04:15:58 +03:00
App.vent.trigger(App.Commands.CloseModalCommand);
});
}
});
});