X-Git-Url: https://git.argeo.org/?a=blobdiff_plain;f=org.argeo.cms.ui%2Fsrc%2Forg%2Fargeo%2Fcms%2Fscript%2FTheme.java;h=c256a69209233bb9a07e4a6cca50f722c37ff2ae;hb=9b0996e1dd6b7cd59e998b7f4210898c42c3631f;hp=3fa4bc451edae6b324603c5a0dadf5840a1e6bbe;hpb=70d6bd20ba2284682fec3a33f3fa14a485ec9985;p=lgpl%2Fargeo-commons.git diff --git a/org.argeo.cms.ui/src/org/argeo/cms/script/Theme.java b/org.argeo.cms.ui/src/org/argeo/cms/script/Theme.java index 3fa4bc451..c256a6920 100644 --- a/org.argeo.cms.ui/src/org/argeo/cms/script/Theme.java +++ b/org.argeo.cms.ui/src/org/argeo/cms/script/Theme.java @@ -18,6 +18,7 @@ import org.apache.commons.logging.LogFactory; import org.argeo.cms.CmsException; import org.argeo.cms.util.BundleResourceLoader; import org.argeo.cms.util.ThemeUtils; +import org.eclipse.rap.rwt.RWT; import org.eclipse.rap.rwt.application.Application; import org.eclipse.rap.rwt.service.ResourceLoader; import org.osgi.framework.Bundle; @@ -26,7 +27,7 @@ import org.osgi.framework.BundleContext; public class Theme { private final static Log log = LogFactory.getLog(Theme.class); - private final String themeId; + private String themeId; private Map css = new HashMap<>(); private Map resources = new HashMap<>(); @@ -44,14 +45,14 @@ public class Theme { Bundle themeBundle; if (symbolicName == null) { themeBundle = bundleContext.getBundle(); - basePath = "/theme/internal/"; - cssPath = basePath; +// basePath = "/theme/"; +// cssPath = basePath; } else { themeBundle = ThemeUtils.findThemeBundle(bundleContext, symbolicName); - basePath = "/"; - cssPath = "/rap/"; } - this.themeId = themeBundle.getSymbolicName(); + basePath = "/"; + cssPath = "/rap/"; + this.themeId = RWT.DEFAULT_THEME_ID; addStyleSheets(themeBundle, new BundleResourceLoader(themeBundle)); BundleResourceLoader themeBRL = new BundleResourceLoader(themeBundle); addResources(themeBRL, "*.png"); @@ -165,6 +166,10 @@ public class Theme { return themeId; } + public void setThemeId(String themeId) { + this.themeId = themeId; + } + public String getBasePath() { return basePath; }