From 0255b6a553226b6947c0d1a4ba559630df86c0bd Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Wed, 17 Jun 2015 11:39:46 -0400 Subject: [PATCH] break up jquery mobile --- MediaBrowser.WebDashboard/Api/PackageCreator.cs | 12 +++++++++--- .../MediaBrowser.WebDashboard.csproj | 3 +++ 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/MediaBrowser.WebDashboard/Api/PackageCreator.cs b/MediaBrowser.WebDashboard/Api/PackageCreator.cs index 542b3df676..c8a491a6ec 100644 --- a/MediaBrowser.WebDashboard/Api/PackageCreator.cs +++ b/MediaBrowser.WebDashboard/Api/PackageCreator.cs @@ -281,7 +281,7 @@ namespace MediaBrowser.WebDashboard.Api "thirdparty/paper-toast/paper-toast.html", "thirdparty/paper-spinner/paper-spinner.html", //"thirdparty/paper-icon-button/paper-icon-button.html", - //"thirdparty/iron-icons/iron-icons.html" + "thirdparty/iron-icons/iron-icons.html" }; var importsHtml = string.Join("", imports.Select(i => "").ToArray()); @@ -383,7 +383,6 @@ namespace MediaBrowser.WebDashboard.Api var files = new[] { - "thirdparty/jquerymobile-1.4.5/jquery.mobile-1.4.5.min.css", "thirdparty/fontawesome/css/font-awesome.min.css" + versionString, "thirdparty/materialicons/style.css" + versionString, "css/all.css" + versionString @@ -627,6 +626,12 @@ namespace MediaBrowser.WebDashboard.Api /// Task{Stream}. private async Task GetAllCss(bool enableMinification) { + var memoryStream = new MemoryStream(); + var newLineBytes = Encoding.UTF8.GetBytes(Environment.NewLine); + + await AppendResource(memoryStream, "thirdparty/jquerymobile-1.4.5/jquery.mobile.custom.theme.min.css", newLineBytes).ConfigureAwait(false); + await AppendResource(memoryStream, "thirdparty/jquerymobile-1.4.5/jquery.mobile.custom.structure.min.css", newLineBytes).ConfigureAwait(false); + var files = new[] { "site.css", @@ -690,7 +695,8 @@ namespace MediaBrowser.WebDashboard.Api } } - var memoryStream = new MemoryStream(Encoding.UTF8.GetBytes(css)); + var bytes = Encoding.UTF8.GetBytes(css); + memoryStream.Write(bytes, 0, bytes.Length); memoryStream.Position = 0; return memoryStream; diff --git a/MediaBrowser.WebDashboard/MediaBrowser.WebDashboard.csproj b/MediaBrowser.WebDashboard/MediaBrowser.WebDashboard.csproj index 202f240665..55e49ab7d0 100644 --- a/MediaBrowser.WebDashboard/MediaBrowser.WebDashboard.csproj +++ b/MediaBrowser.WebDashboard/MediaBrowser.WebDashboard.csproj @@ -192,6 +192,9 @@ PreserveNewest + + + PreserveNewest