mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-21 14:03:29 -07:00
removed backbone from VS solution,
renamed NzbDrone.Backbone to UI
This commit is contained in:
parent
c7776f74e1
commit
663160c06a
230 changed files with 57 additions and 386 deletions
17
UI/Series/Delete/DeleteSeriesTemplate.html
Normal file
17
UI/Series/Delete/DeleteSeriesTemplate.html
Normal file
|
@ -0,0 +1,17 @@
|
|||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
<h3>Delete: {{title}}</h3>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p>Are you sure you want to delete '{{title}}'?</p>
|
||||
<div class="series-delete-files">
|
||||
<label class="checkbox">
|
||||
<input class="x-delete-files" type="checkbox" value="true">
|
||||
Delete all files from disk?
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button class="btn" data-dismiss="modal">cancel</button>
|
||||
<button class="btn btn-danger x-confirm-delete">delete</button>
|
||||
</div>
|
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();
|
||||
|
||||
}
|
||||
});
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue