Mass edit is now Series Editor.
Renamed Opps to Oops. Fixed broken SeriesEditor.
This commit is contained in:
parent
eddafaca93
commit
0ff60bde92
|
@ -768,7 +768,7 @@ namespace NzbDrone.Core.Test.ProviderTests
|
||||||
fakeSeries[0].SeasonFolder = newSeasonFolder;
|
fakeSeries[0].SeasonFolder = newSeasonFolder;
|
||||||
|
|
||||||
//Act
|
//Act
|
||||||
Mocker.Resolve<SeriesProvider>().UpdateFromMassEdit(fakeSeries);
|
Mocker.Resolve<SeriesProvider>().UpdateFromSeriesEditor(fakeSeries);
|
||||||
|
|
||||||
//Assert
|
//Assert
|
||||||
var result = Db.Fetch<Series>();
|
var result = Db.Fetch<Series>();
|
||||||
|
@ -805,7 +805,7 @@ namespace NzbDrone.Core.Test.ProviderTests
|
||||||
fakeSeries[0].SeasonFolder = newSeasonFolder;
|
fakeSeries[0].SeasonFolder = newSeasonFolder;
|
||||||
|
|
||||||
//Act
|
//Act
|
||||||
Mocker.Resolve<SeriesProvider>().UpdateFromMassEdit(fakeSeries);
|
Mocker.Resolve<SeriesProvider>().UpdateFromSeriesEditor(fakeSeries);
|
||||||
|
|
||||||
//Assert
|
//Assert
|
||||||
var result = Db.Fetch<Series>();
|
var result = Db.Fetch<Series>();
|
||||||
|
|
|
@ -204,7 +204,7 @@ namespace NzbDrone.Core.Providers
|
||||||
return series;
|
return series;
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual void UpdateFromMassEdit(IList<Series> editedSeries)
|
public virtual void UpdateFromSeriesEditor(IList<Series> editedSeries)
|
||||||
{
|
{
|
||||||
var allSeries = GetAllSeries();
|
var allSeries = GetAllSeries();
|
||||||
|
|
||||||
|
|
|
@ -72,7 +72,7 @@ namespace NzbDrone.Web.Controllers
|
||||||
if (_smtpProvider.SendTestEmail(server, port, ssl, username, password, fromAddress, toAddresses))
|
if (_smtpProvider.SendTestEmail(server, port, ssl, username, password, fromAddress, toAddresses))
|
||||||
JsonNotificationResult.Info("Successfull", "Test email sent.");
|
JsonNotificationResult.Info("Successfull", "Test email sent.");
|
||||||
|
|
||||||
return JsonNotificationResult.Opps("Couldn't send Email, please check your settings");
|
return JsonNotificationResult.Oops("Couldn't send Email, please check your settings");
|
||||||
}
|
}
|
||||||
|
|
||||||
public JsonResult GetTwitterAuthorization()
|
public JsonResult GetTwitterAuthorization()
|
||||||
|
@ -80,7 +80,7 @@ namespace NzbDrone.Web.Controllers
|
||||||
var result = _twitterProvider.GetAuthorization();
|
var result = _twitterProvider.GetAuthorization();
|
||||||
|
|
||||||
if (result == null)
|
if (result == null)
|
||||||
JsonNotificationResult.Opps("Couldn't get Twitter Authorization");
|
JsonNotificationResult.Oops("Couldn't get Twitter Authorization");
|
||||||
|
|
||||||
return new JsonResult { Data = result, JsonRequestBehavior = JsonRequestBehavior.AllowGet };
|
return new JsonResult { Data = result, JsonRequestBehavior = JsonRequestBehavior.AllowGet };
|
||||||
}
|
}
|
||||||
|
@ -90,7 +90,7 @@ namespace NzbDrone.Web.Controllers
|
||||||
var result = _twitterProvider.GetAndSaveAccessToken(token, verifier);
|
var result = _twitterProvider.GetAndSaveAccessToken(token, verifier);
|
||||||
|
|
||||||
if (!result)
|
if (!result)
|
||||||
JsonNotificationResult.Opps("Couldn't verify Twitter Authorization");
|
JsonNotificationResult.Oops("Couldn't verify Twitter Authorization");
|
||||||
|
|
||||||
return JsonNotificationResult.Info("Good News!", "Successfully verified Twitter Authorization.");
|
return JsonNotificationResult.Info("Good News!", "Successfully verified Twitter Authorization.");
|
||||||
|
|
||||||
|
@ -111,7 +111,7 @@ namespace NzbDrone.Web.Controllers
|
||||||
}
|
}
|
||||||
catch(Exception ex)
|
catch(Exception ex)
|
||||||
{
|
{
|
||||||
return JsonNotificationResult.Opps("Couldn't register and test Growl");
|
return JsonNotificationResult.Oops("Couldn't register and test Growl");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -47,7 +47,7 @@ namespace NzbDrone.Web.Controllers
|
||||||
return View((object)serialized);
|
return View((object)serialized);
|
||||||
}
|
}
|
||||||
|
|
||||||
public ActionResult SeriesEditor(int seriesId)
|
public ActionResult SingleSeriesEditor(int seriesId)
|
||||||
{
|
{
|
||||||
var profiles = _qualityProvider.All();
|
var profiles = _qualityProvider.All();
|
||||||
ViewData["SelectList"] = new SelectList(profiles, "QualityProfileId", "Name");
|
ViewData["SelectList"] = new SelectList(profiles, "QualityProfileId", "Name");
|
||||||
|
@ -66,7 +66,7 @@ namespace NzbDrone.Web.Controllers
|
||||||
}
|
}
|
||||||
|
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
public EmptyResult SaveSeriesEditor(SeriesModel seriesModel)
|
public EmptyResult SaveSingleSeriesEditor(SeriesModel seriesModel)
|
||||||
{
|
{
|
||||||
var series = _seriesProvider.GetSeries(seriesModel.SeriesId);
|
var series = _seriesProvider.GetSeries(seriesModel.SeriesId);
|
||||||
series.Monitored = seriesModel.Monitored;
|
series.Monitored = seriesModel.Monitored;
|
||||||
|
@ -133,7 +133,7 @@ namespace NzbDrone.Web.Controllers
|
||||||
return View(model);
|
return View(model);
|
||||||
}
|
}
|
||||||
|
|
||||||
public ActionResult MassEdit()
|
public ActionResult SeriesEditor()
|
||||||
{
|
{
|
||||||
var profiles = _qualityProvider.All();
|
var profiles = _qualityProvider.All();
|
||||||
ViewData["QualityProfiles"] = profiles;
|
ViewData["QualityProfiles"] = profiles;
|
||||||
|
@ -170,13 +170,13 @@ namespace NzbDrone.Web.Controllers
|
||||||
}
|
}
|
||||||
|
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
public JsonResult SaveMassEdit(List<Series> series)
|
public JsonResult SaveSeriesEditor(List<Series> series)
|
||||||
{
|
{
|
||||||
//Save edits
|
//Save edits
|
||||||
if (series == null || series.Count == 0)
|
if (series == null || series.Count == 0)
|
||||||
return JsonNotificationResult.Opps("Invalid post data");
|
return JsonNotificationResult.Oops("Invalid post data");
|
||||||
|
|
||||||
_seriesProvider.UpdateFromMassEdit(series);
|
_seriesProvider.UpdateFromSeriesEditor(series);
|
||||||
return JsonNotificationResult.Info("Series Mass Edit Saved");
|
return JsonNotificationResult.Info("Series Mass Edit Saved");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -279,7 +279,7 @@ namespace NzbDrone.Web.Controllers
|
||||||
public JsonResult DeleteQualityProfile(int profileId)
|
public JsonResult DeleteQualityProfile(int profileId)
|
||||||
{
|
{
|
||||||
if (_seriesProvider.GetAllSeries().Where(s => s.QualityProfileId == profileId).Count() != 0)
|
if (_seriesProvider.GetAllSeries().Where(s => s.QualityProfileId == profileId).Count() != 0)
|
||||||
return JsonNotificationResult.Opps("Profile is still in use.");
|
return JsonNotificationResult.Oops("Profile is still in use.");
|
||||||
|
|
||||||
_qualityProvider.Delete(profileId);
|
_qualityProvider.Delete(profileId);
|
||||||
|
|
||||||
|
@ -410,7 +410,7 @@ namespace NzbDrone.Web.Controllers
|
||||||
return GetSuccessResult();
|
return GetSuccessResult();
|
||||||
}
|
}
|
||||||
|
|
||||||
return JsonNotificationResult.Opps("Invalid Data");
|
return JsonNotificationResult.Oops("Invalid Data");
|
||||||
}
|
}
|
||||||
|
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
|
@ -613,7 +613,7 @@ namespace NzbDrone.Web.Controllers
|
||||||
|
|
||||||
private JsonResult GetInvalidModelResult()
|
private JsonResult GetInvalidModelResult()
|
||||||
{
|
{
|
||||||
return JsonNotificationResult.Opps("Invalid post data");
|
return JsonNotificationResult.Oops("Invalid post data");
|
||||||
}
|
}
|
||||||
|
|
||||||
private SelectList GetProwlPrioritySelectList()
|
private SelectList GetProwlPrioritySelectList()
|
||||||
|
|
|
@ -163,7 +163,7 @@ namespace NzbDrone.Web.Controllers
|
||||||
public JsonResult RunJob(string typeName)
|
public JsonResult RunJob(string typeName)
|
||||||
{
|
{
|
||||||
if (!_jobProvider.QueueJob(typeName))
|
if (!_jobProvider.QueueJob(typeName))
|
||||||
return JsonNotificationResult.Opps("Invalid Job Name");
|
return JsonNotificationResult.Oops("Invalid Job Name");
|
||||||
|
|
||||||
return JsonNotificationResult.Info("Job Queued");
|
return JsonNotificationResult.Info("Job Queued");
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,7 +11,7 @@ namespace NzbDrone.Web.Filters
|
||||||
|
|
||||||
public void OnException(ExceptionContext filterContext)
|
public void OnException(ExceptionContext filterContext)
|
||||||
{
|
{
|
||||||
filterContext.Result = JsonNotificationResult.Opps(filterContext.Exception.Message);
|
filterContext.Result = JsonNotificationResult.Oops(filterContext.Exception.Message);
|
||||||
filterContext.ExceptionHandled = true;
|
filterContext.ExceptionHandled = true;
|
||||||
logger.FatalException(filterContext.RequestContext.HttpContext.Request.RawUrl, filterContext.Exception);
|
logger.FatalException(filterContext.RequestContext.HttpContext.Request.RawUrl, filterContext.Exception);
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,9 +29,9 @@ namespace NzbDrone.Web.Models
|
||||||
return GetJsonResult(NotificationType.Error, title, text);
|
return GetJsonResult(NotificationType.Error, title, text);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static JsonResult Opps(string text)
|
public static JsonResult Oops(string text)
|
||||||
{
|
{
|
||||||
return GetJsonResult(NotificationType.Error, "Opps!", text);
|
return GetJsonResult(NotificationType.Error, "Oops!", text);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -472,10 +472,10 @@
|
||||||
<Content Include="Views\Settings\Misc.cshtml" />
|
<Content Include="Views\Settings\Misc.cshtml" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Content Include="Views\Series\MassEdit.cshtml" />
|
<Content Include="Views\Series\SeriesEditor.cshtml" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Content Include="Views\Series\SeriesItem.cshtml" />
|
<Content Include="Views\Series\SeriesEditorItem.cshtml" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Content Include="Views\Settings\DownloadClient.cshtml" />
|
<Content Include="Views\Settings\DownloadClient.cshtml" />
|
||||||
|
@ -493,7 +493,7 @@
|
||||||
<Content Include="Views\Series\Details.cshtml" />
|
<Content Include="Views\Series\Details.cshtml" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Content Include="Views\Series\SeriesEditor.cshtml" />
|
<Content Include="Views\Series\SingleSeriesEditor.cshtml" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Content Include="Views\Upcoming\UpcomingEpisode.cshtml" />
|
<Content Include="Views\Upcoming\UpcomingEpisode.cshtml" />
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
var seriesEditorUrl = '../Series/SeriesEditor';
|
var seriesEditorUrl = '../Series/SingleSeriesEditor';
|
||||||
var saveSeriesEditorUrl = '../Series/SaveSeriesEditor';
|
var saveSeriesEditorUrl = '../Series/SaveSingleSeriesEditor';
|
||||||
var seriesDeleteUrl = '../Series/DeleteSeries';
|
var seriesDeleteUrl = '../Series/DeleteSeries';
|
||||||
|
|
||||||
$("#seriesEditor").dialog({
|
$("#seriesEditor").dialog({
|
||||||
|
|
|
@ -76,7 +76,7 @@
|
||||||
<ul class="sub-menu">
|
<ul class="sub-menu">
|
||||||
<li>@Html.ActionLink("Add Series", "Index", "AddSeries")</li>
|
<li>@Html.ActionLink("Add Series", "Index", "AddSeries")</li>
|
||||||
<li>@Ajax.ActionLink("Start RSS Sync", "RssSync", "Command", null)</li>
|
<li>@Ajax.ActionLink("Start RSS Sync", "RssSync", "Command", null)</li>
|
||||||
<li>@Html.ActionLink("Mass Edit", "MassEdit", "Series")</li>
|
<li>@Html.ActionLink("Series Editor", "SeriesEditor", "Series")</li>
|
||||||
</ul>
|
</ul>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,155 +0,0 @@
|
||||||
@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 {
|
|
||||||
margin: 2px 2px;
|
|
||||||
}
|
|
||||||
|
|
||||||
td .path {
|
|
||||||
width: 300px;
|
|
||||||
}
|
|
||||||
|
|
||||||
td .backlogSetting {
|
|
||||||
width: 90px;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
}
|
|
||||||
|
|
||||||
@using (Html.BeginForm("SaveMassEdit", "Series", FormMethod.Post, new { id = "MassEdit", name = "MassEdit" }))
|
|
||||||
{
|
|
||||||
<table class="dataTable dataTablesGrid no-details">
|
|
||||||
<thead>
|
|
||||||
<th width="14px">@Html.CheckBox("editToggleMaster", false, new { @class = "editToggleMaster" })</th>
|
|
||||||
<th>Title</th>
|
|
||||||
<th width="210px">Quality</th>
|
|
||||||
<th class="checkboxColumn">Monitored</th>
|
|
||||||
<th class="checkboxColumn">Season Folder</th>
|
|
||||||
<th width="100px">Backlog Status</th>
|
|
||||||
<th width="310px">Path</th>
|
|
||||||
</thead>
|
|
||||||
|
|
||||||
<tbody>
|
|
||||||
@foreach (var series in Model)
|
|
||||||
{
|
|
||||||
Html.RenderPartial("SeriesItem", series);
|
|
||||||
}
|
|
||||||
</tbody>
|
|
||||||
</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" })
|
|
||||||
<label class="labelClass">Backlog Status
|
|
||||||
<span class="small">Should NzbDrone perform backlog searches for this series?</span>
|
|
||||||
</label>
|
|
||||||
@Html.DropDownList("masterBacklogSetting", (SelectList)ViewData["MasterBacklogSettingSelectList"], new { @class = "inputClass" })
|
|
||||||
</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
|
|
||||||
{
|
|
||||||
<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
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
$('.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();
|
|
||||||
var backlogStatus = $('#masterBacklogSetting').val();
|
|
||||||
|
|
||||||
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);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (backlogStatus != -10) {
|
|
||||||
$(this).parent('td').parent('.seriesEditRow').find('.backlogSetting').val(backlogStatus);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
//Update all checked rows
|
|
||||||
</script>
|
|
||||||
}
|
|
|
@ -1,40 +1,155 @@
|
||||||
@using NzbDrone.Web.Helpers;
|
@using NzbDrone.Web.Helpers
|
||||||
@model NzbDrone.Web.Models.SeriesModel
|
@model IEnumerable<NzbDrone.Core.Repository.Series>
|
||||||
@{
|
@{ViewBag.Title = "NzbDrone";}
|
||||||
Layout = null;
|
|
||||||
|
@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 {
|
||||||
|
margin: 2px 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
td .path {
|
||||||
|
width: 300px;
|
||||||
|
}
|
||||||
|
|
||||||
|
td .backlogSetting {
|
||||||
|
width: 90px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
}
|
}
|
||||||
|
|
||||||
<style>
|
@using (Html.BeginForm("SaveSeriesEditor", "Series", FormMethod.Post, new { id = "SeriesEditor", name = "SeriesEditor" }))
|
||||||
.settingsForm
|
{
|
||||||
{
|
<table id ="seriesEditorGrid" class="dataTable dataTablesGrid no-details">
|
||||||
overflow: auto;
|
<thead>
|
||||||
}
|
<th width="14px">@Html.CheckBox("editToggleMaster", false, new { @class = "editToggleMaster" })</th>
|
||||||
</style>
|
<th>Title</th>
|
||||||
|
<th width="210px">Quality</th>
|
||||||
|
<th class="checkboxColumn">Monitored</th>
|
||||||
|
<th class="checkboxColumn">Season Folder</th>
|
||||||
|
<th width="100px">Backlog Status</th>
|
||||||
|
<th width="310px">Path</th>
|
||||||
|
</thead>
|
||||||
|
|
||||||
|
<tbody>
|
||||||
|
@foreach (var series in Model)
|
||||||
|
{
|
||||||
|
Html.RenderPartial("SeriesEditorItem", series);
|
||||||
|
}
|
||||||
|
</tbody>
|
||||||
|
</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" })
|
||||||
|
<label class="labelClass">Backlog Status
|
||||||
|
<span class="small">Should NzbDrone perform backlog searches for this series?</span>
|
||||||
|
</label>
|
||||||
|
@Html.DropDownList("masterBacklogSetting", (SelectList)ViewData["MasterBacklogSettingSelectList"], new { @class = "inputClass" })
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div id="stylized" style="border-color: transparent;">
|
<div class="buttons">
|
||||||
@using (Html.BeginForm("SaveSeriesEditor", "Series", FormMethod.Post, new { id = "SeriesEditorForm", name = "SeriesEditorForm", @class = "settingsForm" }))
|
<button id="updateSelected" title="Update the selected series with the settings above">Update Selected</button>
|
||||||
{
|
|
||||||
@Html.HiddenFor(m => m.SeriesId)
|
<button type="submit" class="save_button" disabled="disabled" title="Commit the settings from your series above to the database">
|
||||||
@Html.HiddenFor(m => m.Status)
|
Save Changes</button>
|
||||||
<label class="labelClass">@Html.LabelFor(m => m.Monitored)
|
</div>
|
||||||
<span class="small">@Html.DescriptionFor(m => m.Monitored)</span>
|
}
|
||||||
</label>
|
|
||||||
@Html.CheckBoxFor(m => m.Monitored, new { @class = "inputClass checkClass" })
|
@section Scripts
|
||||||
<label class="labelClass">@Html.LabelFor(m => m.SeasonFolder)
|
{
|
||||||
<span class="small">@Html.DescriptionFor(m => m.SeasonFolder)</span>
|
<script type="text/javascript">
|
||||||
</label>
|
$(document).ready(function() {
|
||||||
@Html.CheckBoxFor(m => m.SeasonFolder, new { @class = "inputClass checkClass" })
|
$('#seriesEditorGrid').removeClass('hidden-grid');
|
||||||
<label class="labelClass">@Html.LabelFor(m => m.QualityProfileId)
|
|
||||||
<span class="small">@Html.DescriptionFor(m => m.QualityProfileId)</span>
|
oTable = $('.dataTablesGrid').dataTable({
|
||||||
</label>
|
"bShowAll": false,
|
||||||
@Html.DropDownListFor(m => m.QualityProfileId, (SelectList)ViewData["SelectList"], new { @class = "inputClass" })
|
"bPaginate": false,
|
||||||
<label class="labelClass">@Html.LabelFor(m => m.Path)
|
"bLengthChange": false,
|
||||||
<span class="small">@Html.DescriptionFor(m => m.Path)</span>
|
"bFilter": false,
|
||||||
</label>
|
"bSort": false,
|
||||||
@Html.TextBoxFor(m => m.Path, new { @class = "inputClass" })
|
"bInfo": false,
|
||||||
<label class="labelClass">@Html.LabelFor(m => m.BacklogSetting)
|
"bAutoWidth": false
|
||||||
<span class="small">@Html.DescriptionFor(m => m.BacklogSetting)</span>
|
});
|
||||||
</label>
|
});
|
||||||
@Html.DropDownListFor(m => m.BacklogSetting, (SelectList)ViewData["BacklogSettingSelectList"], new { @class = "inputClass" })
|
|
||||||
}
|
$('.editToggleMaster').live('change', function () {
|
||||||
</div>
|
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();
|
||||||
|
var backlogStatus = $('#masterBacklogSetting').val();
|
||||||
|
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (backlogStatus != -10) {
|
||||||
|
$(this).parent('td').parent('.seriesEditRow').find('.backlogSetting').val(backlogStatus);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
//Update all checked rows
|
||||||
|
</script>
|
||||||
|
}
|
|
@ -9,10 +9,11 @@
|
||||||
|
|
||||||
@*SeriesId, Title, Quality, Monitored, Use Season Folder, Root Directory/Path*, Backlog Toggle*@
|
@*SeriesId, Title, Quality, Monitored, Use Season Folder, Root Directory/Path*, Backlog Toggle*@
|
||||||
|
|
||||||
@using (Html.BeginCollectionItem("series"))
|
<tr class="seriesEditRow">
|
||||||
{
|
@using (Html.BeginCollectionItem("series"))
|
||||||
var idClean = ViewData.TemplateInfo.HtmlFieldPrefix.Replace('[', '_').Replace(']', '_');
|
{
|
||||||
<tr class="seriesEditRow">
|
var idClean = ViewData.TemplateInfo.HtmlFieldPrefix.Replace('[', '_').Replace(']', '_');
|
||||||
|
|
||||||
@Html.HiddenFor(m => m.SeriesId)
|
@Html.HiddenFor(m => m.SeriesId)
|
||||||
<td>@Html.CheckBox("editToggle", false, new {@class = "editToggle"})</td>
|
<td>@Html.CheckBox("editToggle", false, new {@class = "editToggle"})</td>
|
||||||
<td>@Model.Title</td>
|
<td>@Model.Title</td>
|
||||||
|
@ -21,5 +22,5 @@
|
||||||
<td class="checkboxColumn">@Html.CheckBoxFor(m => m.SeasonFolder, new {@class = "seriesCheckbox seasonFolder"})</td>
|
<td class="checkboxColumn">@Html.CheckBoxFor(m => m.SeasonFolder, new {@class = "seriesCheckbox seasonFolder"})</td>
|
||||||
<td>@Html.DropDownListFor(m => m.BacklogSetting, new SelectList((List<KeyValuePair<int, string>>)ViewData["BacklogSettingTypes"], "Key", "Value", (int)Model.BacklogSetting), new { @class = "backlogSetting" })</td>
|
<td>@Html.DropDownListFor(m => m.BacklogSetting, new SelectList((List<KeyValuePair<int, string>>)ViewData["BacklogSettingTypes"], "Key", "Value", (int)Model.BacklogSetting), new { @class = "backlogSetting" })</td>
|
||||||
<td>@Html.TextBoxFor(m => m.Path, new { @class = "path" })</td>
|
<td>@Html.TextBoxFor(m => m.Path, new { @class = "path" })</td>
|
||||||
</tr>
|
}
|
||||||
}
|
</tr>
|
|
@ -0,0 +1,40 @@
|
||||||
|
@using NzbDrone.Web.Helpers;
|
||||||
|
@model NzbDrone.Web.Models.SeriesModel
|
||||||
|
@{
|
||||||
|
Layout = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.settingsForm
|
||||||
|
{
|
||||||
|
overflow: auto;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<div id="stylized" style="border-color: transparent;">
|
||||||
|
@using (Html.BeginForm("SaveSingleSeriesEditor", "Series", FormMethod.Post, new { id = "SeriesEditorForm", name = "SeriesEditorForm", @class = "settingsForm" }))
|
||||||
|
{
|
||||||
|
@Html.HiddenFor(m => m.SeriesId)
|
||||||
|
@Html.HiddenFor(m => m.Status)
|
||||||
|
<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" })
|
||||||
|
<label class="labelClass">@Html.LabelFor(m => m.BacklogSetting)
|
||||||
|
<span class="small">@Html.DescriptionFor(m => m.BacklogSetting)</span>
|
||||||
|
</label>
|
||||||
|
@Html.DropDownListFor(m => m.BacklogSetting, (SelectList)ViewData["BacklogSettingSelectList"], new { @class = "inputClass" })
|
||||||
|
}
|
||||||
|
</div>
|
Loading…
Reference in New Issue