2012-01-20 07:50:45 +00:00
|
|
|
@using NzbDrone.Web.Helpers
|
|
|
|
@model IEnumerable<NzbDrone.Core.Repository.Series>
|
|
|
|
@{ViewBag.Title = "NzbDrone";}
|
|
|
|
|
|
|
|
@section HeaderContent
|
|
|
|
{
|
|
|
|
@Html.IncludeCss("Settings.css")
|
|
|
|
|
|
|
|
<style>
|
|
|
|
.checkboxColumn {
|
|
|
|
width: 95px;
|
|
|
|
text-align: center;
|
|
|
|
}
|
|
|
|
|
|
|
|
.masterControls {
|
|
|
|
margin-top: 10px;
|
|
|
|
overflow: hidden;
|
|
|
|
}
|
|
|
|
|
|
|
|
.buttons {
|
|
|
|
width: 600px;
|
|
|
|
text-align: center;
|
|
|
|
}
|
|
|
|
|
|
|
|
table input[type="text"], table select {
|
2012-02-18 20:16:27 +00:00
|
|
|
margin: 2px 2px;
|
2012-01-20 07:50:45 +00:00
|
|
|
}
|
|
|
|
|
2012-01-21 08:57:14 +00:00
|
|
|
td .path {
|
|
|
|
width: 300px;
|
|
|
|
}
|
|
|
|
|
2012-02-18 20:16:27 +00:00
|
|
|
td .backlogSetting {
|
2012-01-24 06:29:32 +00:00
|
|
|
width: 90px;
|
|
|
|
}
|
2012-01-20 07:50:45 +00:00
|
|
|
</style>
|
|
|
|
}
|
|
|
|
|
|
|
|
@using (Html.BeginForm("SaveMassEdit", "Series", FormMethod.Post, new { id = "MassEdit", name = "MassEdit" }))
|
|
|
|
{
|
2012-02-18 20:18:51 +00:00
|
|
|
<table class="dataTable dataTablesGrid no-details">
|
2012-02-18 20:16:27 +00:00
|
|
|
<thead>
|
2012-01-21 08:57:14 +00:00
|
|
|
<th width="14px">@Html.CheckBox("editToggleMaster", false, new { @class = "editToggleMaster" })</th>
|
2012-01-20 07:50:45 +00:00
|
|
|
<th>Title</th>
|
2012-01-21 08:57:14 +00:00
|
|
|
<th width="210px">Quality</th>
|
2012-01-20 07:50:45 +00:00
|
|
|
<th class="checkboxColumn">Monitored</th>
|
|
|
|
<th class="checkboxColumn">Season Folder</th>
|
2012-01-24 06:29:32 +00:00
|
|
|
<th width="100px">Backlog Status</th>
|
2012-01-21 08:57:14 +00:00
|
|
|
<th width="310px">Path</th>
|
2012-02-18 20:16:27 +00:00
|
|
|
</thead>
|
|
|
|
|
|
|
|
<tbody>
|
|
|
|
@foreach (var series in Model)
|
|
|
|
{
|
|
|
|
Html.RenderPartial("SeriesItem", series);
|
|
|
|
}
|
|
|
|
</tbody>
|
2012-01-20 07:50:45 +00:00
|
|
|
</table>
|
|
|
|
|
|
|
|
<div class="masterControls">
|
|
|
|
<div id="stylized" style="border-color: transparent;">
|
|
|
|
<div class="settingsForm">
|
|
|
|
<label class="labelClass">Quality Profile
|
|
|
|
<span class="small">Which Quality Profile should NzbDrone use to download episodes?</span>
|
|
|
|
</label>
|
|
|
|
@Html.DropDownList("masterQualitySelector", (SelectList)ViewData["MasterProfileSelectList"], new { @class = "inputClass" })
|
|
|
|
<label class="labelClass">Monitored
|
|
|
|
<span class="small">Should NzbDrone download episodes for this series?</span>
|
|
|
|
</label>
|
|
|
|
@Html.DropDownList("masterMonitored", (SelectList)ViewData["BoolSelectList"], new { @class = "inputClass" })
|
|
|
|
<label class="labelClass">Use Season Folder
|
|
|
|
<span class="small">Should downloaded episodes be stored in season folders?</span>
|
|
|
|
</label>
|
|
|
|
@Html.DropDownList("masterSeasonFolder", (SelectList)ViewData["BoolSelectList"], new { @class = "inputClass" })
|
2012-01-24 06:29:32 +00:00
|
|
|
<label class="labelClass">Backlog Status
|
|
|
|
<span class="small">Should NzbDrone perform backlog searches for this series?</span>
|
|
|
|
</label>
|
2012-01-26 01:02:21 +00:00
|
|
|
@Html.DropDownList("masterBacklogSetting", (SelectList)ViewData["MasterBacklogSettingSelectList"], new { @class = "inputClass" })
|
2012-01-20 07:50:45 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="buttons">
|
|
|
|
<button id="updateSelected" title="Update the selected series with the settings above">Update Selected</button>
|
|
|
|
|
|
|
|
<button type="submit" class="save_button" disabled="disabled" title="Commit the settings from your series above to the database">
|
|
|
|
Save Changes</button>
|
|
|
|
</div>
|
|
|
|
}
|
|
|
|
|
|
|
|
@section Scripts
|
|
|
|
{
|
2012-02-18 20:16:27 +00:00
|
|
|
<script type="text/javascript">
|
|
|
|
$(document).ready(function() {
|
|
|
|
$('#missingGrid').removeClass('hidden-grid');
|
|
|
|
|
|
|
|
oTable = $('.dataTablesGrid').dataTable({
|
|
|
|
"bShowAll": false,
|
|
|
|
"bPaginate": false,
|
|
|
|
"bLengthChange": false,
|
|
|
|
"bFilter": false,
|
|
|
|
"bSort": false,
|
|
|
|
"bInfo": false,
|
|
|
|
"bAutoWidth": false
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
2012-01-20 07:50:45 +00:00
|
|
|
$('.editToggleMaster').live('change', function () {
|
|
|
|
var toggle = $(this).prop('checked');
|
|
|
|
$('.editToggle').each(function () {
|
|
|
|
$(this).prop('checked', toggle);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
$('#updateSelected').live('click', function () {
|
|
|
|
//Find selected values
|
|
|
|
var profileId = $('#masterQualitySelector').val();
|
|
|
|
var monitored = $('#masterMonitored').val();
|
|
|
|
var seasonFolder = $('#masterSeasonFolder').val();
|
2012-01-26 01:02:21 +00:00
|
|
|
var backlogStatus = $('#masterBacklogSetting').val();
|
2012-01-20 07:50:45 +00:00
|
|
|
|
|
|
|
var selected = $('.editToggle:checked');
|
|
|
|
|
|
|
|
selected.each(function() {
|
|
|
|
if (profileId != -10) {
|
|
|
|
$(this).parent('td').parent('.seriesEditRow').find('.quality').val(profileId);
|
|
|
|
}
|
|
|
|
|
|
|
|
if (monitored != -10) {
|
|
|
|
var monitoredBool = true;
|
|
|
|
if (monitored != 1)
|
|
|
|
monitoredBool = false;
|
|
|
|
|
|
|
|
$(this).parent('td').parent('.seriesEditRow').find('.monitored').prop('checked', monitoredBool);
|
|
|
|
}
|
|
|
|
|
|
|
|
if (seasonFolder != -10) {
|
|
|
|
var seasonFolderBool = true;
|
|
|
|
if (seasonFolder != 1)
|
|
|
|
seasonFolderBool = false;
|
|
|
|
|
|
|
|
$(this).parent('td').parent('.seriesEditRow').find('.seasonFolder').prop('checked', seasonFolderBool);
|
|
|
|
}
|
2012-01-24 06:29:32 +00:00
|
|
|
|
|
|
|
if (backlogStatus != -10) {
|
2012-01-26 01:02:21 +00:00
|
|
|
$(this).parent('td').parent('.seriesEditRow').find('.backlogSetting').val(backlogStatus);
|
2012-01-24 06:29:32 +00:00
|
|
|
}
|
2012-01-20 07:50:45 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
2012-02-18 20:16:27 +00:00
|
|
|
//Update all checked rows
|
2012-01-20 07:50:45 +00:00
|
|
|
</script>
|
|
|
|
}
|