* Upgrade to zk 3.5.1 and a face lift for the home page.

This commit is contained in:
Heng Sin Low 2008-10-09 08:33:10 +00:00
parent a2b18b1807
commit e9ec77f1c9
41 changed files with 1153 additions and 2286 deletions

View File

@ -68,18 +68,19 @@ import org.zkoss.zk.ui.event.EventListener;
import org.zkoss.zk.ui.event.Events;
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.West;
import org.zkoss.zkmax.zul.Portalchildren;
import org.zkoss.zkmax.zul.Portallayout;
import org.zkoss.zul.Box;
import org.zkoss.zul.Caption;
import org.zkoss.zul.Groupbox;
import org.zkoss.zul.Hbox;
import org.zkoss.zul.Iframe;
import org.zkoss.zul.Image;
import org.zkoss.zul.Panel;
import org.zkoss.zul.Panelchildren;
import org.zkoss.zul.Separator;
import org.zkoss.zul.Tab;
import org.zkoss.zul.Tabpanels;
import org.zkoss.zul.Toolbar;
import org.zkoss.zul.Treeitem;
import org.zkoss.zul.Treerow;
import org.zkoss.zul.Vbox;
@ -147,6 +148,9 @@ public class Desktop extends AbstractUIPart implements MenuListener, Serializabl
w.setWidth("300px");
w.setCollapsible(true);
w.setSplittable(true);
w.setTitle("Menu");
w.setTooltiptext("Application Menu");
w.setFlex(true);
// w.setAutoscroll(true);
pnlSide.setParent(w);
@ -167,96 +171,103 @@ public class Desktop extends AbstractUIPart implements MenuListener, Serializabl
Tabpanel homeTab = new Tabpanel();
windowContainer.addWindow(homeTab, Msg.getMsg(Env.getCtx(), "Home").replaceAll("&", ""), false);
Hbox hbox = new Hbox();
hbox.setStyle("margin: 5px");
hbox.setSpacing("5px");
hbox.setWidths("50%, 50%");
Vbox vbCol1 = new Vbox();
hbox.appendChild(vbCol1);
vbCol1.setWidth("100%");
Groupbox gbxFav = new Groupbox();
vbCol1.appendChild(gbxFav);
Caption caption = new Caption("Favourites");
Portallayout layout = new Portallayout();
homeTab.appendChild(layout);
Portalchildren left = new Portalchildren();
left.setWidth("30%");
left.setStyle("padding: 5px");
layout.appendChild(left);
Panel favPanel = new Panel();
favPanel.setStyle("margin-bottom:10px");
favPanel.setTitle("Favourites");
favPanel.setCollapsible(true);
favPanel.setBorder("normal");
left.appendChild(favPanel);
Panelchildren favContent = new Panelchildren();
favPanel.appendChild(favContent);
favContent.appendChild(createFavouritesPanel());
Toolbar favToolbar = new Toolbar();
favPanel.appendChild(favToolbar);
// Elaine 2008/07/24
Image img = new Image("/images/Delete24.png");
caption.appendChild(img);
favToolbar.appendChild(img);
img.setAlign("right");
img.setDroppable("deleteFav");
img.addEventListener(Events.ON_DROP, this);
//
gbxFav.appendChild(caption);
gbxFav.appendChild(createFavouritesPanel());
gbxFav.setMold("3d");
gbxFav.setClosable(true);
// Elaine 2008/07/24
gbxFav.setDroppable("favourite");
gbxFav.addEventListener(Events.ON_DROP, this);
//
Groupbox gbxView = new Groupbox();
vbCol1.appendChild(gbxView);
gbxView.appendChild(new Caption("Views"));
gbxView.appendChild(createViewPanel());
gbxView.setMold("3d");
gbxView.setClosable(true);
favContent.setDroppable("favourite");
favContent.addEventListener(Events.ON_DROP, this);
Vbox vbCol2 = new Vbox();
hbox.appendChild(vbCol2);
vbCol2.setWidth("100%");
Panel viewPanel = new Panel();
viewPanel.setStyle("margin-bottom:10px");
left.appendChild(viewPanel);
viewPanel.setTitle("Views");
viewPanel.setCollapsible(true);
viewPanel.setBorder("normal");
Panelchildren viewContent = new Panelchildren();
viewPanel.appendChild(viewContent);
viewContent.appendChild(createViewPanel());
Portalchildren center = new Portalchildren();
layout.appendChild(center);
center.setWidth("45%");
center.setStyle("padding: 5px");
Panel calPanel = new Panel();
calPanel.setStyle("margin-bottom:10px");
calPanel.setTitle("Calendar");
calPanel.setCollapsible(true);
calPanel.setBorder("normal");
center.appendChild(calPanel);
Panelchildren calContent = new Panelchildren();
calPanel.appendChild(calContent);
Groupbox gbxCalendar = new Groupbox();
vbCol2.appendChild(gbxCalendar);
gbxCalendar.appendChild(new Caption("Calendar"));
Iframe iframe = new Iframe("http://www.google.com/calendar/embed?showTitle=0&showTabs=0&height=300&wkst=1&bgcolor=%23FFFFFF&color=%232952A3");
iframe.setStyle("border-width: 0;");
iframe.setScrolling("no");
iframe.setWidth("300px");
iframe.setHeight("300px");
gbxCalendar.appendChild(iframe);
gbxCalendar.setStyle("margin-left: 5px; margin-right: 5px; margin-top: 0px; margin-bottom: 0px;");
gbxCalendar.setMold("3d");
gbxCalendar.setClosable(true);
calContent.appendChild(iframe);
final Groupbox gbxAct = new Groupbox();
vbCol2.appendChild(gbxAct);
gbxAct.appendChild(new Caption("Activities"));
gbxAct.appendChild(createActivitiesPanel());
gbxAct.setStyle("margin-left: 5px; margin-right: 5px; margin-top: 0px; margin-bottom: 0px;");
gbxAct.setMold("3d");
gbxAct.setClosable(true);
Panel actPanel = new Panel();
actPanel.setStyle("margin-bottom:10px");
actPanel.setTitle("Activities");
actPanel.setCollapsible(true);
actPanel.setBorder("normal");
center.appendChild(actPanel);
Panelchildren actContent = new Panelchildren();
actPanel.appendChild(actContent);
actContent.appendChild(createActivitiesPanel());
Borderlayout borderlayout = new Borderlayout();
homeTab.appendChild(borderlayout);
borderlayout.setWidth("100%");
borderlayout.setHeight("100%");
borderlayout.setStyle("position: absolute");
Portalchildren right = new Portalchildren();
layout.appendChild(right);
right.setWidth("25%");
right.setStyle("padding: 5px");
WPAPanel paPanel = WPAPanel.get();
if (paPanel != null) {
East east = new East();
borderlayout.appendChild(east);
east.appendChild(paPanel);
east.setWidth("205px");
Panel wpaPanel = new Panel();
wpaPanel.setStyle("margin-bottom:10px");
wpaPanel.setCollapsible(true);
wpaPanel.setBorder("normal");
wpaPanel.setTitle("Performance");
right.appendChild(wpaPanel);
Panelchildren wpaContent = new Panelchildren();
wpaPanel.appendChild(wpaContent);
wpaContent.appendChild(paPanel);
}
Center center = new Center();
borderlayout.appendChild(center);
center.appendChild(hbox);
center.setFlex(false);
center.setAutoscroll(true);
//register as 0
registerWindow(homeTab);
// enable server push for this desktop
if (!gbxAct.getDesktop().isServerPushEnabled())
gbxAct.getDesktop().enableServerPush(true);
if (!layout.getDesktop().isServerPushEnabled())
layout.getDesktop().enableServerPush(true);
updateInfo();
new Thread(new UpdateInfoRunnable(gbxAct.getDesktop())).start();
new Thread(new UpdateInfoRunnable(layout.getDesktop())).start();
}
private class UpdateInfoRunnable implements Runnable {
@ -624,7 +635,7 @@ public class Desktop extends AbstractUIPart implements MenuListener, Serializabl
DropEvent de = (DropEvent) event;
Component dragged = de.getDragged();
if(comp instanceof Groupbox)
if(comp instanceof Panelchildren)
{
if(dragged instanceof Treerow)
{

View File

@ -40,12 +40,23 @@ public final class LayoutUtils {
Clients.response("deferRenderBorderLayout", as);
}
/**
*
* @param cls
* @param target
*/
public static void addSclass(String cls, HtmlBasedComponent target) {
final String sclass = target.getSclass();
if (!hasSclass(cls, target))
target.setSclass(sclass == null ? cls : sclass + " " + cls);
}
/**
*
* @param cls
* @param target
* @return boolean
*/
public static boolean hasSclass(String cls, HtmlBasedComponent target) {
String sclass = target.getSclass();
if (sclass == null)

View File

@ -304,7 +304,7 @@ public class ValuePreference extends Window implements EventListener
box.appendChild(confirmPanel);
this.setBorder("normal");
setLayout.setSclass("grid-no-striped");
setLayout.makeNoStrip();
setLayout.setOddRowSclass("even");
} // jbInit

View File

@ -22,6 +22,7 @@ import java.sql.SQLException;
import java.util.Properties;
import java.util.logging.Level;
import org.adempiere.webui.LayoutUtils;
import org.adempiere.webui.component.Button;
import org.adempiere.webui.component.Panel;
import org.adempiere.webui.component.VerticalBox;
@ -112,14 +113,14 @@ public class ProcessModalDialog extends Window implements EventListener
div.setAlign("right");
Hbox hbox = new Hbox();
Button btn = new Button("Ok");
btn.setSclass("action-text-button");
LayoutUtils.addSclass("action-text-button", btn);
btn.setId("Ok");
btn.addEventListener(Events.ON_CLICK, this);
hbox.appendChild(btn);
btn = new Button("Cancel");
btn.setId("Cancel");
btn.setSclass("action-text-button");
LayoutUtils.addSclass("action-text-button", btn);
btn.addEventListener(Events.ON_CLICK, this);
hbox.appendChild(btn);

View File

@ -289,7 +289,7 @@ public class WArchiveViewer extends ADForm implements EventListener, ValueChange
Grid gridQuery = new Grid();
gridQuery.setWidth("500px");
gridQuery.setStyle("margin:0; padding:0;");
gridQuery.setSclass("grid-no-striped");
gridQuery.makeNoStrip();
gridQuery.setOddRowSclass("even");
Rows rows = new Rows();
@ -395,7 +395,7 @@ public class WArchiveViewer extends ADForm implements EventListener, ValueChange
Grid gridView = new Grid();
gridView.setStyle("margin:0; padding:0;");
gridView.setSclass("grid-no-striped");
gridView.makeNoStrip();
gridView.setOddRowSclass("even");
rows = new Rows();

View File

@ -107,7 +107,7 @@ public class WAttributeGrid extends ADForm implements EventListener
Grid gridSelection = new Grid();
gridSelection.setWidth("500px");
gridSelection.setStyle("margin:0; padding:0;");
gridSelection.setSclass("grid-no-striped");
gridSelection.makeNoStrip();
gridSelection.setOddRowSclass("even");
gridView.setWidth("100%");

View File

@ -22,6 +22,7 @@ import java.text.*;
import java.util.*;
import java.util.logging.*;
import org.adempiere.webui.LayoutUtils;
import org.adempiere.webui.component.Button;
import org.adempiere.webui.component.ConfirmPanel;
import org.adempiere.webui.component.Grid;
@ -267,7 +268,7 @@ public class WPayment extends Window
kApprovalLabel.setText(Msg.translate(Env.getCtx(), "VoiceAuthCode"));
kAmountLabel.setText(Msg.getMsg(Env.getCtx(), "Amount"));
kOnline.setLabel(Msg.getMsg(Env.getCtx(), "Online"));
kOnline.setSclass("action-text-button");
LayoutUtils.addSclass("action-text-button", kOnline);
kOnline.addActionListener(this);
kStatus.setText(" ");
kPanel.setId("kPanel");
@ -318,7 +319,7 @@ public class WPayment extends Window
tRoutingText.setText(Msg.translate(Env.getCtx(), "RoutingNo"));
tNumberText.setText(Msg.translate(Env.getCtx(), "AccountNo"));
tOnline.setLabel(Msg.getMsg(Env.getCtx(), "Online"));
tOnline.setSclass("action-text-button");
LayoutUtils.addSclass("action-text-button", tOnline);
tStatus.setText(" ");
tPanel.setId("tPanel");
centerPanel.appendChild(tPanel);
@ -364,7 +365,7 @@ public class WPayment extends Window
// sRoutingField.setHeight("21em");
sStatus.setText(" ");
sOnline.setLabel(Msg.getMsg(Env.getCtx(), "Online"));
sOnline.setSclass("action-text-button");
LayoutUtils.addSclass("action-text-button", sOnline);
sPanel.setId("sPanel");
centerPanel.appendChild(sPanel);
centerLayout.add(sPanel);

View File

@ -54,7 +54,7 @@ public class WPAPanel extends Panel implements EventListener
appendChild(grid);
grid.setWidth("100%");
grid.setStyle("margin:0; padding:0; position: absolute;");
grid.setSclass("grid-no-striped");
grid.makeNoStrip();
grid.setOddRowSclass("even");
Rows rows = new Rows();

View File

@ -122,7 +122,7 @@ public class WWFActivity extends ADForm implements EventListener
grid.setWidth("99%");
grid.setHeight("100%");
grid.setStyle("margin:0; padding:0; position: absolute; align: center; valign: center;");
grid.setSclass("grid-no-striped");
grid.makeNoStrip();
grid.setOddRowSclass("even");
Rows rows = new Rows();

View File

@ -15,6 +15,7 @@ package org.adempiere.webui.component;
import java.util.ArrayList;
import java.util.List;
import org.adempiere.webui.LayoutUtils;
import org.adempiere.webui.component.ADTabListModel.ADTabLabel;
import org.zkoss.zhtml.Button;
import org.zkoss.zhtml.Text;

View File

@ -68,5 +68,5 @@ public class Button extends org.zkoss.zul.Button
*/
public void addActionListener(EventListener listener) {
addEventListener(Events.ON_CLICK, listener);
}
}
}

View File

@ -13,6 +13,7 @@
package org.adempiere.webui.component;
import org.adempiere.webui.LayoutUtils;
import org.adempiere.webui.apps.AEnv;
import org.zkoss.zk.ui.event.EventListener;
import org.zkoss.zul.Div;
@ -51,7 +52,7 @@ public class Combinationbox extends Div
{
textbox = new Textbox();
button = new Button();
button.setSclass("editor-button");;
LayoutUtils.addSclass("editor-button", button);
appendChild(textbox);
appendChild(button);

View File

@ -20,6 +20,7 @@ package org.adempiere.webui.component;
import java.beans.PropertyChangeListener;
import java.beans.PropertyChangeSupport;
import org.adempiere.webui.LayoutUtils;
import org.adempiere.webui.apps.AEnv;
import org.zkoss.zk.ui.event.EventListener;
@ -65,7 +66,7 @@ public class EditorBox extends Panel
this.appendChild(txt);
this.appendChild(btn);
btn.setSclass("editor-button");
LayoutUtils.addSclass("editor-button", btn);
String style = AEnv.isFirefox2() ? "display: inline" : "display: inline-block";
style = style + ";white-space:nowrap";

View File

@ -17,6 +17,7 @@
package org.adempiere.webui.component;
import org.adempiere.webui.LayoutUtils;
import org.adempiere.webui.apps.AEnv;
import org.zkoss.zk.ui.event.EventListener;
@ -53,7 +54,7 @@ public class FilenameBox extends Panel
textbox = new Textbox();
textbox.setStyle("display: inline");
button = new Button();
button.setSclass("editor-button");
LayoutUtils.addSclass("editor-button", button);
appendChild(textbox);
appendChild(button);

View File

@ -17,6 +17,8 @@
package org.adempiere.webui.component;
import org.zkoss.zk.ui.Component;
/**
*
* @author <a href="mailto:agramdass@gmail.com">Ashley G Ramdass</a>
@ -26,10 +28,12 @@ package org.adempiere.webui.component;
public class Grid extends org.zkoss.zul.Grid
{
private static final long serialVersionUID = 1L;
private boolean noStrip = false;
public void makeNoStrip() {
setSclass("grid-no-striped");
setStyle("border: none");
setOddRowSclass("even");
noStrip = true;
}
public Rows newRows() {
@ -37,7 +41,14 @@ public class Grid extends org.zkoss.zul.Grid
appendChild(rows);
return rows;
}
public boolean insertBefore(Component child, Component refChild) {
boolean b = super.insertBefore(child, refChild);
if (b && child instanceof Rows && noStrip) {
Rows rows = (Rows) child;
rows.setNoStrip(true);
}
return b;
}
}

View File

@ -20,6 +20,7 @@ package org.adempiere.webui.component;
import java.beans.PropertyChangeListener;
import java.beans.PropertyChangeSupport;
import org.adempiere.webui.LayoutUtils;
import org.adempiere.webui.apps.AEnv;
import org.zkoss.zk.ui.event.EventListener;
@ -55,7 +56,7 @@ public class Locationbox extends Panel
txt = new Textbox();
txt.setStyle("display: inline");
btn = new Button();
btn.setSclass("editor-button");
LayoutUtils.addSclass("editor-button", btn);
this.appendChild(txt);
this.appendChild(btn);

View File

@ -17,6 +17,7 @@
package org.adempiere.webui.component;
import org.adempiere.webui.LayoutUtils;
import org.adempiere.webui.apps.AEnv;
import org.zkoss.zhtml.Text;
import org.zkoss.zk.ui.event.Event;
@ -103,37 +104,37 @@ public class Messagebox extends Window implements EventListener
btnOk.setLabel("OK");
btnOk.setImage("/images/Ok16.png");
btnOk.addEventListener(Events.ON_CLICK, this);
btnOk.setSclass("action-text-button");
LayoutUtils.addSclass("action-text-button", btnOk);
btnCancel.setLabel("Cancel");
btnCancel.setImage("/images/Cancel16.png");
btnCancel.addEventListener(Events.ON_CLICK, this);
btnCancel.setSclass("action-text-button");
LayoutUtils.addSclass("action-text-button", btnCancel);
btnYes.setLabel("Yes");
btnYes.setImage("/images/Ok16.png");
btnYes.addEventListener(Events.ON_CLICK, this);
btnYes.setSclass("action-text-button");
LayoutUtils.addSclass("action-text-button", btnYes);
btnNo.setLabel("No");
btnNo.setImage("/images/Cancel16.png");
btnNo.addEventListener(Events.ON_CLICK, this);
btnNo.setSclass("action-text-button");
LayoutUtils.addSclass("action-text-button", btnNo);
btnAbort.setLabel("Abort");
//btnAbort.setImage("/images/");
btnAbort.addEventListener(Events.ON_CLICK, this);
btnAbort.setSclass("action-text-button");
LayoutUtils.addSclass("action-text-button", btnAbort);
btnRetry.setLabel("Retry");
//btnRetry.setImage("/images/");
btnRetry.addEventListener(Events.ON_CLICK, this);
btnRetry.setSclass("action-text-button");
LayoutUtils.addSclass("action-text-button", btnRetry);
btnIgnore.setLabel("Ignore");
btnIgnore.setImage("/images/Ignore16.png");
btnIgnore.addEventListener(Events.ON_CLICK, this);
btnIgnore.setSclass("action-text-button");
LayoutUtils.addSclass("action-text-button", btnIgnore);
Panel pnlMessage = new Panel();
pnlMessage.setWidth("100%");

View File

@ -21,6 +21,7 @@ import java.math.BigDecimal;
import java.text.NumberFormat;
import java.text.ParseException;
import org.adempiere.webui.LayoutUtils;
import org.adempiere.webui.apps.AEnv;
import org.zkoss.zk.ui.event.EventListener;
import org.zkoss.zk.ui.event.Events;
@ -72,10 +73,10 @@ public class NumberBox extends Div
decimalBox.setStyle("display: inline;");
btn = new Button();
btn.setImage("/images/Calculator16.png");
btn.setImage("/images/Calculator10.png");
popup = getCalculatorPopup();
btn.setSclass("editor-button");
LayoutUtils.addSclass("editor-button", btn);
btn.setPopup(popup);
btn.setStyle("text-align: center;");
appendChild(decimalBox);

View File

@ -16,6 +16,7 @@
package org.adempiere.webui.component;
import org.adempiere.webui.LayoutUtils;
import org.adempiere.webui.apps.AEnv;
import org.zkoss.zk.ui.event.EventListener;
@ -53,7 +54,7 @@ public class PAttributebox extends Panel
textBox = new Textbox();
textBox.setStyle("display: inline");
button = new Button();
button.setSclass("editor-button");
LayoutUtils.addSclass("editor-button", button);
appendChild(textBox);
appendChild(button);

View File

@ -36,5 +36,5 @@ public class Panel extends Div
public Panel()
{
super();
}
}
}

View File

@ -17,6 +17,10 @@
package org.adempiere.webui.component;
import java.util.List;
import org.zkoss.zk.ui.Component;
/**
*
* @author <a href="mailto:agramdass@gmail.com">Ashley G Ramdass</a>
@ -26,11 +30,33 @@ package org.adempiere.webui.component;
public class Rows extends org.zkoss.zul.Rows
{
private static final long serialVersionUID = 1L;
private boolean noStrip = false;
public Row newRow() {
Row row = new Row();
Row row = new Row();
appendChild(row);
return row;
}
public void setNoStrip(boolean b) {
noStrip = b;
String style = noStrip ? "border: none" : null;
List list = getChildren();
for (Object o : list) {
if (o instanceof Row) {
Row row = (Row) o;
row.setStyle(style);
}
}
}
@Override
public boolean insertBefore(Component child, Component refChild) {
boolean b = super.insertBefore(child, refChild);
if (b && child instanceof Row && noStrip) {
Row row = (Row) child;
row.setStyle("border: none");
}
return b;
}
}

View File

@ -20,6 +20,7 @@ package org.adempiere.webui.component;
import java.beans.PropertyChangeListener;
import java.beans.PropertyChangeSupport;
import org.adempiere.webui.LayoutUtils;
import org.adempiere.webui.apps.AEnv;
import org.zkoss.zk.ui.event.EventListener;
import org.zkoss.zul.Div;
@ -52,7 +53,7 @@ public class Searchbox extends Div
txt = new Textbox();
txt.setStyle("display: inline;");
btn = new Button();
btn.setSclass("editor-button");
LayoutUtils.addSclass("editor-button", btn);
appendChild(txt);
appendChild(btn);

View File

@ -17,6 +17,7 @@
package org.adempiere.webui.component;
import org.adempiere.webui.LayoutUtils;
import org.adempiere.webui.apps.AEnv;
import org.zkoss.zk.ui.event.EventListener;
@ -53,7 +54,7 @@ public class Urlbox extends Panel
txtUrl = new Textbox();
txtUrl.setStyle("display: inline;");
btnUrl = new Button();
btnUrl.setSclass("editor-button");
LayoutUtils.addSclass("editor-button", btnUrl);
appendChild(txtUrl);
appendChild(btnUrl);

View File

@ -48,7 +48,7 @@ public class WAccountEditor extends WEditor
public WAccountEditor(GridField gridField)
{
super(new Combinationbox(), gridField);
getComponent().setButtonImage("/images/Account16.png");
getComponent().setButtonImage("/images/Account10.png");
m_mAccount = new MAccountLookup (gridField.getVO().ctx, gridField.getWindowNo());
}

View File

@ -34,7 +34,7 @@ public class WUrlEditor extends WEditor
public WUrlEditor(GridField gridField)
{
super(new Urlbox(), gridField);
getComponent().setButtonImage("/images/Online16.png");
getComponent().setButtonImage("/images/Online10.png");
}

View File

@ -26,8 +26,8 @@ import java.util.Map.Entry;
import java.util.logging.Level;
import org.adempiere.webui.LayoutUtils;
import org.adempiere.webui.apps.AEnv;
import org.adempiere.webui.component.Bandbox;
import org.adempiere.webui.component.Button;
import org.adempiere.webui.component.Datebox;
import org.adempiere.webui.component.Grid;
import org.adempiere.webui.component.GridPanel;
@ -59,8 +59,6 @@ import org.compiere.model.X_AD_FieldGroup;
import org.compiere.util.CLogger;
import org.compiere.util.Env;
import org.compiere.util.Evaluatee;
import org.zkoss.zhtml.Span;
import org.zkoss.zhtml.Text;
import org.zkoss.zk.au.out.AuFocus;
import org.zkoss.zk.ui.Component;
import org.zkoss.zk.ui.Executions;
@ -154,6 +152,7 @@ DataStatusListener, ValueChangeListener, IADTabpanel
//have problem moving the following out as css class
grid.setWidth("99%");
grid.setHeight("100%");
grid.setVflex(true);
grid.setStyle("margin:0; padding:0; position: absolute");
grid.makeNoStrip();
@ -361,8 +360,16 @@ DataStatusListener, ValueChangeListener, IADTabpanel
//can't stretch bandbox & datebox
if (!(editor.getComponent() instanceof Bandbox) &&
!(editor.getComponent() instanceof Datebox)) {
String width = "99%";
((HtmlBasedComponent)editor.getComponent()).setWidth(width);
String width = "99%";
if (editor.getComponent() instanceof Button) {
Button btn = (Button) editor.getComponent();
String zclass = btn.getZclass();
if (!zclass.contains("form-button ")) {
btn.setZclass("form-button " + zclass);
}
} else {
((HtmlBasedComponent)editor.getComponent()).setWidth(width);
}
}
}

View File

@ -53,7 +53,7 @@ public class HeaderPanel extends Panel implements EventListener
private void init()
{
this.setSclass("header");
LayoutUtils.addSclass("header", this);
UserPanel userPanel = new UserPanel();

View File

@ -21,8 +21,6 @@ import java.util.ArrayList;
import java.util.Enumeration;
import java.util.Properties;
import org.adempiere.webui.LayoutUtils;
import org.adempiere.webui.component.Panel;
import org.adempiere.webui.event.MenuListener;
import org.adempiere.webui.exception.ApplicationException;
import org.adempiere.webui.session.SessionManager;
@ -34,9 +32,9 @@ import org.zkoss.zk.ui.Component;
import org.zkoss.zk.ui.event.Event;
import org.zkoss.zk.ui.event.EventListener;
import org.zkoss.zk.ui.event.Events;
import org.zkoss.zkex.zul.Borderlayout;
import org.zkoss.zkex.zul.Center;
import org.zkoss.zkex.zul.South;
import org.zkoss.zul.Panel;
import org.zkoss.zul.Panelchildren;
import org.zkoss.zul.Toolbar;
import org.zkoss.zul.Tree;
import org.zkoss.zul.Treechildren;
import org.zkoss.zul.Treecol;
@ -81,44 +79,32 @@ public class MenuPanel extends Panel implements EventListener
{
this.setWidth("100%");
this.setHeight("100%");
this.setStyle("position:absolute;border:0;padding:0;margin:0");
menuTree = new Tree();
menuTree.setMultiple(false);
menuTree.setId("mnuMain");
menuTree.setWidth("100%");
menuTree.setHeight("100%");
menuTree.setVflex(false);
// menuTree.setHeight("96%");
menuTree.setVflex(true);
menuTree.setPageSize(-1); // Due to bug in the new paging functionality
menuTree.setStyle("border:0");
Borderlayout layout = new Borderlayout();
layout.setParent(this);
layout.setStyle("position:absolute");
layout.setWidth("100%");
layout.setHeight("100%");
South south = new South();
south.setParent(layout);
menuTree.setStyle("border: none");
pnlSearch = new MenuSearchPanel(this);
pnlSearch.setParent(south);
LayoutUtils.addSclass("menu-search", pnlSearch);
Center center = new Center();
center.setFlex(true);
center.setAutoscroll(true);
center.setParent(layout);
Toolbar toolbar = new Toolbar();
toolbar.appendChild(pnlSearch);
this.appendChild(toolbar);
menuTree.setParent(center);
Panelchildren pc = new Panelchildren();
this.appendChild(pc);
pc.appendChild(menuTree);
}
private void initMenu(MTreeNode rootNode)
{
Treecols treeCols = new Treecols();
Treecol treeCol = new Treecol();
treeCol.setLabel("Menu");
Treechildren rootTreeChildren = new Treechildren();
generateMenu(rootTreeChildren, rootNode);

View File

@ -41,7 +41,6 @@ public class SidePanel extends Panel
this.setWidth("100%");
this.setHeight("100%");
this.setStyle("position:absolute");
this.appendChild(pnlMenu);
}

View File

@ -19,6 +19,7 @@ package org.adempiere.webui.panel;
import java.util.Properties;
import org.adempiere.webui.LayoutUtils;
import org.adempiere.webui.component.Grid;
import org.adempiere.webui.component.Label;
import org.adempiere.webui.component.Messagebox;
@ -67,7 +68,7 @@ public class UserPanel extends Vbox implements EventListener
lblUserNameValue.setValue(getUserName() + "@" + getClientName() + "." + getOrgName());
lblUserNameValue.setStyle("text-align:right");
lblUserNameValue.setSclass("headerFont");
LayoutUtils.addSclass("headerFont", lblUserNameValue);
this.appendChild(lblUserNameValue);
Hbox hbox = new Hbox();
@ -75,7 +76,7 @@ public class UserPanel extends Vbox implements EventListener
role.setLabel(this.getRoleName());
role.addEventListener(Events.ON_CLICK, this);
role.setStyle("text-align:right");
role.setSclass("headerFont");
LayoutUtils.addSclass("headerFont", role);
role.setParent(hbox);
Separator sep = new Separator("vertical");
@ -85,7 +86,7 @@ public class UserPanel extends Vbox implements EventListener
logout.setLabel(Msg.getMsg(Env.getCtx(),"Logout"));
logout.addEventListener(Events.ON_CLICK, this);
logout.setStyle("text-align:right");
logout.setSclass("headerFont");
LayoutUtils.addSclass("headerFont", logout);
logout.setParent(hbox);
this.appendChild(hbox);

View File

@ -38,7 +38,7 @@ public class MultiTabPart extends AbstractUIPart
protected Component doCreatePart(Component parent)
{
tabbox = new Tabbox();
tabbox.setSclass("lite");
// tabbox.setSclass("lite");
Tabpanels tabpanels = new Tabpanels();
Tabs tabs = new Tabs();

View File

@ -53,7 +53,7 @@ public class WindowContainer extends AbstractUIPart implements EventListener
protected Component doCreatePart(Component parent)
{
tabbox = new Tabbox();
tabbox.setSclass("desktop-tb");
// tabbox.setSclass("desktop-tb");
Tabpanels tabpanels = new Tabpanels();
Tabs tabs = new Tabs();
@ -104,7 +104,7 @@ public class WindowContainer extends AbstractUIPart implements EventListener
}
tabpanel.setHeight("100%");
tabpanel.setWidth("100%");
tabpanel.setSclass("desktop-tabpanel");
tabpanel.setZclass("desktop-tabpanel");
tabpanel.setStyle("position: absolute;");
tabbox.getTabs().appendChild(tab);

View File

@ -86,7 +86,7 @@ public class AboutWindow extends Window implements EventListener {
tabbox.setParent(layout);
tabbox.setWidth("490px");
tabbox.setHeight("380px");
tabbox.setSclass("lite");
// tabbox.setSclass("lite");
Tabs tabs = new Tabs();
tabs.setParent(tabbox);
tabPanels = new Tabpanels();

View File

@ -284,7 +284,7 @@ public final class WAccountDialog extends Window
m_adTabPanel.init(null, m_WindowNo, m_mTab, null);
// Prepare Parameter
parameterLayout.setSclass("grid-no-striped");
parameterLayout.makeNoStrip();
parameterLayout.setOddRowSclass("even");
parameterLayout.setParent(parameterPanel);
parameterLayout.setStyle("background-color: transparent;");

View File

@ -186,7 +186,7 @@ public class WEMailDialog extends Window implements EventListener, ValueChangeLi
Grid grid = new Grid();
grid.setWidth("480px");
grid.setStyle("margin:0; padding:0; position: absolute; align: center; valign: center;");
grid.setSclass("grid-no-striped");
grid.makeNoStrip();
grid.setOddRowSclass("even");
Rows rows = new Rows();

View File

@ -191,11 +191,19 @@ Copyright (C) 2005 Potix Corporation. All Rights Reserved.
</function>
<function>
<name>getProperty</name>
<function-class>java.lang.System</function-class>
<name>property</name><!-- since 3.5.1 -->
<function-class>org.zkoss.lang.Library</function-class>
<function-signature>java.lang.String getProperty(java.lang.String)</function-signature>
<description>
Returns the system property.
Returns the library property.
</description>
</function>
<function><!-- backward compatible -->
<name>getProperty</name>
<function-class>org.zkoss.lang.Library</function-class>
<function-signature>java.lang.String getProperty(java.lang.String)</function-signature>
<description>
Returns the library property.
</description>
</function>
@ -276,7 +284,7 @@ Copyright (C) 2005 Potix Corporation. All Rights Reserved.
<!-- -->
<function>
<name>attr</name>
<function-class>org.zkoss.web.fn.XMLFns</function-class>
<function-class>org.zkoss.xel.fn.XmlFns</function-class>
<function-signature>
java.lang.String attr(java.lang.String, java.lang.Object)
</function-signature>
@ -325,6 +333,24 @@ Copyright (C) 2005 Potix Corporation. All Rights Reserved.
</description>
</function>
<function>
<name>browser</name>
<function-class>org.zkoss.web.fn.ServletFns</function-class>
<function-signature>
boolean isBrowser(java.lang.String)
</function-signature>
<description>
Whether the current request is coming from the browser of the specified
type.
@param type the type of the browser.
Allowed values include "robot", "ie", "ie6", "ie6-", "ie7", "ie8",
"ie7-", "gecko", "gecko2", "gecko3", "gecko2-",
"opara", "safari",
"mil", "hil", "mil-".<br/>
Note: "ie6-" means Internet Explorer 6 only; not Internet Explorer 7
or other.
</description>
</function>
<function>
<name>isExplorer</name>
<function-class>org.zkoss.web.fn.ServletFns</function-class>
@ -356,6 +382,17 @@ Copyright (C) 2005 Potix Corporation. All Rights Reserved.
such as Mozilla, Firefox and Camino.
</description>
</function>
<function>
<name>isGecko3</name>
<function-class>org.zkoss.web.fn.ServletFns</function-class>
<function-signature>
boolean isGecko3()
</function-signature>
<description>
Whether the current request is coming from a Gecko 3-based browser,
such as Firefox 3.
</description>
</function>
<function>
<name>isSafari</name>
<function-class>org.zkoss.web.fn.ServletFns</function-class>

View File

@ -58,7 +58,7 @@ Copyright (C) 2005 Potix Corporation. All Rights Reserved.
</function-signature>
<description>
Returns HTML tags to include all JavaScripts used by all languages.
The argument is ignored (since 3.1.0; reserved for backward compatible).
The argument is ignored (since 3.5.0; reserved for backward compatible).
</description>
</function>
<function>
@ -171,4 +171,37 @@ Copyright (C) 2005 Potix Corporation. All Rights Reserved.
Returns the attributes to render a page.
</description>
</function>
<function>
<name>outZkHtmlTags</name>
<function-class>org.zkoss.zk.fn.ZkFns</function-class>
<function-signature>
java.lang.String outZkHtmlTags()
</function-signature>
<description>
Returns the desktop info to render a desktop.
It is required only if outPageAttrs might not be called
</description>
</function>
<function>
<name>noCSSAttrs</name>
<function-class>org.zkoss.zk.fn.ZkFns</function-class>
<function-signature>
java.lang.String noCSSAttrs(java.lang.String)
</function-signature>
<description>
Removes the class and style attributes from the specified one.
</description>
</function>
<function>
<name>outCSSAttrs</name>
<function-class>org.zkoss.zk.fn.ZkFns</function-class>
<function-signature>
java.lang.String outCSSAttrs(java.lang.String)
</function-signature>
<description>
Returns only the class and style attributes from the specified one.
</description>
</function>
</taglib>

View File

@ -79,5 +79,36 @@ Copyright (C) 2006 Potix Corporation. All Rights Reserved.
<description>
Resets the stripe CSS for each row.
</description>
</function>
</function>
<function>
<name>shallVisitTree</name>
<function-class>org.zkoss.zul.fn.ZulFns</function-class>
<function-signature>
boolean shallVisitTree(org.zkoss.zul.Tree, org.zkoss.zk.ui.Component)
</function-signature>
<description>
Returns whether the specified tree should be visited.
</description>
</function>
<function>
<name>shallRenderTree</name>
<function-class>org.zkoss.zul.fn.ZulFns</function-class>
<function-signature>
boolean shallRenderTree(org.zkoss.zul.Tree)
</function-signature>
<description>
Returns whether the specified tree shall be rendered.
</description>
</function>
<function>
<name>clearTreeRenderInfo</name>
<function-class>org.zkoss.zul.fn.ZulFns</function-class>
<function-signature>
void clearTreeRenderInfo(org.zkoss.zul.Tree)
</function-signature>
<description>
Clears up the info stored in attributes that are used to render
a tree in the paging mold.
</description>
</function>
</taglib>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -62,10 +62,9 @@ html,body {
}
.editor-button {
height: 22px;
--height: 22px;
width: 26px;
padding: 0px;
display: inline;
}
.editor-button img {
@ -286,3 +285,7 @@ tr.tab-desktop-tb-m {
.status-border {
border: solid 1px #9CBDFF;
}
.form-button {
width: 99%;
}