[ 1884762 ] FR - Make main logo and link for Home configurable

This commit is contained in:
Carlos Ruiz 2008-02-04 04:46:09 +00:00
parent b67b5a1268
commit f52ee5b937
4 changed files with 15 additions and 10 deletions

View File

@ -38,7 +38,7 @@ public class AdempiereWebUI extends Window implements EventListener
{
private static final long serialVersionUID = 1L;
public static final String APP_NAME = "Posterita Ajax UI";
public static final String APP_NAME = "Adempiere ZK webUI";
public static final String UID = "0.2";

View File

@ -35,6 +35,7 @@ import org.adempiere.webui.window.ADWindow;
import org.compiere.model.MClient;
import org.compiere.model.MMenu;
import org.compiere.model.MQuery;
import org.compiere.model.MSysConfig;
import org.compiere.util.CCache;
import org.compiere.util.CLogger;
import org.compiere.util.Env;
@ -51,9 +52,9 @@ import org.zkoss.zul.Iframe;
*/
public class Desktop extends Window implements MenuListener
{
private static final long serialVersionUID = 1L;
private static final CLogger logger = CLogger.getCLogger(Desktop.class);
private static final long serialVersionUID = 9056511175189603883L;
private static final CLogger logger = CLogger.getCLogger(Desktop.class);
private HeaderPanel pnlHead;
@ -96,7 +97,8 @@ public class Desktop extends Window implements MenuListener
hbox.appendChild(pnlSide);
hbox.appendChild(pnlMain);
showURL("http://www.posterita.org/", "Home", false);
String homeURL = MSysConfig.getValue("WEBUI_HOMEURL", "http://www.adempiere.com/");
showURL(homeURL, "Home", false);
verticalBox.appendChild(pnlHead);
verticalBox.appendChild(hbox);
@ -109,7 +111,7 @@ public class Desktop extends Window implements MenuListener
}
/**
* Retrives the Client website url
* Retrieves the Client website url
* @return website url
*/
private String getClientWebsiteURL()

View File

@ -19,6 +19,7 @@ package org.adempiere.webui.panel;
import org.adempiere.webui.component.Panel;
import org.adempiere.webui.session.SessionManager;
import org.compiere.model.MSysConfig;
import org.zkoss.zk.ui.event.Event;
import org.zkoss.zk.ui.event.EventListener;
import org.zkoss.zk.ui.event.Events;
@ -36,7 +37,7 @@ import org.zkoss.zul.Separator;
public class HeaderPanel extends Panel implements EventListener
{
private static final long serialVersionUID = 1L;
private static final long serialVersionUID = -4293371180738797244L;
private Image image = new Image();
private SideUserPanel pnlSideUser;
@ -64,8 +65,9 @@ public class HeaderPanel extends Panel implements EventListener
left.setStyle("text-align:center");
right.appendChild(pnlSideUser);
image.setSrc("/images/PosteritaAjaxUILogo.jpg");
String homeURL = MSysConfig.getValue("WEBUI_LOGOURL", "/images/logo_ad.png");
image.setSrc(homeURL);
image.addEventListener(Events.ON_CLICK, this);
left.appendChild(image);
@ -84,7 +86,8 @@ public class HeaderPanel extends Panel implements EventListener
return;
if (event.getTarget() == image){
SessionManager.getAppDesktop().showURL("http://www.posterita.org/", true);
String homeURL = MSysConfig.getValue("WEBUI_HOMEURL", "http://www.adempiere.com/");
SessionManager.getAppDesktop().showURL(homeURL, true);
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.8 KiB