- Implemented basic theme support, added new ZK_THEME key - Added content for www.testadempiere.com - default css move from default.css.dsp to /theme/default/css/theme.css.dsp - load calc.js and layout.js using lang-addon.xml instead - Implemented gradient background for selected window tab ( the vertical tab ) - Fixed combobox look and feel - Vertical tab will take less space now if the label is short, for e.g the tab for sales order window.
|
@ -2,9 +2,9 @@
|
|||
|
||||
<!-- lang.xml
|
||||
Purpose:
|
||||
|
||||
|
||||
Description:
|
||||
|
||||
|
||||
History:
|
||||
Saturday Mar 10 23:43:11 2007, Created by Ashley G Ramdass
|
||||
|
||||
|
@ -12,15 +12,16 @@ Copyright (C) 2007 Ashley G Ramdass (ADempiere WebUI).
|
|||
-->
|
||||
|
||||
<language>
|
||||
|
||||
|
||||
<addon-name>ADempiere WebUI</addon-name>
|
||||
|
||||
|
||||
<language-name>xul/html</language-name>
|
||||
|
||||
|
||||
<version>
|
||||
<version-class>org.adempiere.webui.AdempiereWebUI</version-class>
|
||||
<version-uid>1.0</version-uid>
|
||||
</version>
|
||||
|
||||
<javascript src="/js/calc.js" charset="UTF-8"/>
|
||||
<version-uid>3.5</version-uid>
|
||||
</version>
|
||||
|
||||
<javascript src="/js/calc.js" charset="UTF-8"/>
|
||||
<javascript src="/js/layout.js" charset="UTF-8"/>
|
||||
</language>
|
||||
|
|
|
@ -64,7 +64,7 @@ public class AdempiereWebUI extends Window implements EventListener, IWebClient
|
|||
|
||||
public static final String APP_NAME = "Adempiere";
|
||||
|
||||
public static final String UID = "1.0";
|
||||
public static final String UID = "3.5";
|
||||
|
||||
private WLogin loginDesktop;
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/******************************************************************************
|
||||
* Product: Posterita Ajax UI *
|
||||
* Copyright (C) 2007 Posterita Ltd. All Rights Reserved. *
|
||||
* Copyright (C) 2008 Low Heng Sin *
|
||||
* Copyright (C) 2009 Idalica Corporation *
|
||||
* This program is free software; you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. This program is distributed in the hope *
|
||||
|
@ -10,18 +10,23 @@
|
|||
* You should have received a copy of the GNU General Public License along *
|
||||
* with this program; if not, write to the Free Software Foundation, Inc., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
* For the text or an alternative of this public license, you may reach us *
|
||||
* Posterita Ltd., 3, Draper Avenue, Quatre Bornes, Mauritius *
|
||||
* or via info@posterita.org or http://www.posterita.org/ *
|
||||
*****************************************************************************/
|
||||
|
||||
package org.adempiere.webui;
|
||||
|
||||
import org.adempiere.webui.part.AbstractUIPart;
|
||||
import org.adempiere.webui.theme.ITheme;
|
||||
import org.adempiere.webui.window.LoginWindow;
|
||||
import org.compiere.model.MSysConfig;
|
||||
import org.zkoss.zk.ui.Component;
|
||||
import org.zkoss.zk.ui.Executions;
|
||||
import org.zkoss.zk.ui.metainfo.PageDefinition;
|
||||
import org.zkoss.zkex.zul.Borderlayout;
|
||||
import org.zkoss.zkex.zul.Center;
|
||||
import org.zkoss.zkex.zul.East;
|
||||
import org.zkoss.zkex.zul.North;
|
||||
import org.zkoss.zkex.zul.South;
|
||||
import org.zkoss.zkex.zul.West;
|
||||
import org.zkoss.zul.Vbox;
|
||||
|
||||
/**
|
||||
|
@ -33,41 +38,84 @@ import org.zkoss.zul.Vbox;
|
|||
*/
|
||||
public class WLogin extends AbstractUIPart
|
||||
{
|
||||
private IWebClient app;
|
||||
|
||||
private IWebClient app;
|
||||
private Borderlayout layout;
|
||||
|
||||
|
||||
public WLogin(IWebClient app)
|
||||
{
|
||||
this.app = app;
|
||||
}
|
||||
|
||||
|
||||
protected Component doCreatePart(Component parent)
|
||||
{
|
||||
String theme = MSysConfig.getValue(ITheme.ZK_THEME, ITheme.ZK_THEME_DEFAULT);
|
||||
|
||||
layout = new Borderlayout();
|
||||
if (parent != null)
|
||||
layout.setParent(parent);
|
||||
else
|
||||
layout.setPage(page);
|
||||
Center c = new Center();
|
||||
c.setParent(layout);
|
||||
c.setBorder("none");
|
||||
c.setFlex(true);
|
||||
c.setAutoscroll(true);
|
||||
|
||||
LayoutUtils.addSclass(ITheme.LOGIN_WINDOW_CLASS, layout);
|
||||
|
||||
Center center = new Center();
|
||||
center.setParent(layout);
|
||||
center.setBorder("none");
|
||||
center.setFlex(true);
|
||||
center.setAutoscroll(true);
|
||||
center.setStyle("border: none; background-color: transparent;");
|
||||
|
||||
Vbox vb = new Vbox();
|
||||
vb.setParent(c);
|
||||
vb.setParent(center);
|
||||
vb.setHeight("100%");
|
||||
vb.setWidth("100%");
|
||||
vb.setPack("center");
|
||||
vb.setAlign("center");
|
||||
LayoutUtils.addSclass("login", vb);
|
||||
|
||||
vb.setStyle("background-color: transparent;");
|
||||
|
||||
LoginWindow loginWindow = new LoginWindow(app);
|
||||
loginWindow.setParent(vb);
|
||||
|
||||
|
||||
try {
|
||||
String right = ITheme.THEME_PATH_PREFIX + theme + ITheme.LOGIN_RIGHT_PANEL_ZUL;
|
||||
PageDefinition pageDefintion = Executions.getCurrent().getPageDefinition(right);
|
||||
East east = new East();
|
||||
east.setSclass(ITheme.LOGIN_EAST_PANEL_CLASS);
|
||||
addContent(east, pageDefintion);
|
||||
} catch (Exception e) {}
|
||||
|
||||
try {
|
||||
String left = ITheme.THEME_PATH_PREFIX + theme + ITheme.LOGIN_LEFT_PANEL_ZUL;
|
||||
PageDefinition pageDefintion = Executions.getCurrent().getPageDefinition(left);
|
||||
West west = new West();
|
||||
west.setSclass(ITheme.LOGIN_WEST_PANEL_CLASS);
|
||||
addContent(west, pageDefintion);
|
||||
} catch (Exception e){}
|
||||
|
||||
try {
|
||||
String top = ITheme.THEME_PATH_PREFIX + theme + ITheme.LOGIN_TOP_PANEL_ZUL;
|
||||
PageDefinition pageDefintion = Executions.getCurrent().getPageDefinition(top);
|
||||
North north = new North();
|
||||
north.setSclass(ITheme.LOGIN_NORTH_PANEL_CLASS);
|
||||
addContent(north, pageDefintion);
|
||||
} catch (Exception e) {}
|
||||
|
||||
try {
|
||||
String bottom = ITheme.THEME_PATH_PREFIX + theme + ITheme.LOGIN_BOTTOM_PANEL_ZUL;
|
||||
PageDefinition pageDefintion = Executions.getCurrent().getPageDefinition(bottom);
|
||||
South south = new South();
|
||||
south.setSclass(ITheme.LOGIN_SOUTH_PANEL_CLASS);
|
||||
addContent(south, pageDefintion);
|
||||
} catch (Exception e) {}
|
||||
|
||||
return layout;
|
||||
}
|
||||
|
||||
private void addContent(Component parent, PageDefinition page) {
|
||||
layout.appendChild(parent);
|
||||
Executions.createComponents(page, parent, null);
|
||||
}
|
||||
|
||||
public void detach() {
|
||||
layout.detach();
|
||||
layout = null;
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
/******************************************************************************
|
||||
* Copyright (C) 2008 Low Heng Sin *
|
||||
* Copyright (C) 2009 Idalica Corporation *
|
||||
* This program is free software; you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. This program is distributed in the hope *
|
||||
|
@ -60,12 +61,14 @@ public class ADButtonTabList extends Panel implements IADTabList, EventListener
|
|||
}
|
||||
|
||||
public synchronized void refresh() {
|
||||
List childs = getChildren();
|
||||
List<?> childs = getChildren();
|
||||
int childCount = childs.size();
|
||||
for (int c = childCount - 1; c >=0; c--) {
|
||||
removeChild((Component) childs.get(c));
|
||||
}
|
||||
Object[] items = listItems.toArray();
|
||||
int tabWidth = 100;
|
||||
List<Button> btnList = new ArrayList<Button>();
|
||||
for (int i = 0; i < items.length; i++) {
|
||||
ADTabLabel tabLabel = (ADTabLabel) items[i];
|
||||
Button button = new Button();
|
||||
|
@ -92,13 +95,29 @@ public class ADButtonTabList extends Panel implements IADTabList, EventListener
|
|||
}
|
||||
|
||||
String style = (tabPlacement == IADTab.LEFT ? "margin-left:" : "margin-right:") + (tabLabel.tabLevel*15+5) + "px";
|
||||
String width = (195 - tabLabel.tabLevel*15)+"px";
|
||||
style = style + "; width:" + width;
|
||||
if (button.isVisible()) {
|
||||
int width = tabLabel.label.length() * 10 + 20;
|
||||
if (width > tabWidth)
|
||||
tabWidth = width;
|
||||
}
|
||||
btnList.add(button);
|
||||
button.setStyle(style);
|
||||
|
||||
button.setParent(this);
|
||||
button.addEventListener(Events.ON_CLICK, this);
|
||||
}
|
||||
|
||||
//set width
|
||||
if (tabWidth > 190)
|
||||
tabWidth = 190;
|
||||
for (int i = 0; i < items.length; i++) {
|
||||
ADTabLabel tabLabel = (ADTabLabel) items[i];
|
||||
Button button = btnList.get(i);
|
||||
if (!button.isVisible())
|
||||
continue;
|
||||
String width = (tabWidth - tabLabel.tabLevel*15)+"px";
|
||||
button.setStyle(button.getStyle() + "; display: block; width:" + width);
|
||||
}
|
||||
}
|
||||
|
||||
public int getSelectedIndex() {
|
||||
|
|
|
@ -13,6 +13,12 @@
|
|||
* For the text or an alternative of this public license, you may reach us *
|
||||
* Posterita Ltd., 3, Draper Avenue, Quatre Bornes, Mauritius *
|
||||
* or via info@posterita.org or http://www.posterita.org/ *
|
||||
* *
|
||||
* Contributors: *
|
||||
* - Heng Sin Low *
|
||||
* *
|
||||
* Sponsors: *
|
||||
* - Idalica Corporation *
|
||||
*****************************************************************************/
|
||||
|
||||
package org.adempiere.webui.panel;
|
||||
|
@ -58,12 +64,8 @@ import org.zkoss.zul.Tab;
|
|||
*/
|
||||
public class ADWindowPanel extends AbstractADWindowPanel
|
||||
{
|
||||
private static final CLogger logger;
|
||||
|
||||
static
|
||||
{
|
||||
logger = CLogger.getCLogger(ADWindowPanel.class);
|
||||
}
|
||||
@SuppressWarnings("unused")
|
||||
private static final CLogger logger = CLogger.getCLogger(ADWindowPanel.class);
|
||||
|
||||
private Borderlayout layout;
|
||||
|
||||
|
@ -125,6 +127,7 @@ public class ADWindowPanel extends AbstractADWindowPanel
|
|||
layout.appendChild(west);
|
||||
west.setSplittable(false);
|
||||
west.setAutoscroll(true);
|
||||
west.setFlex(true);
|
||||
LayoutUtils.addSclass("adwindow-nav adwindow-left-nav", west);
|
||||
adTab.setTabplacement(IADTab.LEFT);
|
||||
adTab.getTabSelectionComponent().setParent(west);
|
||||
|
@ -135,6 +138,7 @@ public class ADWindowPanel extends AbstractADWindowPanel
|
|||
layout.appendChild(east);
|
||||
east.setSplittable(false);
|
||||
east.setAutoscroll(true);
|
||||
east.setFlex(true);
|
||||
LayoutUtils.addSclass("adwindow-nav adwindow-right-nav", east);
|
||||
adTab.setTabplacement(IADTab.RIGHT);
|
||||
adTab.getTabSelectionComponent().setParent(east);
|
||||
|
@ -218,7 +222,7 @@ public class ADWindowPanel extends AbstractADWindowPanel
|
|||
Tabbox tabbox = (Tabbox) tab.getTabbox();
|
||||
if (tabbox.getSelectedTab() == tab) {
|
||||
Tabs tabs = (Tabs) tabbox.getTabs();
|
||||
List childs = tabs.getChildren();
|
||||
List<?> childs = tabs.getChildren();
|
||||
for(int i = 0; i < childs.size(); i++) {
|
||||
if (childs.get(i) == tab) {
|
||||
if (i > 0)
|
||||
|
|
|
@ -19,6 +19,7 @@ package org.adempiere.webui.panel;
|
|||
|
||||
import org.adempiere.webui.LayoutUtils;
|
||||
import org.adempiere.webui.component.Panel;
|
||||
import org.adempiere.webui.theme.ITheme;
|
||||
import org.adempiere.webui.window.AboutWindow;
|
||||
import org.compiere.model.MSysConfig;
|
||||
import org.zkoss.zk.ui.event.Event;
|
||||
|
@ -57,9 +58,12 @@ public class HeaderPanel extends Panel implements EventListener
|
|||
|
||||
UserPanel userPanel = new UserPanel();
|
||||
|
||||
String logoURL = MSysConfig.getValue("ZK_LOGO_SMALL", null);
|
||||
String logoURL = MSysConfig.getValue("WEBUI_LOGOURL", null);
|
||||
if (logoURL == null || logoURL.trim().length() == 0)
|
||||
logoURL = MSysConfig.getValue("WEBUI_LOGOURL", "/images/AD10030.png");
|
||||
{
|
||||
String theme = MSysConfig.getValue(ITheme.ZK_THEME, ITheme.ZK_THEME_DEFAULT);
|
||||
logoURL = ITheme.THEME_PATH_PREFIX + theme + ITheme.HEADER_LOGO_IMAGE;
|
||||
}
|
||||
image.setSrc(logoURL);
|
||||
image.addEventListener(Events.ON_CLICK, this);
|
||||
image.setStyle("cursor: pointer;");
|
||||
|
|
|
@ -13,6 +13,12 @@
|
|||
* For the text or an alternative of this public license, you may reach us *
|
||||
* Posterita Ltd., 3, Draper Avenue, Quatre Bornes, Mauritius *
|
||||
* or via info@posterita.org or http://www.posterita.org/ *
|
||||
* *
|
||||
* Contributors: *
|
||||
* - Heng Sin Low *
|
||||
* *
|
||||
* Sponsors: *
|
||||
* - Idalica Corporation *
|
||||
*****************************************************************************/
|
||||
|
||||
package org.adempiere.webui.panel;
|
||||
|
@ -20,15 +26,15 @@ package org.adempiere.webui.panel;
|
|||
import java.util.Properties;
|
||||
import java.util.ResourceBundle;
|
||||
|
||||
import org.adempiere.webui.LayoutUtils;
|
||||
import org.adempiere.webui.apps.AEnv;
|
||||
import org.adempiere.webui.component.Combobox;
|
||||
import org.adempiere.webui.component.ConfirmPanel;
|
||||
import org.adempiere.webui.component.Grid;
|
||||
import org.adempiere.webui.component.Label;
|
||||
import org.adempiere.webui.component.Row;
|
||||
import org.adempiere.webui.component.Rows;
|
||||
import org.adempiere.webui.component.Textbox;
|
||||
import org.adempiere.webui.component.Window;
|
||||
import org.adempiere.webui.session.SessionManager;
|
||||
import org.adempiere.webui.theme.ITheme;
|
||||
import org.adempiere.webui.util.UserPreference;
|
||||
import org.adempiere.webui.window.LoginWindow;
|
||||
import org.compiere.model.MSysConfig;
|
||||
|
@ -38,6 +44,10 @@ import org.compiere.util.KeyNamePair;
|
|||
import org.compiere.util.Language;
|
||||
import org.compiere.util.Login;
|
||||
import org.zkoss.util.Locales;
|
||||
import org.zkoss.zhtml.Div;
|
||||
import org.zkoss.zhtml.Table;
|
||||
import org.zkoss.zhtml.Td;
|
||||
import org.zkoss.zhtml.Tr;
|
||||
import org.zkoss.zk.au.out.AuFocus;
|
||||
import org.zkoss.zk.ui.Component;
|
||||
import org.zkoss.zk.ui.WrongValueException;
|
||||
|
@ -45,9 +55,8 @@ import org.zkoss.zk.ui.event.Event;
|
|||
import org.zkoss.zk.ui.event.EventListener;
|
||||
import org.zkoss.zk.ui.event.Events;
|
||||
import org.zkoss.zk.ui.util.Clients;
|
||||
import org.zkoss.zul.Comboitem;
|
||||
import org.zkoss.zul.Image;
|
||||
import org.zkoss.zul.Listbox;
|
||||
import org.zkoss.zul.Listitem;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -59,7 +68,7 @@ import org.zkoss.zul.Listitem;
|
|||
*/
|
||||
public class LoginPanel extends Window implements EventListener
|
||||
{
|
||||
/**
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = -5823771596520748214L;
|
||||
|
@ -72,9 +81,7 @@ public class LoginPanel extends Window implements EventListener
|
|||
private Label lblLanguage;
|
||||
private Textbox txtUserId;
|
||||
private Textbox txtPassword;
|
||||
private Listbox lstLanguage;
|
||||
/* private Button btnOk;
|
||||
private Button btnCancel;*/
|
||||
private Combobox lstLanguage;
|
||||
private LoginWindow wndLogin;
|
||||
|
||||
public LoginPanel(Properties ctx, LoginWindow loginWindow)
|
||||
|
@ -91,44 +98,78 @@ public class LoginPanel extends Window implements EventListener
|
|||
|
||||
private void init()
|
||||
{
|
||||
Grid grid = new Grid();
|
||||
grid.setOddRowSclass("even");
|
||||
grid.setId("grdLogin");
|
||||
Rows rows = new Rows();
|
||||
Row logo = new Row();
|
||||
logo.setSpans("2");
|
||||
Image image = new Image();
|
||||
image.setSrc(MSysConfig.getValue("ZK_LOGO_LARGE", "images/logo.png"));
|
||||
logo.appendChild(image);
|
||||
Row rowUser = new Row();
|
||||
rowUser.setId("rowUser");
|
||||
Row rowPassword = new Row();
|
||||
rowPassword.setId("rowPassword");
|
||||
Row rowLanguage = new Row();
|
||||
rowLanguage.setId("rowLanguage");
|
||||
String theme = MSysConfig.getValue(ITheme.ZK_THEME, ITheme.ZK_THEME_DEFAULT);
|
||||
|
||||
rowUser.appendChild(lblUserId.rightAlign());
|
||||
rowUser.appendChild(txtUserId);
|
||||
Div div = new Div();
|
||||
div.setSclass(ITheme.LOGIN_BOX_HEADER_CLASS);
|
||||
Label label = new Label("Login");
|
||||
label.setSclass(ITheme.LOGIN_BOX_HEADER_TXT_CLASS);
|
||||
div.appendChild(label);
|
||||
this.appendChild(div);
|
||||
|
||||
rowPassword.appendChild(lblPassword.rightAlign());
|
||||
rowPassword.appendChild(txtPassword);
|
||||
Table table = new Table();
|
||||
table.setId("grdLogin");
|
||||
table.setDynamicProperty("cellpadding", "0");
|
||||
table.setDynamicProperty("cellspacing", "5");
|
||||
table.setSclass(ITheme.LOGIN_BOX_BODY_CLASS);
|
||||
|
||||
rowLanguage.appendChild(lblLanguage.rightAlign());
|
||||
rowLanguage.appendChild(lstLanguage);
|
||||
this.appendChild(table);
|
||||
|
||||
Row rowButtons = new Row();
|
||||
rowButtons.setSpans("2");
|
||||
Tr tr = new Tr();
|
||||
table.appendChild(tr);
|
||||
Td td = new Td();
|
||||
td.setSclass(ITheme.LOGIN_BOX_HEADER_LOGO_CLASS);
|
||||
tr.appendChild(td);
|
||||
td.setDynamicProperty("colspan", "2");
|
||||
Image image = new Image();
|
||||
image.setSrc(ITheme.THEME_PATH_PREFIX+theme+ITheme.LOGIN_LOGO_IMAGE);
|
||||
td.appendChild(image);
|
||||
|
||||
tr = new Tr();
|
||||
tr.setId("rowUser");
|
||||
table.appendChild(tr);
|
||||
td = new Td();
|
||||
tr.appendChild(td);
|
||||
td.setSclass(ITheme.LOGIN_LABEL_CLASS);
|
||||
td.appendChild(lblUserId);
|
||||
td = new Td();
|
||||
td.setSclass(ITheme.LOGIN_FIELD_CLASS);
|
||||
tr.appendChild(td);
|
||||
td.appendChild(txtUserId);
|
||||
|
||||
tr = new Tr();
|
||||
tr.setId("rowPassword");
|
||||
table.appendChild(tr);
|
||||
td = new Td();
|
||||
tr.appendChild(td);
|
||||
td.setSclass(ITheme.LOGIN_LABEL_CLASS);
|
||||
td.appendChild(lblPassword);
|
||||
td = new Td();
|
||||
td.setSclass(ITheme.LOGIN_FIELD_CLASS);
|
||||
tr.appendChild(td);
|
||||
td.appendChild(txtPassword);
|
||||
|
||||
tr = new Tr();
|
||||
tr.setId("rowLanguage");
|
||||
table.appendChild(tr);
|
||||
td = new Td();
|
||||
tr.appendChild(td);
|
||||
td.setSclass(ITheme.LOGIN_LABEL_CLASS);
|
||||
td.appendChild(lblLanguage);
|
||||
td = new Td();
|
||||
td.setSclass(ITheme.LOGIN_FIELD_CLASS);
|
||||
tr.appendChild(td);
|
||||
td.appendChild(lstLanguage);
|
||||
|
||||
div = new Div();
|
||||
div.setSclass(ITheme.LOGIN_BOX_FOOTER_CLASS);
|
||||
ConfirmPanel pnlButtons = new ConfirmPanel(false);
|
||||
pnlButtons.addActionListener(this);
|
||||
rowButtons.appendChild(pnlButtons);
|
||||
|
||||
rows.appendChild(logo);
|
||||
rows.appendChild(rowUser);
|
||||
rows.appendChild(rowPassword);
|
||||
rows.appendChild(rowLanguage);
|
||||
rows.appendChild(rowButtons);
|
||||
grid.appendChild(rows);
|
||||
this.appendChild(grid);
|
||||
LayoutUtils.addSclass(ITheme.LOGIN_BOX_FOOTER_PANEL_CLASS, pnlButtons);
|
||||
pnlButtons.setWidth(null);
|
||||
pnlButtons.getButton(ConfirmPanel.A_OK).setSclass(ITheme.LOGIN_BUTTON_CLASS);
|
||||
div.appendChild(pnlButtons);
|
||||
this.appendChild(div);
|
||||
}
|
||||
|
||||
private void initComponents()
|
||||
|
@ -159,10 +200,10 @@ public class LoginPanel extends Window implements EventListener
|
|||
txtPassword.setMaxlength(40);
|
||||
txtPassword.setWidth("220px");
|
||||
|
||||
lstLanguage = new Listbox();
|
||||
lstLanguage = new Combobox();
|
||||
lstLanguage.setAutocomplete(true);
|
||||
lstLanguage.setAutodrop(true);
|
||||
lstLanguage.setId("lstLanguage");
|
||||
lstLanguage.setRows(1);
|
||||
lstLanguage.setMold("select");
|
||||
lstLanguage.addEventListener(Events.ON_SELECT, this);
|
||||
lstLanguage.setWidth("220px");
|
||||
|
||||
|
@ -206,7 +247,7 @@ public class LoginPanel extends Window implements EventListener
|
|||
String initDefault = userPreference.getProperty(UserPreference.P_LANGUAGE);
|
||||
for(int i = 0; i < lstLanguage.getItemCount(); i++)
|
||||
{
|
||||
Listitem li = lstLanguage.getItemAtIndex(i);
|
||||
Comboitem li = lstLanguage.getItemAtIndex(i);
|
||||
if(li.getLabel().equals(initDefault))
|
||||
{
|
||||
lstLanguage.setSelectedIndex(i);
|
||||
|
|
|
@ -13,6 +13,12 @@
|
|||
* For the text or an alternative of this public license, you may reach us *
|
||||
* Posterita Ltd., 3, Draper Avenue, Quatre Bornes, Mauritius *
|
||||
* or via info@posterita.org or http://www.posterita.org/ *
|
||||
* *
|
||||
* Contributors: *
|
||||
* - Heng Sin Low *
|
||||
* *
|
||||
* Sponsors: *
|
||||
* - Idalica Corporation *
|
||||
*****************************************************************************/
|
||||
|
||||
package org.adempiere.webui.panel;
|
||||
|
@ -20,11 +26,15 @@ package org.adempiere.webui.panel;
|
|||
import java.util.Properties;
|
||||
import java.util.ResourceBundle;
|
||||
|
||||
import org.adempiere.webui.LayoutUtils;
|
||||
import org.adempiere.webui.component.ComboItem;
|
||||
import org.adempiere.webui.component.Combobox;
|
||||
import org.adempiere.webui.component.ConfirmPanel;
|
||||
import org.adempiere.webui.component.Label;
|
||||
import org.adempiere.webui.component.Window;
|
||||
import org.adempiere.webui.exception.ApplicationException;
|
||||
import org.adempiere.webui.session.SessionManager;
|
||||
import org.adempiere.webui.theme.ITheme;
|
||||
import org.adempiere.webui.util.UserPreference;
|
||||
import org.adempiere.webui.window.LoginWindow;
|
||||
import org.compiere.db.CConnection;
|
||||
|
@ -34,19 +44,21 @@ import org.compiere.util.Env;
|
|||
import org.compiere.util.KeyNamePair;
|
||||
import org.compiere.util.Language;
|
||||
import org.compiere.util.Login;
|
||||
import org.compiere.util.Msg;
|
||||
import org.zkoss.zhtml.Table;
|
||||
import org.zkoss.zhtml.Td;
|
||||
import org.zkoss.zhtml.Tr;
|
||||
import org.zkoss.zk.au.out.AuFocus;
|
||||
import org.zkoss.zk.ui.WrongValueException;
|
||||
import org.zkoss.zk.ui.event.Deferrable;
|
||||
import org.zkoss.zk.ui.event.Event;
|
||||
import org.zkoss.zk.ui.event.EventListener;
|
||||
import org.zkoss.zk.ui.event.Events;
|
||||
import org.zkoss.zk.ui.util.Clients;
|
||||
import org.zkoss.zul.Button;
|
||||
import org.zkoss.zul.Comboitem;
|
||||
import org.zkoss.zul.Div;
|
||||
import org.zkoss.zul.Grid;
|
||||
import org.zkoss.zul.Image;
|
||||
import org.zkoss.zul.Listbox;
|
||||
import org.zkoss.zul.Listitem;
|
||||
import org.zkoss.zul.Row;
|
||||
import org.zkoss.zul.Rows;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -56,7 +68,7 @@ import org.zkoss.zul.Rows;
|
|||
* @author <a href="mailto:sendy.yagambrum@posterita.org">Sendy Yagambrum</a>
|
||||
* @date July 18, 2007
|
||||
*/
|
||||
public class RolePanel extends Window implements EventListener
|
||||
public class RolePanel extends Window implements EventListener, Deferrable
|
||||
{
|
||||
/**
|
||||
*
|
||||
|
@ -69,12 +81,10 @@ public class RolePanel extends Window implements EventListener
|
|||
private Login login;
|
||||
private KeyNamePair rolesKNPairs[];
|
||||
|
||||
private Label lblErrorMsg;
|
||||
private Listbox lstRole, lstClient, lstOrganisation, lstWarehouse;
|
||||
private Combobox lstRole, lstClient, lstOrganisation, lstWarehouse;
|
||||
private Label lblRole, lblClient, lblOrganisation, lblWarehouse;
|
||||
private Button btnOk, btnCancel;
|
||||
|
||||
|
||||
public RolePanel(Properties ctx, LoginWindow loginWindow, String userName, String password)
|
||||
{
|
||||
this.wndLogin = loginWindow;
|
||||
|
@ -96,53 +106,91 @@ public class RolePanel extends Window implements EventListener
|
|||
|
||||
private void init()
|
||||
{
|
||||
Grid grid = new Grid();
|
||||
grid.setId("grdChooseRole");
|
||||
grid.setOddRowSclass("even");
|
||||
Rows rows = new Rows();
|
||||
String theme = MSysConfig.getValue(ITheme.ZK_THEME, ITheme.ZK_THEME_DEFAULT);
|
||||
|
||||
Row logo = new Row();
|
||||
logo.setSpans("2");
|
||||
Image image = new Image();
|
||||
image.setSrc(MSysConfig.getValue("ZK_LOGO_LARGE", "images/logo.png"));
|
||||
logo.appendChild(image);
|
||||
Div div = new Div();
|
||||
div.setSclass(ITheme.LOGIN_BOX_HEADER_CLASS);
|
||||
Label label = new Label("Login");
|
||||
label.setSclass(ITheme.LOGIN_BOX_HEADER_TXT_CLASS);
|
||||
div.appendChild(label);
|
||||
this.appendChild(div);
|
||||
|
||||
Row rowRole = new Row();
|
||||
Row rowClient = new Row();
|
||||
Row rowOrg = new Row();
|
||||
Row rowWarehouse = new Row();
|
||||
Table table = new Table();
|
||||
table.setId("grdChooseRole");
|
||||
table.setDynamicProperty("cellpadding", "0");
|
||||
table.setDynamicProperty("cellspacing", "5");
|
||||
table.setSclass(ITheme.LOGIN_BOX_BODY_CLASS);
|
||||
|
||||
rowRole.appendChild(lblRole.rightAlign());
|
||||
rowRole.appendChild(lstRole);
|
||||
this.appendChild(table);
|
||||
|
||||
rowClient.appendChild(lblClient.rightAlign());
|
||||
rowClient.appendChild(lstClient);
|
||||
Tr tr = new Tr();
|
||||
table.appendChild(tr);
|
||||
Td td = new Td();
|
||||
td.setSclass(ITheme.LOGIN_BOX_HEADER_LOGO_CLASS);
|
||||
tr.appendChild(td);
|
||||
td.setDynamicProperty("colspan", "2");
|
||||
Image image = new Image();
|
||||
image.setSrc(ITheme.THEME_PATH_PREFIX+theme+ITheme.LOGIN_LOGO_IMAGE);
|
||||
td.appendChild(image);
|
||||
|
||||
rowOrg.appendChild(lblOrganisation.rightAlign());
|
||||
rowOrg.appendChild(lstOrganisation);
|
||||
tr = new Tr();
|
||||
tr.setId("rowRole");
|
||||
table.appendChild(tr);
|
||||
td = new Td();
|
||||
tr.appendChild(td);
|
||||
td.setSclass(ITheme.LOGIN_LABEL_CLASS);
|
||||
td.appendChild(lblRole.rightAlign());
|
||||
td = new Td();
|
||||
td.setSclass(ITheme.LOGIN_FIELD_CLASS);
|
||||
tr.appendChild(td);
|
||||
td.appendChild(lstRole);
|
||||
|
||||
rowWarehouse.appendChild(lblWarehouse.rightAlign());
|
||||
rowWarehouse.appendChild(lstWarehouse);
|
||||
tr = new Tr();
|
||||
tr.setId("rowclient");
|
||||
table.appendChild(tr);
|
||||
td = new Td();
|
||||
tr.appendChild(td);
|
||||
td.setSclass(ITheme.LOGIN_LABEL_CLASS);
|
||||
td.appendChild(lblClient.rightAlign());
|
||||
td = new Td();
|
||||
td.setSclass(ITheme.LOGIN_FIELD_CLASS);
|
||||
tr.appendChild(td);
|
||||
td.appendChild(lstClient);
|
||||
|
||||
Row rowButtons = new Row();
|
||||
tr = new Tr();
|
||||
tr.setId("rowOrganisation");
|
||||
table.appendChild(tr);
|
||||
td = new Td();
|
||||
tr.appendChild(td);
|
||||
td.setSclass(ITheme.LOGIN_LABEL_CLASS);
|
||||
td.appendChild(lblOrganisation.rightAlign());
|
||||
td = new Td();
|
||||
td.setSclass(ITheme.LOGIN_FIELD_CLASS);
|
||||
tr.appendChild(td);
|
||||
td.appendChild(lstOrganisation);
|
||||
|
||||
tr = new Tr();
|
||||
tr.setId("rowWarehouse");
|
||||
table.appendChild(tr);
|
||||
td = new Td();
|
||||
tr.appendChild(td);
|
||||
td.setSclass(ITheme.LOGIN_LABEL_CLASS);
|
||||
td.appendChild(lblWarehouse.rightAlign());
|
||||
td = new Td();
|
||||
td.setSclass(ITheme.LOGIN_FIELD_CLASS);
|
||||
tr.appendChild(td);
|
||||
td.appendChild(lstWarehouse);
|
||||
|
||||
div = new Div();
|
||||
div.setSclass(ITheme.LOGIN_BOX_FOOTER_CLASS);
|
||||
ConfirmPanel pnlButtons = new ConfirmPanel(true);
|
||||
pnlButtons.addActionListener(this);
|
||||
rowButtons.setSpans("2");
|
||||
rowButtons.appendChild(pnlButtons);
|
||||
|
||||
rows.appendChild(logo);
|
||||
rows.appendChild(rowRole);
|
||||
rows.appendChild(rowClient);
|
||||
rows.appendChild(rowOrg);
|
||||
rows.appendChild(rowWarehouse);
|
||||
rows.appendChild(rowButtons);
|
||||
|
||||
grid.appendChild(rows);
|
||||
|
||||
Div divErr = new Div();
|
||||
divErr.appendChild(lblErrorMsg);
|
||||
this.appendChild(divErr);
|
||||
this.appendChild(grid);
|
||||
LayoutUtils.addSclass(ITheme.LOGIN_BOX_FOOTER_PANEL_CLASS, pnlButtons);
|
||||
pnlButtons.setWidth(null);
|
||||
pnlButtons.getButton(ConfirmPanel.A_OK).setSclass(ITheme.LOGIN_BUTTON_CLASS);
|
||||
pnlButtons.getButton(ConfirmPanel.A_CANCEL).setSclass(ITheme.LOGIN_BUTTON_CLASS);
|
||||
div.appendChild(pnlButtons);
|
||||
this.appendChild(div);
|
||||
}
|
||||
|
||||
private void initComponents()
|
||||
|
@ -151,9 +199,6 @@ public class RolePanel extends Window implements EventListener
|
|||
|
||||
ResourceBundle res = ResourceBundle.getBundle(RESOURCE, language.getLocale());
|
||||
|
||||
lblErrorMsg = new Label();
|
||||
lblErrorMsg.setValue(" ");
|
||||
|
||||
lblRole = new Label();
|
||||
lblRole.setId("lblRole");
|
||||
lblRole.setValue(res.getString("Role"));
|
||||
|
@ -170,31 +215,31 @@ public class RolePanel extends Window implements EventListener
|
|||
lblWarehouse.setId("lblWarehouse");
|
||||
lblWarehouse.setValue(res.getString("Warehouse"));
|
||||
|
||||
lstRole = new Listbox();
|
||||
lstRole = new Combobox();
|
||||
lstRole.setAutocomplete(true);
|
||||
lstRole.setAutodrop(true);
|
||||
lstRole.setId("lstRole");
|
||||
lstRole.setRows(1);
|
||||
lstRole.setMold("select");
|
||||
lstRole.addEventListener(Events.ON_SELECT, this);
|
||||
lstRole.setWidth("220px");
|
||||
|
||||
lstClient = new Listbox();
|
||||
lstClient = new Combobox();
|
||||
lstClient.setAutocomplete(true);
|
||||
lstClient.setAutodrop(true);
|
||||
lstClient.setId("lstClient");
|
||||
lstClient.setRows(1);
|
||||
lstClient.setMold("select");
|
||||
lstClient.addEventListener(Events.ON_SELECT, this);
|
||||
lstClient.setWidth("220px");
|
||||
|
||||
lstOrganisation = new Listbox();
|
||||
lstOrganisation = new Combobox();
|
||||
lstOrganisation.setAutocomplete(true);
|
||||
lstOrganisation.setAutodrop(true);
|
||||
lstOrganisation.setId("lstOrganisation");
|
||||
lstOrganisation.setRows(1);
|
||||
lstOrganisation.setMold("select");
|
||||
lstOrganisation.addEventListener(Events.ON_SELECT, this);
|
||||
lstOrganisation.setWidth("220px");
|
||||
|
||||
lstWarehouse = new Listbox();
|
||||
lstWarehouse = new Combobox();
|
||||
lstWarehouse.setAutocomplete(true);
|
||||
lstWarehouse.setAutodrop(true);
|
||||
lstWarehouse.setId("lstWarehouse");
|
||||
lstWarehouse.setRows(1);
|
||||
lstWarehouse.setMold("select");
|
||||
lstWarehouse.addEventListener(Events.ON_SELECT, this);
|
||||
lstWarehouse.setWidth("220px");
|
||||
|
||||
|
@ -213,11 +258,12 @@ public class RolePanel extends Window implements EventListener
|
|||
String initDefault = userPreference.getProperty(UserPreference.P_ROLE);
|
||||
for(int i = 0; i < rolesKNPairs.length; i++)
|
||||
{
|
||||
Listitem li = lstRole.appendItem(rolesKNPairs[i].getName(), rolesKNPairs[i].getID());
|
||||
ComboItem ci = new ComboItem(rolesKNPairs[i].getName(), rolesKNPairs[i].getID());
|
||||
lstRole.appendChild(ci);
|
||||
if(rolesKNPairs[i].getID().equals(initDefault))
|
||||
lstRole.setSelectedItem(li);
|
||||
lstRole.setSelectedItem(ci);
|
||||
}
|
||||
if (lstRole.getSelectedIndex() == -1)
|
||||
if (lstRole.getSelectedIndex() == -1 && lstRole.getItemCount() > 0)
|
||||
lstRole.setSelectedIndex(0);
|
||||
//
|
||||
updateClientList();
|
||||
|
@ -226,7 +272,7 @@ public class RolePanel extends Window implements EventListener
|
|||
private void updateClientList()
|
||||
{
|
||||
lstClient.getItems().clear();
|
||||
Listitem lstItemRole = lstRole.getSelectedItem();
|
||||
Comboitem lstItemRole = lstRole.getSelectedItem();
|
||||
if(lstItemRole != null)
|
||||
{
|
||||
// initial client - Elaine 2009/02/06
|
||||
|
@ -238,11 +284,12 @@ public class RolePanel extends Window implements EventListener
|
|||
{
|
||||
for(int i = 0; i < clientKNPairs.length; i++)
|
||||
{
|
||||
Listitem li = lstClient.appendItem(clientKNPairs[i].getName(), clientKNPairs[i].getID());
|
||||
ComboItem ci = new ComboItem(clientKNPairs[i].getName(), clientKNPairs[i].getID());
|
||||
lstClient.appendChild(ci);
|
||||
if(clientKNPairs[i].getID().equals(initDefault))
|
||||
lstClient.setSelectedItem(li);
|
||||
lstClient.setSelectedItem(ci);
|
||||
}
|
||||
if (lstClient.getSelectedIndex() == -1)
|
||||
if (lstClient.getSelectedIndex() == -1 && lstClient.getItemCount() > 0)
|
||||
lstClient.setSelectedIndex(0);
|
||||
}
|
||||
//
|
||||
|
@ -256,7 +303,8 @@ public class RolePanel extends Window implements EventListener
|
|||
private void updateOrganisationList()
|
||||
{
|
||||
lstOrganisation.getItems().clear();
|
||||
Listitem lstItemClient = lstClient.getSelectedItem();
|
||||
lstOrganisation.setText("");
|
||||
Comboitem lstItemClient = lstClient.getSelectedItem();
|
||||
if(lstItemClient != null)
|
||||
{
|
||||
// initial organisation - Elaine 2009/02/06
|
||||
|
@ -268,11 +316,13 @@ public class RolePanel extends Window implements EventListener
|
|||
{
|
||||
for(int i = 0; i < orgKNPairs.length; i++)
|
||||
{
|
||||
Listitem li = lstOrganisation.appendItem(orgKNPairs[i].getName(), orgKNPairs[i].getID());
|
||||
ComboItem ci = new ComboItem(orgKNPairs[i].getName(), orgKNPairs[i].getID());
|
||||
lstOrganisation.appendChild(ci);
|
||||
if(orgKNPairs[i].getID().equals(initDefault))
|
||||
lstOrganisation.setSelectedItem(li);
|
||||
lstOrganisation.setSelectedItem(ci);
|
||||
|
||||
}
|
||||
if (lstOrganisation.getSelectedIndex() == -1)
|
||||
if (lstOrganisation.getSelectedIndex() == -1 && lstOrganisation.getItemCount() > 0)
|
||||
lstOrganisation.setSelectedIndex(0);
|
||||
}
|
||||
//
|
||||
|
@ -283,7 +333,8 @@ public class RolePanel extends Window implements EventListener
|
|||
private void updateWarehouseList()
|
||||
{
|
||||
lstWarehouse.getItems().clear();
|
||||
Listitem lstItemOrganisation = lstOrganisation.getSelectedItem();
|
||||
lstWarehouse.setText("");
|
||||
Comboitem lstItemOrganisation = lstOrganisation.getSelectedItem();
|
||||
if(lstItemOrganisation != null)
|
||||
{
|
||||
// initial warehouse - Elaine 2009/02/06
|
||||
|
@ -295,11 +346,12 @@ public class RolePanel extends Window implements EventListener
|
|||
{
|
||||
for(int i = 0; i < warehouseKNPairs.length; i++)
|
||||
{
|
||||
Listitem li = lstWarehouse.appendItem(warehouseKNPairs[i].getName(), warehouseKNPairs[i].getID());
|
||||
ComboItem ci = new ComboItem(warehouseKNPairs[i].getName(), warehouseKNPairs[i].getID());
|
||||
lstWarehouse.appendChild(ci);
|
||||
if(warehouseKNPairs[i].getID().equals(initDefault))
|
||||
lstWarehouse.setSelectedItem(li);
|
||||
lstWarehouse.setSelectedItem(ci);
|
||||
}
|
||||
if (lstWarehouse.getSelectedIndex() == -1)
|
||||
if (lstWarehouse.getSelectedIndex() == -1 && lstWarehouse.getItemCount() > 0)
|
||||
lstWarehouse.setSelectedIndex(0);
|
||||
}
|
||||
//
|
||||
|
@ -334,27 +386,23 @@ public class RolePanel extends Window implements EventListener
|
|||
**/
|
||||
public void validateRoles()
|
||||
{
|
||||
Listitem lstItemRole = lstRole.getSelectedItem();
|
||||
Listitem lstItemClient = lstClient.getSelectedItem();
|
||||
Listitem lstItemOrg = lstOrganisation.getSelectedItem();
|
||||
Listitem lstItemWarehouse = lstWarehouse.getSelectedItem();
|
||||
Comboitem lstItemRole = lstRole.getSelectedItem();
|
||||
Comboitem lstItemClient = lstClient.getSelectedItem();
|
||||
Comboitem lstItemOrg = lstOrganisation.getSelectedItem();
|
||||
Comboitem lstItemWarehouse = lstWarehouse.getSelectedItem();
|
||||
|
||||
if(lstItemRole == null || lstItemRole.getValue() == null)
|
||||
{
|
||||
lblErrorMsg.setValue("Role is mandatory!!!");
|
||||
return ;
|
||||
throw new WrongValueException(lstRole, Msg.getMsg(Env.getCtx(), "FillMandatory") + lblRole.getValue());
|
||||
}
|
||||
else if(lstItemClient == null || lstItemClient.getValue() == null)
|
||||
{
|
||||
lblErrorMsg.setValue("Client is mandatory!!!");
|
||||
return ;
|
||||
throw new WrongValueException(lstClient, Msg.getMsg(Env.getCtx(), "FillMandatory") + lblClient.getValue());
|
||||
}
|
||||
else if(lstItemOrg == null || lstItemOrg.getValue() == null)
|
||||
{
|
||||
lblErrorMsg.setValue("Organisation is mandatory!!!");
|
||||
return ;
|
||||
throw new WrongValueException(lstOrganisation, Msg.getMsg(Env.getCtx(), "FillMandatory") + lblOrganisation.getValue());
|
||||
}
|
||||
lblErrorMsg.setValue(" ");
|
||||
int orgId = 0, warehouseId = 0;
|
||||
orgId = Integer.parseInt((String)lstItemOrg.getValue());
|
||||
KeyNamePair orgKNPair = new KeyNamePair(orgId, lstItemOrg.getLabel());
|
||||
|
@ -368,15 +416,13 @@ public class RolePanel extends Window implements EventListener
|
|||
String msg = login.validateLogin(orgKNPair);
|
||||
if (msg != null && msg.length() > 0)
|
||||
{
|
||||
lblErrorMsg.setValue("Error for user login: " + msg);
|
||||
return;
|
||||
throw new WrongValueException(msg);
|
||||
}
|
||||
|
||||
msg = login.loadPreferences(orgKNPair, warehouseKNPair, null, null);
|
||||
if(!(msg == null || msg.length() == 0))
|
||||
{
|
||||
lblErrorMsg.setValue("Error for user login: " + msg);
|
||||
return ;
|
||||
throw new WrongValueException(msg);
|
||||
}
|
||||
wndLogin.loginCompleted();
|
||||
|
||||
|
@ -390,4 +436,8 @@ public class RolePanel extends Window implements EventListener
|
|||
userPreference.savePreference();
|
||||
//
|
||||
}
|
||||
|
||||
public boolean isDeferrable() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,58 @@
|
|||
/******************************************************************************
|
||||
* Copyright (C) 2009 Low Heng Sin *
|
||||
* Copyright (C) 2009 Idalica Corporation *
|
||||
* This program is free software; you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. This program is distributed in the hope *
|
||||
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU General Public License for more details. *
|
||||
* You should have received a copy of the GNU General Public License along *
|
||||
* with this program; if not, write to the Free Software Foundation, Inc., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
*****************************************************************************/
|
||||
package org.adempiere.webui.theme;
|
||||
|
||||
/**
|
||||
* Interface to hold global theme constant
|
||||
* @author hengsin
|
||||
*
|
||||
*/
|
||||
public interface ITheme {
|
||||
|
||||
//theme key in MSysConfig
|
||||
public static final String ZK_THEME = "ZK_THEME";
|
||||
//default theme
|
||||
public static final String ZK_THEME_DEFAULT = "default";
|
||||
//theme resource url prefix
|
||||
public static final String THEME_PATH_PREFIX = "/theme/";
|
||||
|
||||
//css for login window and box
|
||||
public static final String LOGIN_WINDOW_CLASS = "login-window";
|
||||
public static final String LOGIN_BOX_HEADER_CLASS = "login-box-header";
|
||||
public static final String LOGIN_BOX_HEADER_TXT_CLASS = "login-box-header-txt";
|
||||
public static final String LOGIN_BOX_HEADER_LOGO_CLASS = "login-box-header-logo";
|
||||
public static final String LOGIN_BOX_BODY_CLASS = "login-box-body";
|
||||
public static final String LOGIN_BOX_FOOTER_CLASS = "login-box-footer";
|
||||
public static final String LOGIN_BOX_FOOTER_PANEL_CLASS = "login-box-footer-pnl";
|
||||
|
||||
//css for login control
|
||||
public static final String LOGIN_BUTTON_CLASS = "login-btn";
|
||||
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";
|
||||
}
|
|
@ -29,6 +29,7 @@ import org.adempiere.webui.component.Tabpanels;
|
|||
import org.adempiere.webui.component.Tabs;
|
||||
import org.adempiere.webui.component.ToolBarButton;
|
||||
import org.adempiere.webui.component.Window;
|
||||
import org.adempiere.webui.theme.ITheme;
|
||||
import org.compiere.Adempiere;
|
||||
import org.compiere.model.MSysConfig;
|
||||
import org.compiere.model.MUser;
|
||||
|
@ -302,9 +303,12 @@ public class AboutWindow extends Window implements EventListener {
|
|||
vbox.setAlign("center");
|
||||
vbox.setPack("center");
|
||||
vbox.setParent(tabPanel);
|
||||
String logoURL = MSysConfig.getValue("ZK_LOGO_SMALL", null);
|
||||
String logoURL = MSysConfig.getValue("WEBUI_LOGOURL", null);
|
||||
if (logoURL == null || logoURL.trim().length() == 0)
|
||||
logoURL = MSysConfig.getValue("WEBUI_LOGOURL", "/images/AD10030.png");
|
||||
{
|
||||
String theme = MSysConfig.getValue(ITheme.ZK_THEME, ITheme.ZK_THEME_DEFAULT);
|
||||
logoURL = ITheme.THEME_PATH_PREFIX + theme + ITheme.HEADER_LOGO_IMAGE;
|
||||
}
|
||||
Image image = new Image(logoURL);
|
||||
image.setParent(vbox);
|
||||
|
||||
|
|
|
@ -13,6 +13,12 @@
|
|||
* For the text or an alternative of this public license, you may reach us *
|
||||
* Posterita Ltd., 3, Draper Avenue, Quatre Bornes, Mauritius *
|
||||
* or via info@posterita.org or http://www.posterita.org/ *
|
||||
* *
|
||||
* Contributors: *
|
||||
* - Heng Sin Low *
|
||||
* *
|
||||
* Sponsors: *
|
||||
* - Idalica Corporation *
|
||||
*****************************************************************************/
|
||||
|
||||
package org.adempiere.webui.window;
|
||||
|
@ -39,48 +45,47 @@ import org.zkoss.zk.ui.event.Events;
|
|||
public class LoginWindow extends FWindow implements EventListener
|
||||
{
|
||||
/**
|
||||
*
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = -365979563919913804L;
|
||||
private IWebClient app;
|
||||
private Properties ctx;
|
||||
private LoginPanel pnlLogin;
|
||||
private RolePanel pnlRole;
|
||||
|
||||
|
||||
public LoginWindow(IWebClient app)
|
||||
{
|
||||
this.ctx = Env.getCtx();
|
||||
this.app = app;
|
||||
initComponents();
|
||||
initComponents();
|
||||
init();
|
||||
// add listener on 'ENTER' key for the login window
|
||||
addEventListener(Events.ON_OK,this);
|
||||
}
|
||||
|
||||
|
||||
private void init()
|
||||
{
|
||||
this.appendChild(pnlLogin);
|
||||
this.setWidth("500px");
|
||||
|
||||
this.setStyle("background-color: transparent");
|
||||
}
|
||||
|
||||
|
||||
private void initComponents()
|
||||
{
|
||||
pnlLogin = new LoginPanel(ctx, this);
|
||||
}
|
||||
|
||||
|
||||
public void loginOk(String userName, String password)
|
||||
{
|
||||
pnlRole = new RolePanel(ctx, this, userName, password);
|
||||
this.getChildren().clear();
|
||||
this.appendChild(pnlRole);
|
||||
}
|
||||
|
||||
|
||||
public void loginCompleted()
|
||||
{
|
||||
app.loginCompleted();
|
||||
}
|
||||
|
||||
|
||||
public void loginCancelled()
|
||||
{
|
||||
pnlLogin = new LoginPanel(ctx, this);
|
||||
|
@ -88,10 +93,10 @@ public class LoginWindow extends FWindow implements EventListener
|
|||
this.appendChild(pnlLogin);
|
||||
}
|
||||
|
||||
public void onEvent(Event event)
|
||||
public void onEvent(Event event)
|
||||
{
|
||||
// check that 'ENTER' key is pressed
|
||||
if ("onOK".equals(event.getName()))
|
||||
if (Events.ON_OK.equals(event.getName()))
|
||||
{
|
||||
/**
|
||||
* LoginWindow can have as a child, either LoginPanel or RolePanel
|
||||
|
@ -104,7 +109,7 @@ public class LoginWindow extends FWindow implements EventListener
|
|||
{
|
||||
rolePanel.validateRoles();
|
||||
}
|
||||
|
||||
|
||||
LoginPanel loginPanel = (LoginPanel)this.getFellowIfAny("loginPanel");
|
||||
if (loginPanel != null)
|
||||
{
|
||||
|
|
|
@ -1,79 +0,0 @@
|
|||
/* Combobox2Default.java
|
||||
|
||||
{{IS_NOTE
|
||||
Purpose:
|
||||
|
||||
Description:
|
||||
|
||||
History:
|
||||
Jun 6, 2008 8:57:53 AM , Created by jumperchen
|
||||
}}IS_NOTE
|
||||
|
||||
Copyright (C) 2008 Potix Corporation. All Rights Reserved.
|
||||
|
||||
{{IS_RIGHT
|
||||
This program is distributed under GPL Version 2.0 in the hope that
|
||||
it will be useful, but WITHOUT ANY WARRANTY.
|
||||
}}IS_RIGHT
|
||||
*/
|
||||
package org.zkoss.zkmax.zul.render;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.Writer;
|
||||
|
||||
import org.zkoss.zk.ui.Component;
|
||||
import org.zkoss.zk.ui.Execution;
|
||||
import org.zkoss.zk.ui.Executions;
|
||||
import org.zkoss.zk.ui.render.ComponentRenderer;
|
||||
import org.zkoss.zk.ui.render.SmartWriter;
|
||||
import org.zkoss.zul.Combobox;
|
||||
|
||||
/**
|
||||
* {@link Combobox}'s default mold.
|
||||
*
|
||||
* @author jumperchen
|
||||
*
|
||||
* @since 3.5.0
|
||||
*
|
||||
* @author hengsin
|
||||
* modify default zk layout for combobox
|
||||
*/
|
||||
public class Combobox2Default implements ComponentRenderer {
|
||||
public void render(Component comp, Writer out) throws IOException {
|
||||
final SmartWriter wh = new SmartWriter(out);
|
||||
final Combobox self = (Combobox) comp;
|
||||
final String uuid = self.getUuid();
|
||||
final String zcls = self.getZclass();
|
||||
final Execution exec = Executions.getCurrent();
|
||||
|
||||
String tableStyle = "display:inline-block";
|
||||
String inputAttrs = self.getInnerAttrs();
|
||||
if (inputAttrs.indexOf("style") >= 0) {
|
||||
inputAttrs = inputAttrs.substring(0, inputAttrs.indexOf("style"));
|
||||
}
|
||||
inputAttrs = inputAttrs.trim() + " style='width: 100%'";
|
||||
wh.write("<span id=\"").write(uuid).write("\"")
|
||||
.write(self.getOuterAttrs())
|
||||
.write(" z.type=\"zul.cb.Cmbox\" z.combo=\"true\">")
|
||||
.write("<table border='0' cellspacing='0' cellpadding='0'")
|
||||
.write(" width='").write(self.getWidth()).write("'")
|
||||
.write(" style='"). write(tableStyle).write("'>")
|
||||
.write("<tr style='width:100%; white-space:nowrap;'><td style='width: 100%'><input id=\"")
|
||||
.write(uuid).write("!real\" autocomplete=\"off\"")
|
||||
.write(" class=\"").write(zcls).write("-inp\" ")
|
||||
.write(inputAttrs).write("/></td><td style='width: 17px'><span id=\"")
|
||||
.write(uuid).write("!btn\" class=\"").write(zcls).write("-btn\"");
|
||||
|
||||
if (!self.isButtonVisible())
|
||||
wh.write(" style=\"display:none\"");
|
||||
|
||||
wh.write("><img class=\"").write(zcls).write("-img\" onmousedown=\"return false;\"");
|
||||
wh.write(" src=\"").write(exec.encodeURL("~./img/spacer.gif")).write("\"")
|
||||
.write("\"/></span></td></tr></table><div id=\"").write(uuid).write("!pp\" class=\"")
|
||||
.write(zcls).write("-pp\" style=\"display:none\" tabindex=\"-1\">")
|
||||
.write("<table id=\"").write(uuid)
|
||||
.write("!cave\" cellpadding=\"0\" cellspacing=\"0\">")
|
||||
.writeChildren(self)
|
||||
.write("</table></div></span>");
|
||||
}
|
||||
}
|
|
@ -3,10 +3,9 @@
|
|||
Copyright (C) 2007 Ashley G Ramdass.
|
||||
-->
|
||||
<?page style="height:100%"?>
|
||||
<?link rel="icon" type="image/png" href="/images/AD16.png"?>
|
||||
<?link rel="stylesheet" type="text/css" href="/css/default.css.dsp"?>
|
||||
<?link rel="javascript" type="text/javascript" href="/js/layout.js"?>
|
||||
<?link rel="javascript" type="text/javascript" href="/js/calc.js"?>
|
||||
<?init zscript="theme.zs" ?>
|
||||
<?link rel="icon" type="image/png" href="/theme/${theme}/images/icon.png"?>
|
||||
<?link rel="stylesheet" type="text/css" href="/theme/${theme}/css/theme.css.dsp"?>
|
||||
<zk>
|
||||
<window use="org.adempiere.webui.AdempiereWebUI"/>
|
||||
</zk>
|
|
@ -0,0 +1,2 @@
|
|||
import org.compiere.model.MSysConfig;
|
||||
var theme = MSysConfig.getValue("ZK_THEME", "default");
|
|
@ -8,10 +8,83 @@ html,body {
|
|||
background-color: #D4E3F4;
|
||||
}
|
||||
|
||||
.login {
|
||||
background-color: #D4E3F4;
|
||||
<%-- login --%>
|
||||
.login-window {
|
||||
background-color: #E5E5E5;
|
||||
}
|
||||
|
||||
.login-box-body {
|
||||
width: 660px;
|
||||
height: 200px;
|
||||
background-image: url(../images/login-box-bg.png);
|
||||
background-repeat: repeat-y;
|
||||
background-color: transparent;
|
||||
z-index: 1;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
text-align: center;
|
||||
padding-bottom: 100px;
|
||||
}
|
||||
|
||||
.login-box-header {
|
||||
background-image: url(../images/login-box-header.png);
|
||||
background-color: transparent;
|
||||
z-index: 2;
|
||||
height: 54px;
|
||||
width: 660px;
|
||||
}
|
||||
|
||||
.login-box-header-txt {
|
||||
color: white;
|
||||
font-weight: bold;
|
||||
position: relative;
|
||||
top: 30px;
|
||||
}
|
||||
|
||||
.login-box-header-logo {
|
||||
padding-top: 20px;
|
||||
padding-bottom: 25px;
|
||||
}
|
||||
|
||||
.login-box-footer {
|
||||
background-image: url(../images/login-box-footer.png);
|
||||
background-color: transparent;
|
||||
z-index: 2;
|
||||
height: 110px;
|
||||
width: 660px;
|
||||
margin-left: 2px;
|
||||
}
|
||||
|
||||
.login-box-footer-pnl {
|
||||
width: 604px;
|
||||
margin-left: 10px;
|
||||
margin-right: 10px;
|
||||
margin-top: 40px;
|
||||
}
|
||||
|
||||
.login-label {
|
||||
color: black;
|
||||
text-align: right;
|
||||
width: 40%;
|
||||
}
|
||||
|
||||
.login-field {
|
||||
text-align: left;
|
||||
width: 55%;
|
||||
}
|
||||
|
||||
.login-btn {
|
||||
height: 36px;
|
||||
width: 72px;
|
||||
}
|
||||
|
||||
.login-east-panel, .login-west-panel {
|
||||
width: 350px;
|
||||
background-color: #E0EAF7;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
<%-- header --%>
|
||||
.header-left {
|
||||
margin: 0;
|
||||
margin-left: 5px;
|
||||
|
@ -40,7 +113,8 @@ html,body {
|
|||
}
|
||||
|
||||
.header {
|
||||
background-image: url(images/gradient-bg.gif);
|
||||
--background-image: url(images/gradient-bg.gif);
|
||||
background-image: url(../images/header-bg.png);
|
||||
background-repeat: repeat-x;
|
||||
width: 100%;
|
||||
height: 35px;
|
||||
|
@ -51,6 +125,7 @@ html,body {
|
|||
font-size: 10px;
|
||||
}
|
||||
|
||||
<%-- button --%>
|
||||
.action-button {
|
||||
height: 32px;
|
||||
width: 48px;
|
||||
|
@ -72,6 +147,7 @@ html,body {
|
|||
text-align: center;
|
||||
}
|
||||
|
||||
<%-- desktop --%>
|
||||
div.wc-modal, div.wc-modal-none, div.wc-highlighted, div.wc-highlighted-none {
|
||||
background-color: white;
|
||||
}
|
||||
|
@ -88,7 +164,6 @@ div.wc-modal, div.wc-modal-none, div.wc-highlighted, div.wc-highlighted-none {
|
|||
}
|
||||
|
||||
<%-- adwindow and form --%>
|
||||
|
||||
.adform-content-none {
|
||||
overflow: auto;
|
||||
position: absolute;
|
||||
|
@ -102,7 +177,6 @@ div.wc-modal, div.wc-modal-none, div.wc-highlighted, div.wc-highlighted-none {
|
|||
}
|
||||
|
||||
.adwindow-nav {
|
||||
width: 200px;
|
||||
}
|
||||
|
||||
.adwindow-left-nav {
|
||||
|
@ -136,20 +210,36 @@ div.wc-modal, div.wc-modal-none, div.wc-highlighted, div.wc-highlighted-none {
|
|||
font-weight: bold;
|
||||
color: #274D5F;
|
||||
cursor: pointer;
|
||||
border-top: 1px solid #7EAAC6;
|
||||
border-bottom: 1px solid #7EAAC6;
|
||||
border-top: 2px solid #7EAAC6;
|
||||
border-bottom: 2px solid #7EAAC6;
|
||||
}
|
||||
|
||||
.adwindow-left-navbtn-sel {
|
||||
border-left: 1px solid #7EAAC6;
|
||||
border-left: 2px solid #7EAAC6;
|
||||
border-right: none;
|
||||
text-align: right;
|
||||
-moz-border-radius-topleft: 5px;
|
||||
-moz-border-radius-bottomleft: 5px;
|
||||
-webkit-border-radius-top-left: 5px;
|
||||
-webkit-border-radius-bottom-left: 5px;
|
||||
background-color: #d1e7f6 !important;
|
||||
background-image: url(../images/adtab-left-bg.png);
|
||||
background-repeat: repeat-y;
|
||||
background-position: top right;
|
||||
}
|
||||
|
||||
.adwindow-right-navbtn-sel {
|
||||
border-right: 1px solid #7EAAC6;
|
||||
border-right: 2px solid #7EAAC6;
|
||||
border-left: none;
|
||||
text-align: left;
|
||||
-moz-border-radius-topright: 5px;
|
||||
-moz-border-radius-bottomright: 5px;
|
||||
-webkit-border-radius-top-right: 5px;
|
||||
-webkit-border-radius-bottom-right: 5px;
|
||||
background-color: #d1e7f6 !important;
|
||||
background-image: url(../images/adtab-right-bg.png);
|
||||
background-repeat: repeat-y;
|
||||
background-position: top left;
|
||||
}
|
||||
|
||||
.adwindow-navbtn-uns {
|
||||
|
@ -172,16 +262,19 @@ div.wc-modal, div.wc-modal-none, div.wc-highlighted, div.wc-highlighted-none {
|
|||
border-left: 1px solid #CCCCCC;
|
||||
border-right: none;
|
||||
text-align: right;
|
||||
-moz-border-radius-topleft: 5px;
|
||||
-moz-border-radius-bottomleft: 5px;
|
||||
}
|
||||
|
||||
.adwindow-right-navbtn-uns, .adwindow-right-navbtn-dis {
|
||||
border-right: 1px solid #CCCCCC;
|
||||
border-left: none;
|
||||
text-align: left;
|
||||
-moz-border-radius-topright: 5px;
|
||||
-moz-border-radius-bottomright: 5px;
|
||||
}
|
||||
|
||||
<%-- ad tab --%>
|
||||
|
||||
.adtab-body {
|
||||
position: absolute;
|
||||
margin: 0;
|
||||
|
@ -270,3 +363,13 @@ div.wc-modal, div.wc-modal-none, div.wc-highlighted, div.wc-highlighted-none {
|
|||
input:focus, textarea:focus, .z-combobox-inp:focus, z-datebox-inp:focus {
|
||||
border: 1px solid #0000ff;
|
||||
}
|
||||
|
||||
<%-- fixed combobox btn position when width is set 100% --%>
|
||||
.z-combobox-inp {
|
||||
font-family: ${fontFamilyC};
|
||||
font-size: ${fontSizeM};
|
||||
font-weight: normal;
|
||||
background: #FFF url(${c:encodeURL('~./zul/img/grid/text-bg.gif')}) repeat-x 0 0;
|
||||
border: 1px solid #7F9DB9;
|
||||
margin-right: -17px;
|
||||
}
|
After Width: | Height: | Size: 306 B |
After Width: | Height: | Size: 306 B |
After Width: | Height: | Size: 281 B |
After Width: | Height: | Size: 1.8 KiB |
After Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 382 B |
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 15 KiB |
|
@ -0,0 +1,71 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
Copyright (C) 2009 Low Heng Sin
|
||||
Copyright (C) 2009 Idalica Corporation
|
||||
-->
|
||||
<html>
|
||||
<![CDATA[
|
||||
<style>
|
||||
.section-head {
|
||||
margin-top: 20px;
|
||||
font-size: 9pt;
|
||||
}
|
||||
|
||||
.loginInfoBox {
|
||||
background-color: #9CBDFF;
|
||||
margin: 5px;
|
||||
padding: 3px;
|
||||
margin-top: 20px;
|
||||
-moz-border-radius: 5px;
|
||||
-webkit-border-radius: 5px;
|
||||
}
|
||||
</style>
|
||||
<div class="loginInfoBox">
|
||||
<span class="section-head">Initially you can log into the system with the following users:
|
||||
</span>
|
||||
|
||||
<table border="thin" cellpadding="5" cellspacing="0" style="margin-top: 10px; font-size: 8pt; background-color: transparent; border: 1px solid lightgray; border-collapse: collapse;">
|
||||
|
||||
<tbody><tr valign="top">
|
||||
<th ><i><b>Usage</b></i>
|
||||
</th><th><i><b>User</b></i>
|
||||
</th><th><i><b>Password</b></i>
|
||||
</th></tr>
|
||||
|
||||
|
||||
|
||||
<tr valign="top">
|
||||
<td>System Management
|
||||
</td><td>System
|
||||
</td><td>System
|
||||
</td></tr>
|
||||
|
||||
|
||||
|
||||
<tr valign="top">
|
||||
<td>System Management or any role/company
|
||||
</td><td>SuperUser
|
||||
</td><td>System
|
||||
</td></tr>
|
||||
|
||||
|
||||
|
||||
<tr valign="top">
|
||||
|
||||
<td>Sample Client Administration
|
||||
</td><td>GardenAdmin
|
||||
</td><td>GardenAdmin
|
||||
</td></tr>
|
||||
|
||||
|
||||
|
||||
<tr valign="top">
|
||||
<td>Sample Client User
|
||||
</td><td>GardenUser
|
||||
</td><td>GardenUser
|
||||
</td></tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
]]>
|
||||
</html>
|
|
@ -0,0 +1,15 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
Copyright (C) 2009 Low Heng Sin
|
||||
Copyright (C) 2009 Idalica Corporation
|
||||
-->
|
||||
<?component name="vendorLogo" inline="true" macroURI="vendor-logo.zul"?>
|
||||
<?component name="loginInfo" macroURI="login-info.zul"?>
|
||||
<?component name="versionInfo" inline="true" macroURI="version-info.zul"?>
|
||||
<?component name="loginLinks" inline="true" macroURI="login-links.zul"?>
|
||||
<div>
|
||||
<vendorLogo/>
|
||||
<loginInfo if="${desktop.execution.serverName == "www.testadempiere.com" or desktop.execution.serverName == "127.0.0.1"}"/>
|
||||
<versionInfo/>
|
||||
<loginLinks/>
|
||||
</div>
|
|
@ -0,0 +1,38 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
Copyright (C) 2009 Low Heng Sin
|
||||
Copyright (C) 2009 Idalica Corporation
|
||||
-->
|
||||
<zk>
|
||||
|
||||
<style>
|
||||
.loginLinksBox {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
padding-left: 3px;
|
||||
font-size: 8pt;
|
||||
background-color: transparent;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="loginLinksBox" if="${desktop.execution.serverName == "www.testadempiere.com" or desktop.execution.serverName == "127.0.0.1"}"
|
||||
style="position: absolute; bottom: 5px;">
|
||||
|
||||
<toolbarbutton href="http://www.zkoss.org" image="http://www.zkoss.org/img/zkpowered_s.png"
|
||||
tooltiptext="Powered by Zk" target="_blank"
|
||||
/>
|
||||
<button href="http://www.mozilla.com/firefox" id="getFirefox"
|
||||
image="http://sfx-images.mozilla.org/affiliates/Buttons/firefox3/110x32_get_ffx.png"
|
||||
target="_blank"
|
||||
/>
|
||||
<button href="http://www.adempiere.org" image="images/AD32.png"
|
||||
tooltiptext="ADempiere Community" style="height:32px; width:32px" target="_blank"/>
|
||||
</div>
|
||||
|
||||
<zscript>
|
||||
<![CDATA[
|
||||
getFirefox.setHref("http://www.mozilla.com/?from=sfx&uid=0&t=306");
|
||||
]]>
|
||||
</zscript>
|
||||
|
||||
</zk>
|
|
@ -0,0 +1,21 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
Copyright (C) 2009 Low Heng Sin
|
||||
Copyright (C) 2009 Idalica Corporation
|
||||
-->
|
||||
<zk>
|
||||
|
||||
<div style="background-color: #E5E5E5; margin: 5px;"
|
||||
if="${desktop.execution.serverName == "www.testadempiere.com"}">
|
||||
<hbox valign="middle">
|
||||
<toolbarbutton
|
||||
href="http://www.idalica.com" image="http://www.testadempiere.com/images/Idalica_Logo-grey-sm.png" target="_blank"/>
|
||||
<label value="ADempiere Online Demonstration - Built Nightly by Idalica"
|
||||
style="font-family:Arial,sans-serif; color:#578BB8; font-size:1em; font-weight: bold;" />
|
||||
</hbox>
|
||||
</div>
|
||||
<div style="height: 90px" if="${desktop.execution.serverName != "www.testadempiere.com"}">
|
||||
<space/>
|
||||
</div>
|
||||
|
||||
</zk>
|
|
@ -0,0 +1,71 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
Copyright (C) 2009 Low Heng Sin
|
||||
Copyright (C) 2009 Idalica Corporation
|
||||
-->
|
||||
<zk>
|
||||
<zscript>
|
||||
import org.compiere.Adempiere;
|
||||
var mainVersion = Adempiere.MAIN_VERSION;
|
||||
var dateVersion = Adempiere.DATE_VERSION;
|
||||
var dbVersion = Adempiere.DB_VERSION;
|
||||
var vendor = Adempiere.getImplementationVendor();
|
||||
var vendorVersion = Adempiere.getImplementationVersion();
|
||||
var jvm = Adempiere.getJavaInfo();
|
||||
var os = Adempiere.getOSInfo();
|
||||
</zscript>
|
||||
<html>
|
||||
<![CDATA[
|
||||
<style>
|
||||
.versionInfoBox {
|
||||
background-color: #9CBDFF;
|
||||
margin: 5px;
|
||||
padding: 3px;
|
||||
margin-top: 20px;
|
||||
-moz-border-radius: 5px;
|
||||
-webkit-border-radius: 5px;
|
||||
font-size: 8pt;
|
||||
}
|
||||
</style>
|
||||
<div class="versionInfoBox">
|
||||
<table border="0">
|
||||
<tr>
|
||||
<td align="right">Main Version</td>
|
||||
<td>:</td>
|
||||
<td aligh="left">${mainVersion}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right">Date Version</td>
|
||||
<td>:</td>
|
||||
<td aligh="left">${dateVersion}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right">Databse Version</td>
|
||||
<td>:</td>
|
||||
<td aligh="left">${dbVersion}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right">Vendor</td>
|
||||
<td>:</td>
|
||||
<td aligh="left">${vendor}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right">Vendor Version</td>
|
||||
<td>:</td>
|
||||
<td aligh="left">${vendorVersion}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right">JVM</td>
|
||||
<td>:</td>
|
||||
<td aligh="left">${jvm}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right">OS</td>
|
||||
<td>:</td>
|
||||
<td aligh="left">${os}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
]]>
|
||||
</html>
|
||||
</zk>
|