Revert revision 4757 - integrate again changes of revisions:

4434 - [ 1884762 ] FR - Make main logo and link for Home configurable
4438 - Deploy Adempiere ZK webUI by default
With the agreement of Posterita team
https://sourceforge.net/forum/message.php?msg_id=4820393
This commit is contained in:
Carlos Ruiz 2008-03-07 00:54:09 +00:00
parent ab1ca3e4d5
commit 5916c3a3e3
7 changed files with 40 additions and 16 deletions

View File

@ -43,7 +43,7 @@ public class AdempiereWebUI extends Window implements EventListener
{ {
private static final long serialVersionUID = 1L; 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"; 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.MClient;
import org.compiere.model.MMenu; import org.compiere.model.MMenu;
import org.compiere.model.MQuery; import org.compiere.model.MQuery;
import org.compiere.model.MSysConfig;
import org.compiere.util.CCache; import org.compiere.util.CCache;
import org.compiere.util.CLogger; import org.compiere.util.CLogger;
import org.compiere.util.Env; import org.compiere.util.Env;
@ -51,9 +52,9 @@ import org.zkoss.zul.Iframe;
*/ */
public class Desktop extends Window implements MenuListener public class Desktop extends Window implements MenuListener
{ {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 9056511175189603883L;
private static final CLogger logger = CLogger.getCLogger(Desktop.class); private static final CLogger logger = CLogger.getCLogger(Desktop.class);
private HeaderPanel pnlHead; private HeaderPanel pnlHead;
@ -96,7 +97,8 @@ public class Desktop extends Window implements MenuListener
hbox.appendChild(pnlSide); hbox.appendChild(pnlSide);
hbox.appendChild(pnlMain); 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(pnlHead);
verticalBox.appendChild(hbox); 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 * @return website url
*/ */
private String getClientWebsiteURL() private String getClientWebsiteURL()

View File

@ -19,6 +19,7 @@ package org.adempiere.webui.panel;
import org.adempiere.webui.component.Panel; import org.adempiere.webui.component.Panel;
import org.adempiere.webui.session.SessionManager; import org.adempiere.webui.session.SessionManager;
import org.compiere.model.MSysConfig;
import org.zkoss.zk.ui.event.Event; import org.zkoss.zk.ui.event.Event;
import org.zkoss.zk.ui.event.EventListener; import org.zkoss.zk.ui.event.EventListener;
import org.zkoss.zk.ui.event.Events; import org.zkoss.zk.ui.event.Events;
@ -36,7 +37,7 @@ import org.zkoss.zul.Separator;
public class HeaderPanel extends Panel implements EventListener 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 Image image = new Image();
private SideUserPanel pnlSideUser; private SideUserPanel pnlSideUser;
@ -64,8 +65,9 @@ public class HeaderPanel extends Panel implements EventListener
left.setStyle("text-align:center"); left.setStyle("text-align:center");
right.appendChild(pnlSideUser); 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); image.addEventListener(Events.ON_CLICK, this);
left.appendChild(image); left.appendChild(image);
@ -84,7 +86,8 @@ public class HeaderPanel extends Panel implements EventListener
return; return;
if (event.getTarget() == image){ 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

View File

@ -48,4 +48,10 @@
<context-root>/posterita</context-root> <context-root>/posterita</context-root>
</web> </web>
</module> </module>
<module>
<web>
<web-uri>webui.war</web-uri>
<context-root>/webui</context-root>
</web>
</module>
</application> </application>

View File

@ -166,7 +166,18 @@ Start Adempiere via RUN_Adempiere </td>
</td> </td>
<td bgcolor="#fbf8f1"> <td bgcolor="#fbf8f1">
<p><a href="/adempiere">Adempiere Web Application Login (</a><a href="/adempiere/WStart">alternative)</a></p> <p><a href="/webui">Adempiere ZK webUI (beta)</a> - contributed by Posterita</p>
</td>
</tr>
<tr>
<td bgcolor="#e9eef5" valign="top">
<h2><font color="#000000">Web Application</font></h2>
</td>
<td bgcolor="#fbf8f1">
<p><a href="/adempiere">Adempiere old UI HTML (alpha) (</a><a href="/adempiere/WStart">alternative)</a></p>
</td> </td>
</tr> </tr>
@ -250,4 +261,4 @@ Start Adempiere via RUN_Adempiere </td>
<h1>&nbsp;</h1> <h1>&nbsp;</h1>
</body> </body>
</html> </html>

View File

@ -30,6 +30,7 @@
<ant inheritAll="false" dir="webCM"/> <ant inheritAll="false" dir="webCM"/>
<ant inheritAll="false" dir="sqlj"/> <ant inheritAll="false" dir="sqlj"/>
<ant inheritAll="false" dir="posterita"/> <ant inheritAll="false" dir="posterita"/>
<ant inheritAll="false" dir="extension/posterita/webui"/>
</target> </target>
<target name="build" depends="jar"> <target name="build" depends="jar">
<ant inheritAll="false" dir="install"/> <ant inheritAll="false" dir="install"/>
@ -46,10 +47,11 @@
<ant inheritAll="false" dir="serverApps" target="clean"/> <ant inheritAll="false" dir="serverApps" target="clean"/>
<ant inheritAll="false" dir="webStore" target="clean"/> <ant inheritAll="false" dir="webStore" target="clean"/>
<ant inheritAll="false" dir="webCM" target="clean"/> <ant inheritAll="false" dir="webCM" target="clean"/>
<ant inheritAll="false" dir="sqlj" target="clean"/> <ant inheritAll="false" dir="sqlj" target="clean"/>
<ant inheritAll="false" dir="posterita" target="clean"/> <ant inheritAll="false" dir="posterita" target="clean"/>
<ant inheritAll="false" dir="install" target="clean"/> <ant inheritAll="false" dir="install" target="clean"/>
</target> <ant inheritAll="false" dir="extension/posterita/webui" target="clean"/>
</target>
<target name="clean-all" depends="clean"> <target name="clean-all" depends="clean">
<delete dir="${env.ADEMPIERE_ROOT}"/> <delete dir="${env.ADEMPIERE_ROOT}"/>
@ -173,4 +175,4 @@
<!-- ================================================ --> <!-- ================================================ -->
<target name="transfer" depends="complete" description="Transfer to Distribution media"> <target name="transfer" depends="complete" description="Transfer to Distribution media">
</target> </target>
</project> </project>