Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions dotnet/src/dotnetframework/GxClasses/Core/GXApplication.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -366,6 +367,7 @@ public List<string[]> userStyleSheetFiles {
[NonSerialized]
IReportHandler _reportHandler;
string _theme = "";
bool _theme_isDSO = false;
[NonSerialized]
ArrayList _reportHandlerToClose;
private bool configuredEventHandling;
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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;
Expand Down
11 changes: 10 additions & 1 deletion dotnet/src/dotnetframework/GxClasses/Middleware/GXHttp.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1158,7 +1158,16 @@ private void AddStyleSheetFile(string styleSheet, string urlBuildNumber, bool is
if (isGxThemeHidden)
context.WriteHtmlTextNl("<link id=\"gxtheme_css_reference\" " + sRelAtt + " type=\"text/css\" href=\"" + sUncachedURL + "\" " + GXUtil.HtmlEndTag(HTMLElement.LINK));
else
context.WriteHtmlTextNl("<style data-gx-href=\""+ sUncachedURL + "\"> @import url(\"" + sUncachedURL + "\") layer(" + sLayerName + ");</style>");
{
if (context.GetThemeisDSO())
{
context.WriteHtmlTextNl("<style data-gx-href=\"" + sUncachedURL + "\"> @import url(\"" + sUncachedURL + "\") layer(" + sLayerName + ");</style>");
}
else
{
context.WriteHtmlTextNl("<link " + sRelAtt + " type=\"text/css\" href=\"" + context.GetCompleteURL(styleSheet) + "\"" + GXUtil.HtmlEndTag(HTMLElement.LINK));
}
}
}
else
{
Expand Down