New: number of episode files that will be deleted shown on delete dialog

This commit is contained in:
Mark McDowall 2014-08-31 23:25:30 -07:00
parent 901808e0b3
commit e67136ae64
4 changed files with 27 additions and 5 deletions

View File

@ -10,9 +10,9 @@ namespace NzbDrone.Core.SeriesStats
public class SeriesStatisticsService : ISeriesStatisticsService
{
private readonly SeriesStatisticsRepository _seriesStatisticsRepository;
private readonly ISeriesStatisticsRepository _seriesStatisticsRepository;
public SeriesStatisticsService(SeriesStatisticsRepository seriesStatisticsRepository)
public SeriesStatisticsService(ISeriesStatisticsRepository seriesStatisticsRepository)
{
_seriesStatisticsRepository = seriesStatisticsRepository;
}

View File

@ -35,6 +35,9 @@
</div>
</div>
</div>
<div class="col-md-offset-1 col-md-5 delete-files-info x-delete-files-info">
{{episodeFileCount}} episode files will be deleted
</div>
</div>
</div>
</div>

View File

@ -9,12 +9,14 @@ define(
template: 'Series/Delete/DeleteSeriesTemplate',
events: {
'click .x-confirm-delete': 'removeSeries'
'click .x-confirm-delete' : 'removeSeries',
'change .x-delete-files' : 'changeDeletedFiles'
},
ui: {
deleteFiles : '.x-delete-files',
indicator : '.x-indicator'
deleteFiles : '.x-delete-files',
deleteFilesInfo : '.x-delete-files-info',
indicator : '.x-indicator'
},
removeSeries: function () {
@ -29,6 +31,18 @@ define(
vent.trigger(vent.Events.SeriesDeleted, { series: self.model });
vent.trigger(vent.Commands.CloseModalCommand);
});
},
changeDeletedFiles: function () {
var deleteFiles = this.ui.deleteFiles.prop('checked');
if (deleteFiles) {
this.ui.deleteFilesInfo.show();
}
else {
this.ui.deleteFilesInfo.hide();
}
}
});
});

View File

@ -31,6 +31,11 @@
.path {
margin-left : 30px;
}
.delete-files-info {
margin-top : 10px;
display : none;
}
}
.series-item {