Search in sources :

Example 6 with MTheme

use of org.compiere.model.MTheme in project adempiere by adempiere.

the class ThemeUtils method getLargeLogo.

/**
	 * @return theme resolved url for the large logo of the current theme
	 */
public static String getLargeLogo() {
    String url = "";
    String currentTheme = Themes.getCurrentTheme();
    MTheme theme = MTheme.get(Env.getCtx(), currentTheme);
    url = theme.getLogo_Large_Image();
    if (url == null || url.length() == 0) {
        url = MSysConfig.getValue("ZK_LOGO_LARGE_IMAGE", DefaultTheme.ZK_LOGO_LARGE_IMAGE);
        // For backwards compatibility
        if (url == null || url.length() == 0) {
            url = MSysConfig.getValue("ZK_LOGO_LARGE", DefaultTheme.ZK_LOGO_LARGE_IMAGE);
        }
    }
    return ServletFns.resolveThemeURL(url);
}
Also used : MTheme(org.compiere.model.MTheme)

Example 7 with MTheme

use of org.compiere.model.MTheme in project adempiere by adempiere.

the class ThemeUtils method getBrowserTitle.

/**
	 * @return theme specific url for the small logo of the current theme
	 */
public static String getBrowserTitle() {
    String title = "";
    String currentTheme = Themes.getCurrentTheme();
    MTheme theme = MTheme.get(Env.getCtx(), currentTheme);
    title = theme.getBrowser_Title();
    if (title == null || title.length() == 0) {
        title = MSysConfig.getValue("ZK_BROWSER_TITLE", DefaultTheme.ZK_BROWSER_TITLE);
    }
    return title;
}
Also used : MTheme(org.compiere.model.MTheme)

Example 8 with MTheme

use of org.compiere.model.MTheme in project adempiere by adempiere.

the class ThemeUtils method getLoginLeftPanel.

/**
	 * @return url for left panel
	 */
public static String getLoginLeftPanel() {
    String url = "";
    String currentTheme = Themes.getCurrentTheme();
    MTheme theme = MTheme.get(Env.getCtx(), currentTheme);
    url = theme.getLogin_Left_Panel_Zul();
    if (url == null || url.length() == 0) {
        url = MSysConfig.getValue("ZK_LOGIN_LEFT_PANEL_ZUL", DefaultTheme.ZK_LOGIN_LEFT_PANEL_ZUL);
    }
    return ServletFns.resolveThemeURL(url);
}
Also used : MTheme(org.compiere.model.MTheme)

Example 9 with MTheme

use of org.compiere.model.MTheme in project adempiere by adempiere.

the class ThemeUtils method getSmallLogo.

/**
	 * @return theme resolved url for the small logo of the current theme
	 */
public static String getSmallLogo() {
    String url = "";
    String currentTheme = Themes.getCurrentTheme();
    MTheme theme = MTheme.get(Env.getCtx(), currentTheme);
    url = theme.getLogo_Small_Image();
    if (url == null || url.length() == 0) {
        url = MSysConfig.getValue("ZK_LOGO_SMALL_IMAGE", DefaultTheme.ZK_LOGO_SMALL_IMAGE);
        // For backwards compatibility
        if (url == null || url.length() == 0) {
            url = MSysConfig.getValue("ZK_LOGO_SMALL", DefaultTheme.ZK_LOGO_SMALL_IMAGE);
            if (url == null || url.length() == 0) {
                url = MSysConfig.getValue("WEBUI_LOGOURL", DefaultTheme.ZK_LOGO_SMALL_IMAGE);
            }
        }
    }
    return ServletFns.resolveThemeURL(url);
}
Also used : MTheme(org.compiere.model.MTheme)

Example 10 with MTheme

use of org.compiere.model.MTheme in project adempiere by adempiere.

the class ThemeUtils method getLoginRightPanel.

/**
	 * @return url for right panel
	 */
public static String getLoginRightPanel() {
    String url = "";
    String currentTheme = Themes.getCurrentTheme();
    MTheme theme = MTheme.get(Env.getCtx(), currentTheme);
    url = theme.getLogin_Right_Panel_Zul();
    if (url == null || url.length() == 0) {
        url = MSysConfig.getValue("ZK_LOGIN_RIGHT_PANEL_ZUL", DefaultTheme.ZK_LOGIN_RIGHT_PANEL_ZUL);
    }
    return ServletFns.resolveThemeURL(url);
}
Also used : MTheme(org.compiere.model.MTheme)

Aggregations

MTheme (org.compiere.model.MTheme)12 ArrayList (java.util.ArrayList)1 Properties (java.util.Properties)1 HttpSession (javax.servlet.http.HttpSession)1 IDesktop (org.adempiere.webui.desktop.IDesktop)1 MSession (org.compiere.model.MSession)1 MUser (org.compiere.model.MUser)1 Language (org.compiere.util.Language)1 Component (org.zkoss.zk.ui.Component)1 Execution (org.zkoss.zk.ui.Execution)1 Page (org.zkoss.zk.ui.Page)1 Session (org.zkoss.zk.ui.Session)1 UiException (org.zkoss.zk.ui.UiException)1 ExecutionCarryOver (org.zkoss.zk.ui.impl.ExecutionCarryOver)1 DesktopCache (org.zkoss.zk.ui.sys.DesktopCache)1 DesktopCtrl (org.zkoss.zk.ui.sys.DesktopCtrl)1 ExecutionCtrl (org.zkoss.zk.ui.sys.ExecutionCtrl)1 SessionCtrl (org.zkoss.zk.ui.sys.SessionCtrl)1 Visualizer (org.zkoss.zk.ui.sys.Visualizer)1