From 008dad83de0606433dd5c054b7f13554434fc9fe Mon Sep 17 00:00:00 2001 From: dmendez Date: Tue, 22 Nov 2022 11:29:00 -0300 Subject: [PATCH] For legacy browser compatibility for WEB theme based models no layer is used for css references --- .../dotnetframework/GxClasses/Core/GXApplication.cs | 12 +++++++++--- .../dotnetframework/GxClasses/Middleware/GXHttp.cs | 11 ++++++++++- 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/dotnet/src/dotnetframework/GxClasses/Core/GXApplication.cs b/dotnet/src/dotnetframework/GxClasses/Core/GXApplication.cs index 33568f6bf..177c677f1 100644 --- a/dotnet/src/dotnetframework/GxClasses/Core/GXApplication.cs +++ b/dotnet/src/dotnetframework/GxClasses/Core/GXApplication.cs @@ -240,7 +240,8 @@ public interface IGxContext string GetImagePath(string id, string KBId, string theme); string GetImageSrcSet(string baseImage); string GetTheme(); - void SetDefaultTheme(string theme); + void SetDefaultTheme(string theme, bool isDSO = false); + bool GetThemeisDSO(); int SetTheme(string theme); bool CheckContentType(string contentKey, string contentType, string fullPath); string ExtensionForContentType(string contentType); @@ -366,6 +367,7 @@ public List userStyleSheetFiles { [NonSerialized] IReportHandler _reportHandler; string _theme = ""; + bool _theme_isDSO = false; [NonSerialized] ArrayList _reportHandlerToClose; private bool configuredEventHandling; @@ -3733,9 +3735,13 @@ public int SetTheme(string t) return WriteSessionKey(GXTheme, cThemeMap) ? 1 : 0; } } - public void SetDefaultTheme(string t) + public bool GetThemeisDSO() { + return _theme_isDSO; + } + public void SetDefaultTheme(string t, bool isDSO = false) { _theme = t; + _theme_isDSO = isDSO; } public string FileToBase64(string filePath) @@ -3798,7 +3804,7 @@ public void SetSubmitInitialConfig(IGxContext context) { GXLogging.Debug(log, "SetSubmitInitialConfig:", () => _handle.ToString() + " clientid:" + context.ClientID); this._isSumbited = true; - this.SetDefaultTheme(context.GetTheme()); + this.SetDefaultTheme(context.GetTheme(), context.GetThemeisDSO()); this.SetPhysicalPath(context.GetPhysicalPath()); this.SetLanguageWithoutSession(context.GetLanguage()); this.ClientID = context.ClientID; diff --git a/dotnet/src/dotnetframework/GxClasses/Middleware/GXHttp.cs b/dotnet/src/dotnetframework/GxClasses/Middleware/GXHttp.cs index c821da183..6dca6a861 100644 --- a/dotnet/src/dotnetframework/GxClasses/Middleware/GXHttp.cs +++ b/dotnet/src/dotnetframework/GxClasses/Middleware/GXHttp.cs @@ -1158,7 +1158,16 @@ private void AddStyleSheetFile(string styleSheet, string urlBuildNumber, bool is if (isGxThemeHidden) context.WriteHtmlTextNl(" @import url(\"" + sUncachedURL + "\") layer(" + sLayerName + ");"); + { + if (context.GetThemeisDSO()) + { + context.WriteHtmlTextNl(""); + } + else + { + context.WriteHtmlTextNl("