mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-17 17:14:18 +02:00
removed backbone from VS solution,
renamed NzbDrone.Backbone to UI
This commit is contained in:
37
UI/Series/Delete/DeleteSeriesView.js
Normal file
37
UI/Series/Delete/DeleteSeriesView.js
Normal file
@@ -0,0 +1,37 @@
|
||||
'use strict';
|
||||
|
||||
define(['app', 'Series/SeriesModel'], function () {
|
||||
|
||||
NzbDrone.Series.Delete.DeleteSeriesView = Backbone.Marionette.ItemView.extend({
|
||||
template:'Series/Delete/DeleteSeriesTemplate',
|
||||
tagName:'div',
|
||||
className:"modal",
|
||||
|
||||
events:{
|
||||
'click .x-confirm-delete':'removeSeries'
|
||||
},
|
||||
|
||||
ui:{
|
||||
deleteFiles:'.x-delete-files'
|
||||
},
|
||||
|
||||
onRender:function () {
|
||||
NzbDrone.ModelBinder.bind(this.model, this.el);
|
||||
},
|
||||
|
||||
removeSeries:function () {
|
||||
|
||||
var deleteFiles = this.ui.deleteFiles.prop('checked');
|
||||
|
||||
this.model.destroy({
|
||||
data:{ 'deleteFiles':deleteFiles },
|
||||
success:function (model) {
|
||||
model.collection.remove(model);
|
||||
}
|
||||
});
|
||||
|
||||
NzbDrone.modalRegion.close();
|
||||
|
||||
}
|
||||
});
|
||||
});
|
Reference in New Issue
Block a user