From d89b129afe1dcef10aa73ba875c86901af6d81f0 Mon Sep 17 00:00:00 2001 From: tidusjar Date: Wed, 24 Aug 2016 12:26:50 +0100 Subject: [PATCH] Remove the datetime picker css from the main assets block and only load it on the pages it needs. #493 --- PlexRequests.UI/Helpers/BaseUrlHelper.cs | 12 ++++++++++-- PlexRequests.UI/Views/Admin/LandingPage.cshtml | 2 +- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/PlexRequests.UI/Helpers/BaseUrlHelper.cs b/PlexRequests.UI/Helpers/BaseUrlHelper.cs index 625d71380..a30984ae4 100644 --- a/PlexRequests.UI/Helpers/BaseUrlHelper.cs +++ b/PlexRequests.UI/Helpers/BaseUrlHelper.cs @@ -84,7 +84,6 @@ namespace PlexRequests.UI.Helpers $"", $"", $"", - $"", $"", }; @@ -99,7 +98,6 @@ namespace PlexRequests.UI.Helpers $"", $"", $"", - $"", $"" }; @@ -118,6 +116,16 @@ namespace PlexRequests.UI.Helpers return helper.Raw(sb.ToString()); } + public static IHtmlString LoadDateTimePickerAsset(this HtmlHelpers helper) + { + var startUrl = GetBaseUrl(); + + var sb = new StringBuilder(); + sb.AppendLine($""); + sb.AppendLine($""); + + return helper.Raw(sb.ToString()); + } public static IHtmlString LoadAngularAssets(this HtmlHelpers helper) { var sb = new StringBuilder(); diff --git a/PlexRequests.UI/Views/Admin/LandingPage.cshtml b/PlexRequests.UI/Views/Admin/LandingPage.cshtml index 9f6dcec6f..38d3cc6fa 100644 --- a/PlexRequests.UI/Views/Admin/LandingPage.cshtml +++ b/PlexRequests.UI/Views/Admin/LandingPage.cshtml @@ -1,7 +1,7 @@ @using PlexRequests.UI.Helpers @Html.Partial("_Sidebar") @inherits Nancy.ViewEngines.Razor.NancyRazorViewBase - +@Html.LoadDateTimePickerAsset()