mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-07-16 02:02:55 -07:00
Remove the datetime picker css from the main assets block and only load it on the pages it needs. #493
This commit is contained in:
parent
8969ebd299
commit
d89b129afe
2 changed files with 11 additions and 3 deletions
|
@ -84,7 +84,6 @@ namespace PlexRequests.UI.Helpers
|
||||||
$"<link rel=\"stylesheet\" href=\"{startUrl}/awesome-bootstrap-checkbox.css\" type=\"text/css\"/>",
|
$"<link rel=\"stylesheet\" href=\"{startUrl}/awesome-bootstrap-checkbox.css\" type=\"text/css\"/>",
|
||||||
$"<link rel=\"stylesheet\" href=\"{startUrl}/base.css\" type=\"text/css\"/>",
|
$"<link rel=\"stylesheet\" href=\"{startUrl}/base.css\" type=\"text/css\"/>",
|
||||||
$"<link rel=\"stylesheet\" href=\"{startUrl}/Themes/{settings.ThemeName}\" type=\"text/css\"/>",
|
$"<link rel=\"stylesheet\" href=\"{startUrl}/Themes/{settings.ThemeName}\" type=\"text/css\"/>",
|
||||||
$"<link rel=\"stylesheet\" href=\"{startUrl}/datepicker.min.css\" type=\"text/css\"/>",
|
|
||||||
$"<link rel=\"stylesheet\" href=\"{startUrl}/tooltip/tooltipster.bundle.min.css\" type=\"text/css\"/>",
|
$"<link rel=\"stylesheet\" href=\"{startUrl}/tooltip/tooltipster.bundle.min.css\" type=\"text/css\"/>",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -99,7 +98,6 @@ namespace PlexRequests.UI.Helpers
|
||||||
$"<script src=\"{startUrl}/pace.min.js\"></script>",
|
$"<script src=\"{startUrl}/pace.min.js\"></script>",
|
||||||
$"<script src=\"{startUrl}/jquery.mixitup.js\"></script>",
|
$"<script src=\"{startUrl}/jquery.mixitup.js\"></script>",
|
||||||
$"<script src=\"{startUrl}/moment.min.js\"></script>",
|
$"<script src=\"{startUrl}/moment.min.js\"></script>",
|
||||||
$"<script src=\"{startUrl}/bootstrap-datetimepicker.min.js\"></script>",
|
|
||||||
$"<script src=\"{startUrl}/tooltip/tooltipster.bundle.min.js\"></script>"
|
$"<script src=\"{startUrl}/tooltip/tooltipster.bundle.min.js\"></script>"
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -118,6 +116,16 @@ namespace PlexRequests.UI.Helpers
|
||||||
return helper.Raw(sb.ToString());
|
return helper.Raw(sb.ToString());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static IHtmlString LoadDateTimePickerAsset(this HtmlHelpers helper)
|
||||||
|
{
|
||||||
|
var startUrl = GetBaseUrl();
|
||||||
|
|
||||||
|
var sb = new StringBuilder();
|
||||||
|
sb.AppendLine($"<link rel=\"stylesheet\" href=\"{startUrl}/datepicker.min.css\" type=\"text/css\"/>");
|
||||||
|
sb.AppendLine($"<script src=\"{startUrl}/bootstrap-datetimepicker.min.js\"></script>");
|
||||||
|
|
||||||
|
return helper.Raw(sb.ToString());
|
||||||
|
}
|
||||||
public static IHtmlString LoadAngularAssets(this HtmlHelpers helper)
|
public static IHtmlString LoadAngularAssets(this HtmlHelpers helper)
|
||||||
{
|
{
|
||||||
var sb = new StringBuilder();
|
var sb = new StringBuilder();
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
@using PlexRequests.UI.Helpers
|
@using PlexRequests.UI.Helpers
|
||||||
@Html.Partial("_Sidebar")
|
@Html.Partial("_Sidebar")
|
||||||
@inherits Nancy.ViewEngines.Razor.NancyRazorViewBase<PlexRequests.Core.SettingModels.LandingPageSettings>
|
@inherits Nancy.ViewEngines.Razor.NancyRazorViewBase<PlexRequests.Core.SettingModels.LandingPageSettings>
|
||||||
|
@Html.LoadDateTimePickerAsset()
|
||||||
<div class="col-sm-8 col-sm-push-1">
|
<div class="col-sm-8 col-sm-push-1">
|
||||||
<form class="form-horizontal" method="POST" id="mainForm">
|
<form class="form-horizontal" method="POST" id="mainForm">
|
||||||
<fieldset>
|
<fieldset>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue