Removed broken season editor from Series/Index editor.

Cleaned up series editor UI, with descriptions.
pull/4/head
Mark McDowall 13 years ago
parent 412a3fc476
commit 9cf77955d0

@ -26,16 +26,20 @@ namespace NzbDrone.Web.Models
//View & Edit
[DisplayName("Path")]
[Description("Where should NzbDrone store episodes for this series?")]
public string Path { get; set; }
[DisplayName("Quality Profile")]
[Description("Which Quality Profile should NzbDrone use to download episodes?")]
public virtual int QualityProfileId { get; set; }
//Editing Only
[DisplayName("Use Season Folder")]
[Description("Should downloaded episodes be stored in season folders?")]
public bool SeasonFolder { get; set; }
[DisplayName("Monitored")]
[Description("Should NzbDrone download episodes for this series?")]
public bool Monitored { get; set; }
[DisplayName("Season Editor")]

@ -320,9 +320,6 @@
<ItemGroup>
<Content Include="Views\Series\EditorTemplates\SeriesModel.cshtml" />
</ItemGroup>
<ItemGroup>
<Content Include="Views\Series\SeasonEditor.cshtml" />
</ItemGroup>
<ItemGroup>
<Content Include="Views\Series\SingleSeason.cshtml" />
</ItemGroup>

@ -5,31 +5,29 @@
Layout = null;
}
<div class=".settingsForm">
@Html.HiddenFor(m => m.SeriesId)
<label class="labelClass">@Html.LabelFor(m => m.Monitored)
<span class="small">@Html.DescriptionFor(m => m.Monitored)</span>
</label>
@Html.CheckBoxFor(m => m.Monitored, new { @class = "inputClass checkClass" })
<label class="labelClass">@Html.LabelFor(m => m.SeasonFolder)
<span class="small">@Html.DescriptionFor(m => m.SeasonFolder)</span>
</label>
@Html.CheckBoxFor(m => m.SeasonFolder, new { @class = "inputClass checkClass" })
<label class="labelClass">@Html.LabelFor(m => m.QualityProfileId)
<span class="small">@Html.DescriptionFor(m => m.QualityProfileId)</span>
</label>
@Html.DropDownListFor(m => m.QualityProfileId, (SelectList)ViewData["SelectList"], new { @class = "inputClass" })
<div id="seasonEditorSection">
<div style="font-weight: bold; padding-right: 15px; padding-bottom: 5px;">
@Html.LabelFor(m => m.SeasonEditor)
<span id="seasonEditorLoader">
<img src="../../../Content/Images/ajax-loader.gif" width="14px" height="14px" style="margin-bottom: -2px;" /></span>
</div>
<div id="season-editor">
</div>
<link rel="stylesheet" type="text/css" href="../../../Content/Settings.css" />
<div id="stylized" style="border-color: transparent;">
<div class="settingsForm clearfix">
@Html.HiddenFor(m => m.SeriesId)
<label class="labelClass">@Html.LabelFor(m => m.Monitored)
<span class="small">@Html.DescriptionFor(m => m.Monitored)</span>
</label>
@Html.CheckBoxFor(m => m.Monitored, new { @class = "inputClass checkClass" })
<label class="labelClass">@Html.LabelFor(m => m.SeasonFolder)
<span class="small">@Html.DescriptionFor(m => m.SeasonFolder)</span>
</label>
@Html.CheckBoxFor(m => m.SeasonFolder, new { @class = "inputClass checkClass" })
<label class="labelClass">@Html.LabelFor(m => m.QualityProfileId)
<span class="small">@Html.DescriptionFor(m => m.QualityProfileId)</span>
</label>
@Html.DropDownListFor(m => m.QualityProfileId, (SelectList)ViewData["SelectList"], new { @class = "inputClass" })
<label class="labelClass">@Html.LabelFor(m => m.Path)
<span class="small">@Html.DescriptionFor(m => m.Path)</span>
</label>
@Html.TextBoxFor(m => m.Path, new { @class = "inputClass" })
</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;">
<img src="../../../Content/Images/ajax-loader.gif" width="20px" height="20px" /></span>

@ -4,6 +4,7 @@
@section TitleContent{
NZBDrone
}
<style>
/* progress bar container */
.progressbar
@ -46,6 +47,7 @@ NZBDrone
background: #E5ECF9;
}
</style>
@section ActionMenu{
@{Html.RenderPartial("SubMenu");}
}
@ -103,37 +105,10 @@ NZBDrone
.closest(".t-window")
.data("tWindow")
.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) {
$('#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) {

@ -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…
Cancel
Save