Removed broken season editor from Series/Index editor.
Cleaned up series editor UI, with descriptions.
This commit is contained in:
parent
412a3fc476
commit
9cf77955d0
|
@ -26,16 +26,20 @@ namespace NzbDrone.Web.Models
|
||||||
|
|
||||||
//View & Edit
|
//View & Edit
|
||||||
[DisplayName("Path")]
|
[DisplayName("Path")]
|
||||||
|
[Description("Where should NzbDrone store episodes for this series?")]
|
||||||
public string Path { get; set; }
|
public string Path { get; set; }
|
||||||
|
|
||||||
[DisplayName("Quality Profile")]
|
[DisplayName("Quality Profile")]
|
||||||
|
[Description("Which Quality Profile should NzbDrone use to download episodes?")]
|
||||||
public virtual int QualityProfileId { get; set; }
|
public virtual int QualityProfileId { get; set; }
|
||||||
|
|
||||||
//Editing Only
|
//Editing Only
|
||||||
[DisplayName("Use Season Folder")]
|
[DisplayName("Use Season Folder")]
|
||||||
|
[Description("Should downloaded episodes be stored in season folders?")]
|
||||||
public bool SeasonFolder { get; set; }
|
public bool SeasonFolder { get; set; }
|
||||||
|
|
||||||
[DisplayName("Monitored")]
|
[DisplayName("Monitored")]
|
||||||
|
[Description("Should NzbDrone download episodes for this series?")]
|
||||||
public bool Monitored { get; set; }
|
public bool Monitored { get; set; }
|
||||||
|
|
||||||
[DisplayName("Season Editor")]
|
[DisplayName("Season Editor")]
|
||||||
|
|
|
@ -320,9 +320,6 @@
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Content Include="Views\Series\EditorTemplates\SeriesModel.cshtml" />
|
<Content Include="Views\Series\EditorTemplates\SeriesModel.cshtml" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
|
||||||
<Content Include="Views\Series\SeasonEditor.cshtml" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Content Include="Views\Series\SingleSeason.cshtml" />
|
<Content Include="Views\Series\SingleSeason.cshtml" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
|
@ -5,31 +5,29 @@
|
||||||
Layout = null;
|
Layout = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
<div class=".settingsForm">
|
<link rel="stylesheet" type="text/css" href="../../../Content/Settings.css" />
|
||||||
@Html.HiddenFor(m => m.SeriesId)
|
|
||||||
<label class="labelClass">@Html.LabelFor(m => m.Monitored)
|
<div id="stylized" style="border-color: transparent;">
|
||||||
<span class="small">@Html.DescriptionFor(m => m.Monitored)</span>
|
<div class="settingsForm clearfix">
|
||||||
</label>
|
@Html.HiddenFor(m => m.SeriesId)
|
||||||
@Html.CheckBoxFor(m => m.Monitored, new { @class = "inputClass checkClass" })
|
<label class="labelClass">@Html.LabelFor(m => m.Monitored)
|
||||||
<label class="labelClass">@Html.LabelFor(m => m.SeasonFolder)
|
<span class="small">@Html.DescriptionFor(m => m.Monitored)</span>
|
||||||
<span class="small">@Html.DescriptionFor(m => m.SeasonFolder)</span>
|
</label>
|
||||||
</label>
|
@Html.CheckBoxFor(m => m.Monitored, new { @class = "inputClass checkClass" })
|
||||||
@Html.CheckBoxFor(m => m.SeasonFolder, new { @class = "inputClass checkClass" })
|
<label class="labelClass">@Html.LabelFor(m => m.SeasonFolder)
|
||||||
<label class="labelClass">@Html.LabelFor(m => m.QualityProfileId)
|
<span class="small">@Html.DescriptionFor(m => m.SeasonFolder)</span>
|
||||||
<span class="small">@Html.DescriptionFor(m => m.QualityProfileId)</span>
|
</label>
|
||||||
</label>
|
@Html.CheckBoxFor(m => m.SeasonFolder, new { @class = "inputClass checkClass" })
|
||||||
@Html.DropDownListFor(m => m.QualityProfileId, (SelectList)ViewData["SelectList"], new { @class = "inputClass" })
|
<label class="labelClass">@Html.LabelFor(m => m.QualityProfileId)
|
||||||
|
<span class="small">@Html.DescriptionFor(m => m.QualityProfileId)</span>
|
||||||
<div id="seasonEditorSection">
|
</label>
|
||||||
<div style="font-weight: bold; padding-right: 15px; padding-bottom: 5px;">
|
@Html.DropDownListFor(m => m.QualityProfileId, (SelectList)ViewData["SelectList"], new { @class = "inputClass" })
|
||||||
@Html.LabelFor(m => m.SeasonEditor)
|
<label class="labelClass">@Html.LabelFor(m => m.Path)
|
||||||
<span id="seasonEditorLoader">
|
<span class="small">@Html.DescriptionFor(m => m.Path)</span>
|
||||||
<img src="../../../Content/Images/ajax-loader.gif" width="14px" height="14px" style="margin-bottom: -2px;" /></span>
|
</label>
|
||||||
</div>
|
@Html.TextBoxFor(m => m.Path, new { @class = "inputClass" })
|
||||||
<div id="season-editor">
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<span id="ajaxSaveWheel" style="display: none; float: right; padding-right: 368px;
|
<span id="ajaxSaveWheel" style="display: none; float: right; padding-right: 550px;
|
||||||
padding-top: 1.5px;">
|
padding-top: 1.5px;">
|
||||||
<img src="../../../Content/Images/ajax-loader.gif" width="20px" height="20px" /></span>
|
<img src="../../../Content/Images/ajax-loader.gif" width="20px" height="20px" /></span>
|
|
@ -4,6 +4,7 @@
|
||||||
@section TitleContent{
|
@section TitleContent{
|
||||||
NZBDrone
|
NZBDrone
|
||||||
}
|
}
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
/* progress bar container */
|
/* progress bar container */
|
||||||
.progressbar
|
.progressbar
|
||||||
|
@ -46,6 +47,7 @@ NZBDrone
|
||||||
background: #E5ECF9;
|
background: #E5ECF9;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
@section ActionMenu{
|
@section ActionMenu{
|
||||||
@{Html.RenderPartial("SubMenu");}
|
@{Html.RenderPartial("SubMenu");}
|
||||||
}
|
}
|
||||||
|
@ -103,37 +105,10 @@ NZBDrone
|
||||||
.closest(".t-window")
|
.closest(".t-window")
|
||||||
.data("tWindow")
|
.data("tWindow")
|
||||||
.center();
|
.center();
|
||||||
|
|
||||||
var seriesId = args.dataItem.SeriesId;
|
|
||||||
var url = '@Url.Action("SeasonEditor", "Series")';
|
|
||||||
$('#season-editor').load(url, { seriesId: seriesId }, function (response, status, xhr) {
|
|
||||||
$('#seasonEditorLoader').hide();
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function grid_save(e) {
|
function grid_save(e) {
|
||||||
$('#ajaxSaveWheel').show();
|
$('#ajaxSaveWheel').show();
|
||||||
|
|
||||||
var seasonEditor = e.form.SeasonEditor_collection;
|
|
||||||
var saveSeasonEditUrl = '@Url.Action("SaveSeason", "Series")';
|
|
||||||
|
|
||||||
jQuery.each(seasonEditor, function () {
|
|
||||||
var guid = $(this).val();
|
|
||||||
var prefix = '#SeasonEditor_' + guid + '__';
|
|
||||||
var seriesId = $(prefix + 'SeriesId').val();
|
|
||||||
var seasonNumber = $(prefix + 'SeasonNumber').val();
|
|
||||||
var monitored = $(prefix + 'Monitored').attr('checked');
|
|
||||||
|
|
||||||
$.ajax({
|
|
||||||
type: "POST",
|
|
||||||
url: saveSeasonEditUrl,
|
|
||||||
data: jQuery.param({ seriesId: seriesId, seasonNumber: seasonNumber, monitored: monitored }),
|
|
||||||
error: function (req, status, error) {
|
|
||||||
alert("Sorry! We could save season changes at this time. " + error);
|
|
||||||
},
|
|
||||||
success: function (data, textStatus, jqXHR) { }
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function grid_rowBound(e) {
|
function grid_rowBound(e) {
|
||||||
|
|
|
@ -1,36 +0,0 @@
|
||||||
@using NzbDrone.Web.Models;
|
|
||||||
@model List<SeasonEditModel>
|
|
||||||
@{
|
|
||||||
Layout = null;
|
|
||||||
}
|
|
||||||
<div style="vertical-align: middle">
|
|
||||||
@foreach (var season in Model)
|
|
||||||
{
|
|
||||||
Html.RenderAction("GetSingleSeasonView", "Series", season);
|
|
||||||
}
|
|
||||||
</div>
|
|
||||||
@section Scripts{
|
|
||||||
<script type="text/javascript">
|
|
||||||
var lastChecked = null;
|
|
||||||
|
|
||||||
$(document).ready(function () {
|
|
||||||
$('.chkbox').click(function (event) {
|
|
||||||
if (!lastChecked) {
|
|
||||||
lastChecked = this;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (event.shiftKey) {
|
|
||||||
var start = $('.chkbox').index(this);
|
|
||||||
var end = $('.chkbox').index(lastChecked);
|
|
||||||
|
|
||||||
for (i = Math.min(start, end); i <= Math.max(start, end); i++) {
|
|
||||||
$('.chkbox')[i].checked = lastChecked.checked;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
lastChecked = this;
|
|
||||||
});
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
}
|
|
Loading…
Reference in New Issue