Skip to content

Commit 84c3cf8

Browse files
authored
Browser compatibility for theme based models (#637)
* Browser compatibility for theme based models, no layer is used for css references * changed Boolean by boolean
1 parent 4f96442 commit 84c3cf8

File tree

2 files changed

+30
-2
lines changed

2 files changed

+30
-2
lines changed

android/src/main/java/com/genexus/internet/HttpContext.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -999,6 +999,8 @@ public String getStaticContentBase()
999999
}
10001000

10011001
private String theme = "";
1002+
private boolean isDSO = false;
1003+
10021004
public String getTheme()
10031005
{
10041006

@@ -1008,9 +1010,15 @@ public String getTheme()
10081010
return theme;
10091011
}
10101012
public void setDefaultTheme(String t)
1013+
{
1014+
setDefaultTheme( t, false);
1015+
}
1016+
1017+
public void setDefaultTheme(String t, boolean isDSO)
10111018
{
10121019
pushCurrentUrl();
10131020
theme = t;
1021+
this.isDSO = isDSO;
10141022
}
10151023
public int setTheme(String t)
10161024
{

java/src/main/java/com/genexus/internet/HttpContext.java

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -544,7 +544,16 @@ private void AddStyleSheetFile(String styleSheet, String urlBuildNumber, boolean
544544
if (isGxThemeHidden)
545545
writeTextNL("<link id=\"gxtheme_css_reference\" " + sRelAtt + " type=\"text/css\" href=\"" + sUncachedURL + "\" " + htmlEndTag(HTMLElement.LINK));
546546
else
547-
writeTextNL("<style data-gx-href=\""+ sUncachedURL + "\"> @import url(\"" + sUncachedURL + "\") layer(" + sLayerName + ");</style>");
547+
{
548+
if (getThemeisDSO())
549+
{
550+
writeTextNL("<style data-gx-href=\""+ sUncachedURL + "\"> @import url(\"" + sUncachedURL + "\") layer(" + sLayerName + ");</style>");
551+
}
552+
else
553+
{
554+
writeTextNL("<link " + sRelAtt + " type=\"text/css\" href=\"" + sUncachedURL + "\" " + htmlEndTag(HTMLElement.LINK));
555+
}
556+
}
548557
}
549558
else
550559
{
@@ -1479,6 +1488,8 @@ public String getStaticContentBase()
14791488
}
14801489

14811490
private String theme = "";
1491+
private boolean isDSO = false;
1492+
14821493
public String getTheme()
14831494
{
14841495
WebSession session = getWebSession();
@@ -1493,9 +1504,18 @@ public String getTheme()
14931504

14941505
return theme;
14951506
}
1496-
public void setDefaultTheme(String t)
1507+
1508+
public boolean getThemeisDSO() {
1509+
return isDSO;
1510+
}
1511+
1512+
public void setDefaultTheme(String t){
1513+
setDefaultTheme( t, false);
1514+
}
1515+
public void setDefaultTheme(String t, boolean isDSO)
14971516
{
14981517
theme = t;
1518+
this.isDSO = isDSO;
14991519
}
15001520
@SuppressWarnings("unchecked")
15011521
public int setTheme(String t)

0 commit comments

Comments
 (0)