mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-14 10:47:08 -07:00
updating add existing series to use the common views.
This commit is contained in:
parent
1b55859eb2
commit
3c686808f2
9 changed files with 147 additions and 84 deletions
|
@ -1,34 +1,34 @@
|
|||
'use strict';
|
||||
define(['app', 'Series/SeriesModel'], function () {
|
||||
define(
|
||||
[
|
||||
'app',
|
||||
'Series/SeriesModel'
|
||||
], function () {
|
||||
|
||||
NzbDrone.Series.Delete.DeleteSeriesView = Backbone.Marionette.ItemView.extend({
|
||||
template: 'Series/Delete/DeleteSeriesTemplate',
|
||||
NzbDrone.Series.Delete.DeleteSeriesView = Backbone.Marionette.ItemView.extend({
|
||||
template: 'Series/Delete/DeleteSeriesTemplate',
|
||||
|
||||
events: {
|
||||
'click .x-confirm-delete': 'removeSeries'
|
||||
},
|
||||
events: {
|
||||
'click .x-confirm-delete': 'removeSeries'
|
||||
},
|
||||
|
||||
ui: {
|
||||
deleteFiles: '.x-delete-files'
|
||||
},
|
||||
ui: {
|
||||
deleteFiles: '.x-delete-files'
|
||||
},
|
||||
|
||||
removeSeries: function () {
|
||||
removeSeries: function () {
|
||||
|
||||
var deleteFiles = this.ui.deleteFiles.prop('checked');
|
||||
var deleteFiles = this.ui.deleteFiles.prop('checked');
|
||||
|
||||
this.model.destroy({
|
||||
data : { 'deleteFiles': deleteFiles },
|
||||
wait : true,
|
||||
success: function (model) {
|
||||
model.collection.remove(model);
|
||||
}
|
||||
});
|
||||
this.model.destroy({
|
||||
data: { 'deleteFiles': deleteFiles },
|
||||
wait: true
|
||||
}).done(function () {
|
||||
NzbDrone.modalRegion.close();
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
NzbDrone.modalRegion.close();
|
||||
return NzbDrone.Series.Delete.DeleteSeriesView;
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
return NzbDrone.Series.Delete.DeleteSeriesView;
|
||||
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue