branding
- added ZK_LOGO_LARGE and ZK_LOGO_SMALL ( deprecated WEBUI_LOGOURL ) - added ZK_BROWSER_TITLE
This commit is contained in:
parent
a619628e8d
commit
b362b9a8f1
|
@ -44,20 +44,22 @@ public class HeaderPanel extends Panel implements EventListener
|
||||||
private static final long serialVersionUID = -4293371180738797244L;
|
private static final long serialVersionUID = -4293371180738797244L;
|
||||||
|
|
||||||
private Image image = new Image();
|
private Image image = new Image();
|
||||||
|
|
||||||
public HeaderPanel()
|
public HeaderPanel()
|
||||||
{
|
{
|
||||||
super();
|
super();
|
||||||
init();
|
init();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void init()
|
private void init()
|
||||||
{
|
{
|
||||||
LayoutUtils.addSclass("header", this);
|
LayoutUtils.addSclass("header", this);
|
||||||
|
|
||||||
UserPanel userPanel = new UserPanel();
|
|
||||||
|
|
||||||
String logoURL = MSysConfig.getValue("WEBUI_LOGOURL", "/images/AD10030.png");
|
UserPanel userPanel = new UserPanel();
|
||||||
|
|
||||||
|
String logoURL = MSysConfig.getValue("ZK_LOGO_SMALL", null);
|
||||||
|
if (logoURL == null || logoURL.trim().length() == 0)
|
||||||
|
logoURL = MSysConfig.getValue("WEBUI_LOGOURL", "/images/AD10030.png");
|
||||||
image.setSrc(logoURL);
|
image.setSrc(logoURL);
|
||||||
image.addEventListener(Events.ON_CLICK, this);
|
image.addEventListener(Events.ON_CLICK, this);
|
||||||
image.setStyle("cursor: pointer;");
|
image.setStyle("cursor: pointer;");
|
||||||
|
@ -67,20 +69,20 @@ public class HeaderPanel extends Panel implements EventListener
|
||||||
layout.setParent(this);
|
layout.setParent(this);
|
||||||
West west = new West();
|
West west = new West();
|
||||||
west.setParent(layout);
|
west.setParent(layout);
|
||||||
|
|
||||||
Vbox vb = new Vbox();
|
Vbox vb = new Vbox();
|
||||||
vb.setParent(west);
|
vb.setParent(west);
|
||||||
vb.setHeight("100%");
|
vb.setHeight("100%");
|
||||||
// vb.setWidth("100%"); // Elaine 2008/11/19 the role and logout links don't work if width is set to 100%
|
// vb.setWidth("100%"); // Elaine 2008/11/19 the role and logout links don't work if width is set to 100%
|
||||||
vb.setPack("center");
|
vb.setPack("center");
|
||||||
vb.setAlign("left");
|
vb.setAlign("left");
|
||||||
|
|
||||||
image.setParent(vb);
|
image.setParent(vb);
|
||||||
|
|
||||||
LayoutUtils.addSclass("header-left", west);
|
LayoutUtils.addSclass("header-left", west);
|
||||||
//the following doesn't work when declare as part of the header-left style
|
//the following doesn't work when declare as part of the header-left style
|
||||||
west.setStyle("background-color: transparent; border: none;");
|
west.setStyle("background-color: transparent; border: none;");
|
||||||
|
|
||||||
// Elaine 2009/03/02
|
// Elaine 2009/03/02
|
||||||
Center center = new Center();
|
Center center = new Center();
|
||||||
center.setParent(layout);
|
center.setParent(layout);
|
||||||
|
@ -92,7 +94,7 @@ public class HeaderPanel extends Panel implements EventListener
|
||||||
LayoutUtils.addSclass("header-right", center);
|
LayoutUtils.addSclass("header-right", center);
|
||||||
//the following doesn't work when declare as part of the header-right style
|
//the following doesn't work when declare as part of the header-right style
|
||||||
center.setStyle("background-color: transparent; border: none;");
|
center.setStyle("background-color: transparent; border: none;");
|
||||||
|
|
||||||
// East east = new East();
|
// East east = new East();
|
||||||
// east.setParent(layout);
|
// east.setParent(layout);
|
||||||
// userPanel.setParent(east);
|
// userPanel.setParent(east);
|
||||||
|
@ -109,10 +111,10 @@ public class HeaderPanel extends Panel implements EventListener
|
||||||
if(event.getTarget() == image)
|
if(event.getTarget() == image)
|
||||||
{
|
{
|
||||||
AboutWindow w = new AboutWindow();
|
AboutWindow w = new AboutWindow();
|
||||||
w.setPage(this.getPage());
|
w.setPage(this.getPage());
|
||||||
w.doModal();
|
w.doModal();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,6 +31,7 @@ import org.adempiere.webui.component.Window;
|
||||||
import org.adempiere.webui.session.SessionManager;
|
import org.adempiere.webui.session.SessionManager;
|
||||||
import org.adempiere.webui.util.UserPreference;
|
import org.adempiere.webui.util.UserPreference;
|
||||||
import org.adempiere.webui.window.LoginWindow;
|
import org.adempiere.webui.window.LoginWindow;
|
||||||
|
import org.compiere.model.MSysConfig;
|
||||||
import org.compiere.util.DB;
|
import org.compiere.util.DB;
|
||||||
import org.compiere.util.Env;
|
import org.compiere.util.Env;
|
||||||
import org.compiere.util.KeyNamePair;
|
import org.compiere.util.KeyNamePair;
|
||||||
|
@ -59,7 +60,7 @@ import org.zkoss.zul.Listitem;
|
||||||
public class LoginPanel extends Window implements EventListener
|
public class LoginPanel extends Window implements EventListener
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private static final long serialVersionUID = -5823771596520748214L;
|
private static final long serialVersionUID = -5823771596520748214L;
|
||||||
private static final String RESOURCE = "org.compiere.apps.ALoginRes";
|
private static final String RESOURCE = "org.compiere.apps.ALoginRes";
|
||||||
|
@ -97,7 +98,7 @@ public class LoginPanel extends Window implements EventListener
|
||||||
Row logo = new Row();
|
Row logo = new Row();
|
||||||
logo.setSpans("2");
|
logo.setSpans("2");
|
||||||
Image image = new Image();
|
Image image = new Image();
|
||||||
image.setSrc("images/logo.png");
|
image.setSrc(MSysConfig.getValue("ZK_LOGO_LARGE", "images/logo.png"));
|
||||||
logo.appendChild(image);
|
logo.appendChild(image);
|
||||||
Row rowUser = new Row();
|
Row rowUser = new Row();
|
||||||
rowUser.setId("rowUser");
|
rowUser.setId("rowUser");
|
||||||
|
|
|
@ -29,6 +29,7 @@ import org.adempiere.webui.util.UserPreference;
|
||||||
import org.adempiere.webui.window.LoginWindow;
|
import org.adempiere.webui.window.LoginWindow;
|
||||||
import org.compiere.db.CConnection;
|
import org.compiere.db.CConnection;
|
||||||
import org.compiere.model.MRole;
|
import org.compiere.model.MRole;
|
||||||
|
import org.compiere.model.MSysConfig;
|
||||||
import org.compiere.util.Env;
|
import org.compiere.util.Env;
|
||||||
import org.compiere.util.KeyNamePair;
|
import org.compiere.util.KeyNamePair;
|
||||||
import org.compiere.util.Language;
|
import org.compiere.util.Language;
|
||||||
|
@ -58,7 +59,7 @@ import org.zkoss.zul.Rows;
|
||||||
public class RolePanel extends Window implements EventListener
|
public class RolePanel extends Window implements EventListener
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private static final long serialVersionUID = 2808473294679524383L;
|
private static final long serialVersionUID = 2808473294679524383L;
|
||||||
|
|
||||||
|
@ -81,14 +82,14 @@ public class RolePanel extends Window implements EventListener
|
||||||
rolesKNPairs = login.getRoles(userName, password);
|
rolesKNPairs = login.getRoles(userName, password);
|
||||||
if(rolesKNPairs == null)
|
if(rolesKNPairs == null)
|
||||||
throw new ApplicationException("Login is invalid, UserName: " + userName + " and Password:" + password);
|
throw new ApplicationException("Login is invalid, UserName: " + userName + " and Password:" + password);
|
||||||
|
|
||||||
//set app server credentials
|
//set app server credentials
|
||||||
CConnection.get().setAppServerCredential(userName, password);
|
CConnection.get().setAppServerCredential(userName, password);
|
||||||
|
|
||||||
initComponents();
|
initComponents();
|
||||||
init();
|
init();
|
||||||
this.setId("rolePanel");
|
this.setId("rolePanel");
|
||||||
|
|
||||||
AuFocus auf = new AuFocus(lstRole);
|
AuFocus auf = new AuFocus(lstRole);
|
||||||
Clients.response(auf);
|
Clients.response(auf);
|
||||||
}
|
}
|
||||||
|
@ -99,13 +100,13 @@ public class RolePanel extends Window implements EventListener
|
||||||
grid.setId("grdChooseRole");
|
grid.setId("grdChooseRole");
|
||||||
grid.setOddRowSclass("even");
|
grid.setOddRowSclass("even");
|
||||||
Rows rows = new Rows();
|
Rows rows = new Rows();
|
||||||
|
|
||||||
Row logo = new Row();
|
Row logo = new Row();
|
||||||
logo.setSpans("2");
|
logo.setSpans("2");
|
||||||
Image image = new Image();
|
Image image = new Image();
|
||||||
image.setSrc("images/logo.png");
|
image.setSrc(MSysConfig.getValue("ZK_LOGO_LARGE", "images/logo.png"));
|
||||||
logo.appendChild(image);
|
logo.appendChild(image);
|
||||||
|
|
||||||
Row rowRole = new Row();
|
Row rowRole = new Row();
|
||||||
Row rowClient = new Row();
|
Row rowClient = new Row();
|
||||||
Row rowOrg = new Row();
|
Row rowOrg = new Row();
|
||||||
|
@ -147,9 +148,9 @@ public class RolePanel extends Window implements EventListener
|
||||||
private void initComponents()
|
private void initComponents()
|
||||||
{
|
{
|
||||||
Language language = Env.getLanguage(Env.getCtx());
|
Language language = Env.getLanguage(Env.getCtx());
|
||||||
|
|
||||||
ResourceBundle res = ResourceBundle.getBundle(RESOURCE, language.getLocale());
|
ResourceBundle res = ResourceBundle.getBundle(RESOURCE, language.getLocale());
|
||||||
|
|
||||||
lblErrorMsg = new Label();
|
lblErrorMsg = new Label();
|
||||||
lblErrorMsg.setValue(" ");
|
lblErrorMsg.setValue(" ");
|
||||||
|
|
||||||
|
@ -245,7 +246,7 @@ public class RolePanel extends Window implements EventListener
|
||||||
lstClient.setSelectedIndex(0);
|
lstClient.setSelectedIndex(0);
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
|
|
||||||
//force reload of default role
|
//force reload of default role
|
||||||
MRole.getDefault(Env.getCtx(), true);
|
MRole.getDefault(Env.getCtx(), true);
|
||||||
}
|
}
|
||||||
|
@ -370,7 +371,7 @@ public class RolePanel extends Window implements EventListener
|
||||||
lblErrorMsg.setValue("Error for user login: " + msg);
|
lblErrorMsg.setValue("Error for user login: " + msg);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
msg = login.loadPreferences(orgKNPair, warehouseKNPair, null, null);
|
msg = login.loadPreferences(orgKNPair, warehouseKNPair, null, null);
|
||||||
if(!(msg == null || msg.length() == 0))
|
if(!(msg == null || msg.length() == 0))
|
||||||
{
|
{
|
||||||
|
@ -378,7 +379,7 @@ public class RolePanel extends Window implements EventListener
|
||||||
return ;
|
return ;
|
||||||
}
|
}
|
||||||
wndLogin.loginCompleted();
|
wndLogin.loginCompleted();
|
||||||
|
|
||||||
// Elaine 2009/02/06 save preference to AD_Preference
|
// Elaine 2009/02/06 save preference to AD_Preference
|
||||||
UserPreference userPreference = SessionManager.getSessionApplication().getUserPreference();
|
UserPreference userPreference = SessionManager.getSessionApplication().getUserPreference();
|
||||||
userPreference.setProperty(UserPreference.P_LANGUAGE, Env.getContext(Env.getCtx(), UserPreference.LANGUAGE_NAME));
|
userPreference.setProperty(UserPreference.P_LANGUAGE, Env.getContext(Env.getCtx(), UserPreference.LANGUAGE_NAME));
|
||||||
|
|
|
@ -30,6 +30,7 @@ import org.adempiere.webui.component.Tabs;
|
||||||
import org.adempiere.webui.component.ToolBarButton;
|
import org.adempiere.webui.component.ToolBarButton;
|
||||||
import org.adempiere.webui.component.Window;
|
import org.adempiere.webui.component.Window;
|
||||||
import org.compiere.Adempiere;
|
import org.compiere.Adempiere;
|
||||||
|
import org.compiere.model.MSysConfig;
|
||||||
import org.compiere.model.MUser;
|
import org.compiere.model.MUser;
|
||||||
import org.compiere.util.CLogErrorBuffer;
|
import org.compiere.util.CLogErrorBuffer;
|
||||||
import org.compiere.util.CLogMgt;
|
import org.compiere.util.CLogMgt;
|
||||||
|
@ -50,14 +51,14 @@ import org.zkoss.zul.Separator;
|
||||||
import org.zkoss.zul.Vbox;
|
import org.zkoss.zul.Vbox;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author Low Heng Sin
|
* @author Low Heng Sin
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class AboutWindow extends Window implements EventListener {
|
public class AboutWindow extends Window implements EventListener {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private static final long serialVersionUID = -257313771447940626L;
|
private static final long serialVersionUID = -257313771447940626L;
|
||||||
private Checkbox bErrorsOnly;
|
private Checkbox bErrorsOnly;
|
||||||
|
@ -76,16 +77,16 @@ public class AboutWindow extends Window implements EventListener {
|
||||||
this.setWidth("500px");
|
this.setWidth("500px");
|
||||||
this.setHeight("450px");
|
this.setHeight("450px");
|
||||||
this.setPosition("center");
|
this.setPosition("center");
|
||||||
this.setTitle("ADempiere Zk Web Client");
|
this.setTitle(MSysConfig.getValue("ZK_BROWSER_TITLE", "Adempiere"));
|
||||||
this.setClosable(true);
|
this.setClosable(true);
|
||||||
this.setSizable(true);
|
this.setSizable(true);
|
||||||
|
|
||||||
this.addEventListener(Events.ON_SIZE, this);
|
this.addEventListener(Events.ON_SIZE, this);
|
||||||
|
|
||||||
Vbox layout = new Vbox();
|
Vbox layout = new Vbox();
|
||||||
layout.setWidth("100%");
|
layout.setWidth("100%");
|
||||||
layout.setParent(this);
|
layout.setParent(this);
|
||||||
|
|
||||||
tabbox = new Tabbox();
|
tabbox = new Tabbox();
|
||||||
tabbox.setParent(layout);
|
tabbox.setParent(layout);
|
||||||
tabbox.setWidth("480px");
|
tabbox.setWidth("480px");
|
||||||
|
@ -96,35 +97,35 @@ public class AboutWindow extends Window implements EventListener {
|
||||||
tabPanels = new Tabpanels();
|
tabPanels = new Tabpanels();
|
||||||
tabPanels.setParent(tabbox);
|
tabPanels.setParent(tabbox);
|
||||||
tabPanels.setWidth("480px");
|
tabPanels.setWidth("480px");
|
||||||
|
|
||||||
//about
|
//about
|
||||||
Tab tab = new Tab();
|
Tab tab = new Tab();
|
||||||
tab.setLabel("About");
|
tab.setLabel("About");
|
||||||
tab.setParent(tabs);
|
tab.setParent(tabs);
|
||||||
Tabpanel tabPanel = createAbout();
|
Tabpanel tabPanel = createAbout();
|
||||||
tabPanel.setParent(tabPanels);
|
tabPanel.setParent(tabPanels);
|
||||||
|
|
||||||
//Credit
|
//Credit
|
||||||
tab = new Tab();
|
tab = new Tab();
|
||||||
tab.setLabel("Credit");
|
tab.setLabel("Credit");
|
||||||
tab.setParent(tabs);
|
tab.setParent(tabs);
|
||||||
tabPanel = createCredit();
|
tabPanel = createCredit();
|
||||||
tabPanel.setParent(tabPanels);
|
tabPanel.setParent(tabPanels);
|
||||||
|
|
||||||
//Info
|
//Info
|
||||||
tab = new Tab();
|
tab = new Tab();
|
||||||
tab.setLabel("Info");
|
tab.setLabel("Info");
|
||||||
tab.setParent(tabs);
|
tab.setParent(tabs);
|
||||||
tabPanel = createInfo();
|
tabPanel = createInfo();
|
||||||
tabPanel.setParent(tabPanels);
|
tabPanel.setParent(tabPanels);
|
||||||
|
|
||||||
//Trace
|
//Trace
|
||||||
tab = new Tab();
|
tab = new Tab();
|
||||||
tab.setLabel("Logs");
|
tab.setLabel("Logs");
|
||||||
tab.setParent(tabs);
|
tab.setParent(tabs);
|
||||||
tabPanel = createTrace();
|
tabPanel = createTrace();
|
||||||
tabPanel.setParent(tabPanels);
|
tabPanel.setParent(tabPanels);
|
||||||
|
|
||||||
Hbox hbox = new Hbox();
|
Hbox hbox = new Hbox();
|
||||||
hbox.setParent(layout);
|
hbox.setParent(layout);
|
||||||
hbox.setPack("end");
|
hbox.setPack("end");
|
||||||
|
@ -133,7 +134,7 @@ public class AboutWindow extends Window implements EventListener {
|
||||||
btnOk.setImage("/images/Ok24.png");
|
btnOk.setImage("/images/Ok24.png");
|
||||||
btnOk.addEventListener(Events.ON_CLICK, this);
|
btnOk.addEventListener(Events.ON_CLICK, this);
|
||||||
btnOk.setParent(hbox);
|
btnOk.setParent(hbox);
|
||||||
|
|
||||||
this.setBorder("normal");
|
this.setBorder("normal");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -143,7 +144,7 @@ public class AboutWindow extends Window implements EventListener {
|
||||||
vbox.setParent(tabPanel);
|
vbox.setParent(tabPanel);
|
||||||
vbox.setWidth("100%");
|
vbox.setWidth("100%");
|
||||||
vbox.setHeight("100%");
|
vbox.setHeight("100%");
|
||||||
|
|
||||||
Hbox hbox = new Hbox();
|
Hbox hbox = new Hbox();
|
||||||
bErrorsOnly = new Checkbox();
|
bErrorsOnly = new Checkbox();
|
||||||
bErrorsOnly.setLabel(Msg.getMsg(Env.getCtx(), "ErrorsOnly"));
|
bErrorsOnly.setLabel(Msg.getMsg(Env.getCtx(), "ErrorsOnly"));
|
||||||
|
@ -158,9 +159,9 @@ public class AboutWindow extends Window implements EventListener {
|
||||||
btnErrorEmail.addEventListener(Events.ON_CLICK, this);
|
btnErrorEmail.addEventListener(Events.ON_CLICK, this);
|
||||||
hbox.appendChild(btnErrorEmail);
|
hbox.appendChild(btnErrorEmail);
|
||||||
vbox.appendChild(hbox);
|
vbox.appendChild(hbox);
|
||||||
|
|
||||||
Vector<String> columnNames = CLogErrorBuffer.get(true).getColumnNames(Env.getCtx());
|
Vector<String> columnNames = CLogErrorBuffer.get(true).getColumnNames(Env.getCtx());
|
||||||
|
|
||||||
logTable = new Listbox();
|
logTable = new Listbox();
|
||||||
ListHead listHead = new ListHead();
|
ListHead listHead = new ListHead();
|
||||||
listHead.setParent(logTable);
|
listHead.setParent(logTable);
|
||||||
|
@ -170,14 +171,14 @@ public class AboutWindow extends Window implements EventListener {
|
||||||
header.setWidth("100px");
|
header.setWidth("100px");
|
||||||
listHead.appendChild(header);
|
listHead.appendChild(header);
|
||||||
}
|
}
|
||||||
|
|
||||||
vbox.appendChild(logTable);
|
vbox.appendChild(logTable);
|
||||||
logTable.setWidth("480px");
|
logTable.setWidth("480px");
|
||||||
logTable.setHeight("310px");
|
logTable.setHeight("310px");
|
||||||
logTable.setVflex(false);
|
logTable.setVflex(false);
|
||||||
|
|
||||||
updateLogTable();
|
updateLogTable();
|
||||||
|
|
||||||
return tabPanel;
|
return tabPanel;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -186,7 +187,7 @@ public class AboutWindow extends Window implements EventListener {
|
||||||
SimpleListModel model = new SimpleListModel(data);
|
SimpleListModel model = new SimpleListModel(data);
|
||||||
model.setMaxLength(new int[]{0, 0, 0, 200, 0, 200});
|
model.setMaxLength(new int[]{0, 0, 0, 200, 0, 200});
|
||||||
logTable.setItemRenderer(model);
|
logTable.setItemRenderer(model);
|
||||||
logTable.setModel(model);
|
logTable.setModel(model);
|
||||||
}
|
}
|
||||||
|
|
||||||
private Tabpanel createInfo() {
|
private Tabpanel createInfo() {
|
||||||
|
@ -199,13 +200,13 @@ public class AboutWindow extends Window implements EventListener {
|
||||||
pre.setParent(div);
|
pre.setParent(div);
|
||||||
Text text = new Text(CLogMgt.getInfo(null).toString());
|
Text text = new Text(CLogMgt.getInfo(null).toString());
|
||||||
text.setParent(pre);
|
text.setParent(pre);
|
||||||
|
|
||||||
return tabPanel;
|
return tabPanel;
|
||||||
}
|
}
|
||||||
|
|
||||||
private Tabpanel createCredit() {
|
private Tabpanel createCredit() {
|
||||||
Tabpanel tabPanel = new Tabpanel();
|
Tabpanel tabPanel = new Tabpanel();
|
||||||
Vbox vbox = new Vbox();
|
Vbox vbox = new Vbox();
|
||||||
vbox.setParent(tabPanel);
|
vbox.setParent(tabPanel);
|
||||||
vbox.setWidth("100%");
|
vbox.setWidth("100%");
|
||||||
Hbox hbox = new Hbox();
|
Hbox hbox = new Hbox();
|
||||||
|
@ -217,10 +218,10 @@ public class AboutWindow extends Window implements EventListener {
|
||||||
link.setTarget("_blank");
|
link.setTarget("_blank");
|
||||||
Label label= new Label("Contributed the initial Zk Web Client code.");
|
Label label= new Label("Contributed the initial Zk Web Client code.");
|
||||||
label.setParent(hbox);
|
label.setParent(hbox);
|
||||||
|
|
||||||
Separator separator = new Separator();
|
Separator separator = new Separator();
|
||||||
separator.setParent(vbox);
|
separator.setParent(vbox);
|
||||||
|
|
||||||
Div div = new Div();
|
Div div = new Div();
|
||||||
div.setParent(vbox);
|
div.setParent(vbox);
|
||||||
div.setWidth("100%");
|
div.setWidth("100%");
|
||||||
|
@ -243,10 +244,10 @@ public class AboutWindow extends Window implements EventListener {
|
||||||
link.setHref("http://www.idalica.com/");
|
link.setHref("http://www.idalica.com/");
|
||||||
link.setTarget("_blank");
|
link.setTarget("_blank");
|
||||||
link.setParent(content);
|
link.setParent(content);
|
||||||
|
|
||||||
separator = new Separator();
|
separator = new Separator();
|
||||||
separator.setParent(vbox);
|
separator.setParent(vbox);
|
||||||
|
|
||||||
div = new Div();
|
div = new Div();
|
||||||
div.setParent(vbox);
|
div.setParent(vbox);
|
||||||
div.setWidth("100%");
|
div.setWidth("100%");
|
||||||
|
@ -259,7 +260,7 @@ public class AboutWindow extends Window implements EventListener {
|
||||||
content = new Vbox();
|
content = new Vbox();
|
||||||
content.setWidth("100%");
|
content.setWidth("100%");
|
||||||
content.setParent(div);
|
content.setParent(div);
|
||||||
link = new ToolBarButton();
|
link = new ToolBarButton();
|
||||||
link.setLabel("Ashley G Ramdass");
|
link.setLabel("Ashley G Ramdass");
|
||||||
link.setHref("http://www.adempiere.com/wiki/index.php/User:Agramdass");
|
link.setHref("http://www.adempiere.com/wiki/index.php/User:Agramdass");
|
||||||
link.setTarget("_blank");
|
link.setTarget("_blank");
|
||||||
|
@ -275,7 +276,7 @@ public class AboutWindow extends Window implements EventListener {
|
||||||
link.setLabel("Carlos Ruiz");
|
link.setLabel("Carlos Ruiz");
|
||||||
link.setHref("http://www.adempiere.com/wiki/index.php/User:CarlosRuiz");
|
link.setHref("http://www.adempiere.com/wiki/index.php/User:CarlosRuiz");
|
||||||
link.setTarget("_blank");
|
link.setTarget("_blank");
|
||||||
link.setParent(content);
|
link.setParent(content);
|
||||||
|
|
||||||
link = new ToolBarButton();
|
link = new ToolBarButton();
|
||||||
link.setLabel("Teo Sarca");
|
link.setLabel("Teo Sarca");
|
||||||
|
@ -288,32 +289,35 @@ public class AboutWindow extends Window implements EventListener {
|
||||||
link.setHref("http://www.adempiere.com/wiki/index.php/User:Trifonnt");
|
link.setHref("http://www.adempiere.com/wiki/index.php/User:Trifonnt");
|
||||||
link.setTarget("_blank");
|
link.setTarget("_blank");
|
||||||
link.setParent(content);
|
link.setParent(content);
|
||||||
|
|
||||||
return tabPanel;
|
return tabPanel;
|
||||||
}
|
}
|
||||||
|
|
||||||
private Tabpanel createAbout() {
|
private Tabpanel createAbout() {
|
||||||
Tabpanel tabPanel = new Tabpanel();
|
Tabpanel tabPanel = new Tabpanel();
|
||||||
|
|
||||||
Vbox vbox = new Vbox();
|
Vbox vbox = new Vbox();
|
||||||
vbox.setWidth("100%");
|
vbox.setWidth("100%");
|
||||||
vbox.setHeight("100%");
|
vbox.setHeight("100%");
|
||||||
vbox.setAlign("center");
|
vbox.setAlign("center");
|
||||||
vbox.setPack("center");
|
vbox.setPack("center");
|
||||||
vbox.setParent(tabPanel);
|
vbox.setParent(tabPanel);
|
||||||
Image image = new Image("images/AD10030.png");
|
String logoURL = MSysConfig.getValue("ZK_LOGO_SMALL", null);
|
||||||
|
if (logoURL == null || logoURL.trim().length() == 0)
|
||||||
|
logoURL = MSysConfig.getValue("WEBUI_LOGOURL", "/images/AD10030.png");
|
||||||
|
Image image = new Image(logoURL);
|
||||||
image.setParent(vbox);
|
image.setParent(vbox);
|
||||||
|
|
||||||
Text text = new Text(Adempiere.getSubtitle());
|
Text text = new Text(Adempiere.getSubtitle());
|
||||||
text.setParent(vbox);
|
text.setParent(vbox);
|
||||||
Separator separator = new Separator();
|
Separator separator = new Separator();
|
||||||
separator.setParent(vbox);
|
separator.setParent(vbox);
|
||||||
|
|
||||||
text = new Text(Adempiere.MAIN_VERSION + "<br>");
|
text = new Text(Adempiere.MAIN_VERSION + "<br>");
|
||||||
text.setParent(vbox);
|
text.setParent(vbox);
|
||||||
text = new Text(Adempiere.DB_VERSION +"<br>");
|
text = new Text(Adempiere.DB_VERSION +"<br>");
|
||||||
text.setParent(vbox);
|
text.setParent(vbox);
|
||||||
|
|
||||||
separator = new Separator();
|
separator = new Separator();
|
||||||
separator.setParent(vbox);
|
separator.setParent(vbox);
|
||||||
ToolBarButton link = new ToolBarButton();
|
ToolBarButton link = new ToolBarButton();
|
||||||
|
@ -321,7 +325,7 @@ public class AboutWindow extends Window implements EventListener {
|
||||||
link.setHref("http://www.sourceforge.net/projects/adempiere");
|
link.setHref("http://www.sourceforge.net/projects/adempiere");
|
||||||
link.setTarget("_blank");
|
link.setTarget("_blank");
|
||||||
link.setParent(vbox);
|
link.setParent(vbox);
|
||||||
|
|
||||||
separator = new Separator();
|
separator = new Separator();
|
||||||
separator.setParent(vbox);
|
separator.setParent(vbox);
|
||||||
link = new ToolBarButton();
|
link = new ToolBarButton();
|
||||||
|
@ -329,7 +333,7 @@ public class AboutWindow extends Window implements EventListener {
|
||||||
link.setHref("http://www.adempiere.com/wiki/index.php");
|
link.setHref("http://www.adempiere.com/wiki/index.php");
|
||||||
link.setTarget("_blank");
|
link.setTarget("_blank");
|
||||||
link.setParent(vbox);
|
link.setParent(vbox);
|
||||||
|
|
||||||
separator = new Separator();
|
separator = new Separator();
|
||||||
separator.setParent(vbox);
|
separator.setParent(vbox);
|
||||||
link = new ToolBarButton();
|
link = new ToolBarButton();
|
||||||
|
@ -337,7 +341,7 @@ public class AboutWindow extends Window implements EventListener {
|
||||||
link.setHref("http://www.adempiere.org");
|
link.setHref("http://www.adempiere.org");
|
||||||
link.setTarget("_blank");
|
link.setTarget("_blank");
|
||||||
link.setParent(vbox);
|
link.setParent(vbox);
|
||||||
|
|
||||||
separator = new Separator();
|
separator = new Separator();
|
||||||
separator.setParent(vbox);
|
separator.setParent(vbox);
|
||||||
link = new ToolBarButton();
|
link = new ToolBarButton();
|
||||||
|
@ -345,14 +349,14 @@ public class AboutWindow extends Window implements EventListener {
|
||||||
link.setHref("http://www.adempiere.com");
|
link.setHref("http://www.adempiere.com");
|
||||||
link.setTarget("_blank");
|
link.setTarget("_blank");
|
||||||
link.setParent(vbox);
|
link.setParent(vbox);
|
||||||
|
|
||||||
return tabPanel;
|
return tabPanel;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onEvent(Event event) throws Exception {
|
public void onEvent(Event event) throws Exception {
|
||||||
if (event.getTarget() == bErrorsOnly) {
|
if (event.getTarget() == bErrorsOnly) {
|
||||||
this.updateLogTable();
|
this.updateLogTable();
|
||||||
}
|
}
|
||||||
else if (event.getTarget() == btnDownload)
|
else if (event.getTarget() == btnDownload)
|
||||||
downloadLog();
|
downloadLog();
|
||||||
else if (event.getTarget() == btnErrorEmail)
|
else if (event.getTarget() == btnErrorEmail)
|
||||||
|
@ -366,34 +370,34 @@ public class AboutWindow extends Window implements EventListener {
|
||||||
private void doResize(SizeEvent event) {
|
private void doResize(SizeEvent event) {
|
||||||
int width = Integer.parseInt(event.getWidth().substring(0, event.getWidth().length() - 2));
|
int width = Integer.parseInt(event.getWidth().substring(0, event.getWidth().length() - 2));
|
||||||
int height = Integer.parseInt(event.getHeight().substring(0, event.getHeight().length() - 2));
|
int height = Integer.parseInt(event.getHeight().substring(0, event.getHeight().length() - 2));
|
||||||
|
|
||||||
tabbox.setWidth((width - 20) + "px");
|
tabbox.setWidth((width - 20) + "px");
|
||||||
tabbox.setHeight((height - 70) + "px");
|
tabbox.setHeight((height - 70) + "px");
|
||||||
|
|
||||||
tabPanels.setWidth((width - 20) + "px");
|
tabPanels.setWidth((width - 20) + "px");
|
||||||
|
|
||||||
logTable.setHeight((height - 140) + "px");
|
logTable.setHeight((height - 140) + "px");
|
||||||
logTable.setWidth((width - 30) + "px");
|
logTable.setWidth((width - 30) + "px");
|
||||||
}
|
}
|
||||||
|
|
||||||
private void downloadLog() {
|
private void downloadLog() {
|
||||||
String log = CLogErrorBuffer.get(true).getErrorInfo(Env.getCtx(), bErrorsOnly.isChecked());
|
String log = CLogErrorBuffer.get(true).getErrorInfo(Env.getCtx(), bErrorsOnly.isChecked());
|
||||||
AMedia media = new AMedia("trace.log", null, "text/plain", log.getBytes());
|
AMedia media = new AMedia("trace.log", null, "text/plain", log.getBytes());
|
||||||
Filedownload.save(media);
|
Filedownload.save(media);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* EMail Errors
|
* EMail Errors
|
||||||
*/
|
*/
|
||||||
private void cmd_errorEMail()
|
private void cmd_errorEMail()
|
||||||
{
|
{
|
||||||
new WEMailDialog(this,
|
new WEMailDialog(this,
|
||||||
"EMail Trace",
|
"EMail Trace",
|
||||||
MUser.get(Env.getCtx()),
|
MUser.get(Env.getCtx()),
|
||||||
"", // to
|
"", // to
|
||||||
"Adempiere Trace Info",
|
"Adempiere Trace Info",
|
||||||
CLogErrorBuffer.get(true).getErrorInfo(Env.getCtx(), bErrorsOnly.isSelected()),
|
CLogErrorBuffer.get(true).getErrorInfo(Env.getCtx(), bErrorsOnly.isSelected()),
|
||||||
null);
|
null);
|
||||||
|
|
||||||
} // cmd_errorEMail
|
} // cmd_errorEMail
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue