diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/ADWindowToolbar.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/ADWindowToolbar.java index df7f0872b7..3aa0e898e3 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/ADWindowToolbar.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/ADWindowToolbar.java @@ -43,6 +43,7 @@ import org.compiere.model.X_AD_ToolBarButton; import org.compiere.util.CLogger; import org.compiere.util.Env; import org.compiere.util.Msg; +import org.compiere.util.Util; import org.compiere.util.ValueNamePair; import org.zkoss.image.AImage; import org.zkoss.zk.au.out.AuScript; @@ -219,8 +220,16 @@ public class ADWindowToolbar extends FToolbar implements EventListener ToolBarButton btn = new ToolBarButton(""); btn.setName(BTNPREFIX+name); btn.setId(btn.getName()); - if (image != null) - btn.setImage(ThemeManager.getThemeResource("images/"+image + "24.png")); + if (image != null) + { + String size = Env.getContext(Env.getCtx(), "#ZK_Toolbar_Button_Size"); + String suffix = "24.png"; + if (!Util.isEmpty(size)) + { + suffix = size + ".png"; + } + btn.setImage(ThemeManager.getThemeResource("images/"+image + suffix)); + } btn.setTooltiptext(Msg.getMsg(Env.getCtx(),tooltip)); btn.setSclass("toolbar-button"); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/BreadCrumb.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/BreadCrumb.java index d47f61543c..03e10aad07 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/BreadCrumb.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/BreadCrumb.java @@ -384,7 +384,13 @@ public class BreadCrumb extends Div implements EventListener { ToolBarButton btn = new ToolBarButton(""); btn.setName(BTNPREFIX+name); btn.setId(name); - btn.setImage(ThemeManager.getThemeResource("images/"+image + "24.png")); + String size = Env.getContext(Env.getCtx(), "#ZK_Toolbar_Button_Size"); + String suffix = "24.png"; + if (!Util.isEmpty(size)) + { + suffix = size + ".png"; + } + btn.setImage(ThemeManager.getThemeResource("images/"+image + suffix)); btn.setTooltiptext(Msg.getMsg(Env.getCtx(),tooltip)); btn.setSclass("breadcrumb-toolbar-button"); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/theme/ITheme.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/theme/ITheme.java index 06789a6cad..84fb5debc5 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/theme/ITheme.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/theme/ITheme.java @@ -41,17 +41,6 @@ public interface ITheme { public static final String LOGIN_LABEL_CLASS = "login-label"; public static final String LOGIN_FIELD_CLASS = "login-field"; - //optional top, bottom, left, right content for the login page - public static final String LOGIN_NORTH_PANEL_CLASS = "login-north-panel"; - public static final String LOGIN_SOUTH_PANEL_CLASS = "login-south-panel"; - public static final String LOGIN_WEST_PANEL_CLASS = "login-west-panel"; - public static final String LOGIN_EAST_PANEL_CLASS = "login-east-panel"; - - public static final String LOGIN_TOP_PANEL_ZUL = "/login-top.zul"; - public static final String LOGIN_BOTTOM_PANEL_ZUL = "/login-bottom.zul"; - public static final String LOGIN_LEFT_PANEL_ZUL = "/login-left.zul"; - public static final String LOGIN_RIGHT_PANEL_ZUL = "/login-right.zul"; - //logo public static final String LOGIN_LOGO_IMAGE = "/images/login-logo.png"; public static final String HEADER_LOGO_IMAGE = "/images/header-logo.png"; @@ -60,4 +49,7 @@ public interface ITheme { //stylesheet url public static final String THEME_STYLESHEET = "/css/theme.css.dsp"; public static final String THEME_STYLESHEET_BY_BROWSER = "/css/theme*.css.dsp*"; + + //theme preference + public static final String THEME_PREFERENCE = "/preference.zul"; } diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/theme/ThemeManager.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/theme/ThemeManager.java index e9adc95ad6..638305c078 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/theme/ThemeManager.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/theme/ThemeManager.java @@ -67,6 +67,13 @@ public final class ThemeManager { return ITheme.THEME_PATH_PREFIX + getTheme() + ITheme.THEME_STYLESHEET_BY_BROWSER; } + /** + * @return url of theme preference page + */ + public static String getPreference() { + return ITheme.THEME_PATH_PREFIX + getTheme() + ITheme.THEME_PREFERENCE; + } + /** * @return title text for the browser window */ @@ -74,38 +81,6 @@ public final class ThemeManager { return MSysConfig.getValue(MSysConfig.ZK_BROWSER_TITLE, AdempiereWebUI.APP_NAME); } - /** - * @return url for right panel - */ - public static String getLoginRightPanel() { - String theme = getTheme(); - return ITheme.THEME_PATH_PREFIX + theme + ITheme.LOGIN_RIGHT_PANEL_ZUL; - } - - /** - * @return url for left panel - */ - public static String getLoginLeftPanel() { - String theme = getTheme(); - return ITheme.THEME_PATH_PREFIX + theme + ITheme.LOGIN_LEFT_PANEL_ZUL; - } - - /** - * @return url for top panel - */ - public static String getLoginTopPanel() { - String theme = getTheme(); - return ITheme.THEME_PATH_PREFIX + theme + ITheme.LOGIN_TOP_PANEL_ZUL; - } - - /** - * @return url for bottom panel - */ - public static String getLoginBottomPanel() { - String theme = getTheme(); - return ITheme.THEME_PATH_PREFIX + theme + ITheme.LOGIN_BOTTOM_PANEL_ZUL; - } - /** * @return url for browser icon */ diff --git a/org.adempiere.ui.zk/index.zul b/org.adempiere.ui.zk/index.zul index 3a64e8f146..e1bf5baf6a 100644 --- a/org.adempiere.ui.zk/index.zul +++ b/org.adempiere.ui.zk/index.zul @@ -11,5 +11,6 @@ Copyright (C) 2007 Ashley G Ramdass. + - \ No newline at end of file + diff --git a/org.adempiere.ui.zk/theme.zs b/org.adempiere.ui.zk/theme.zs index b662b03e05..d12e7895bc 100644 --- a/org.adempiere.ui.zk/theme.zs +++ b/org.adempiere.ui.zk/theme.zs @@ -2,3 +2,4 @@ import org.adempiere.webui.theme.ThemeManager; var themeStyleSheet = ThemeManager.getStyleSheet(); var themeStyleSheetByBrowser = ThemeManager.getStyleSheetByBrowser(); var browserIcon = ThemeManager.getBrowserIcon(); +var themePreference = ThemeManager.getPreference(); diff --git a/org.adempiere.ui.zk/theme/default/preference.zul b/org.adempiere.ui.zk/theme/default/preference.zul new file mode 100644 index 0000000000..d38e83039a --- /dev/null +++ b/org.adempiere.ui.zk/theme/default/preference.zul @@ -0,0 +1,15 @@ + + + + + + +