From e56e244efbc0a6f6e56e0bceb3c0c321d2066572 Mon Sep 17 00:00:00 2001 From: Marcus Hann Date: Tue, 27 Dec 2016 23:05:44 +0000 Subject: [PATCH 1/5] Implement simple button --- Ombi.UI/Content/search.js | 5 ++-- Ombi.UI/Models/SearchTvShowViewModel.cs | 1 + Ombi.UI/Modules/SearchModule.cs | 3 +- Ombi.UI/Views/Search/Index.cshtml | 40 ++++++++++++++----------- 4 files changed, 28 insertions(+), 21 deletions(-) diff --git a/Ombi.UI/Content/search.js b/Ombi.UI/Content/search.js index d05f3b4e6..443b1c050 100644 --- a/Ombi.UI/Content/search.js +++ b/Ombi.UI/Content/search.js @@ -83,7 +83,7 @@ $(function () { }); // Click TV dropdown option - $(document).on("click", ".dropdownTv", function (e) { + $(document).on("click", ".requestTv", function (e) { e.preventDefault(); var buttonId = e.target.id; if ($("#" + buttonId).attr('disabled')) { @@ -429,7 +429,8 @@ $(function () { url: result.plexUrl, tvPartialAvailable: result.tvPartialAvailable, disableTvRequestsByEpisode: result.disableTvRequestsByEpisode, - disableTvRequestsBySeason: result.disableTvRequestsBySeason + disableTvRequestsBySeason: result.disableTvRequestsBySeason, + enableTvRequestsForOnlySeries: result.enableTvRequestsForOnlySeries }; return context; diff --git a/Ombi.UI/Models/SearchTvShowViewModel.cs b/Ombi.UI/Models/SearchTvShowViewModel.cs index 47af1ba47..faa6333ba 100644 --- a/Ombi.UI/Models/SearchTvShowViewModel.cs +++ b/Ombi.UI/Models/SearchTvShowViewModel.cs @@ -57,5 +57,6 @@ namespace Ombi.UI.Models public bool TvFullyAvailable { get; set; } public bool DisableTvRequestsByEpisode { get; set; } public bool DisableTvRequestsBySeason { get; set; } + public bool EnableTvRequestsForOnlySeries { get; set; } } } \ No newline at end of file diff --git a/Ombi.UI/Modules/SearchModule.cs b/Ombi.UI/Modules/SearchModule.cs index 5722fc53f..f77e880e9 100644 --- a/Ombi.UI/Modules/SearchModule.cs +++ b/Ombi.UI/Modules/SearchModule.cs @@ -363,7 +363,8 @@ namespace Ombi.UI.Modules SeriesName = t.show.name, Status = t.show.status, DisableTvRequestsByEpisode = prSettings.DisableTvRequestsByEpisode, - DisableTvRequestsBySeason = prSettings.DisableTvRequestsBySeason + DisableTvRequestsBySeason = prSettings.DisableTvRequestsBySeason, + EnableTvRequestsForOnlySeries = (prSettings.DisableTvRequestsByEpisode && prSettings.DisableTvRequestsBySeason) }; diff --git a/Ombi.UI/Views/Search/Index.cshtml b/Ombi.UI/Views/Search/Index.cshtml index ffd6553d4..48da09b02 100644 --- a/Ombi.UI/Views/Search/Index.cshtml +++ b/Ombi.UI/Views/Search/Index.cshtml @@ -107,7 +107,7 @@ } -