Lidarr/UI/Series/Delete/DeleteSeriesView.js

32 lines
773 B
JavaScript
Raw Normal View History

2013-03-06 20:30:53 +00: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 deleteFiles = this.ui.deleteFiles.prop('checked');
this.model.destroy({
data: { 'deleteFiles': deleteFiles },
wait: true
}).done(function () {
2013-06-26 23:45:05 +00:00
App.modalRegion.closeModal();
});
}
});
});