, WTableMode
}
messageDiv.appendChild(logMessageTable);
}
- }
+
+}
diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WInOutGen.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WInOutGen.java
index 9f9db9b95d..e83d8413da 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WInOutGen.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WInOutGen.java
@@ -16,6 +16,10 @@ package org.adempiere.webui.apps.form;
import java.util.ArrayList;
import java.util.logging.Level;
+import org.adempiere.webui.ClientInfo;
+import org.adempiere.webui.LayoutUtils;
+import org.adempiere.webui.component.Column;
+import org.adempiere.webui.component.Columns;
import org.adempiere.webui.component.Label;
import org.adempiere.webui.component.Listbox;
import org.adempiere.webui.component.ListboxFactory;
@@ -38,10 +42,11 @@ import org.compiere.util.DisplayType;
import org.compiere.util.Env;
import org.compiere.util.KeyNamePair;
import org.compiere.util.Msg;
+import org.zkoss.zk.ui.Component;
import org.zkoss.zk.ui.WrongValueException;
import org.zkoss.zk.ui.event.Event;
import org.zkoss.zk.ui.event.EventListener;
-import org.zkoss.zul.Space;
+import org.zkoss.zul.North;
/**
* Generate Shipment (manual) view class
@@ -63,6 +68,8 @@ public class WInOutGen extends InOutGen implements IFormController, EventListene
private Label lDocAction = new Label();
private WTableDirEditor docAction;
+ private int noOfColumn;
+
public WInOutGen()
{
log.info("");
@@ -82,6 +89,8 @@ public class WInOutGen extends InOutGen implements IFormController, EventListene
{
log.log(Level.SEVERE, "init", ex);
}
+
+ ClientInfo.onClientInfo(form, this::onClientInfo);
} // init
/**
@@ -97,30 +106,54 @@ public class WInOutGen extends InOutGen implements IFormController, EventListene
*/
void zkInit() throws Exception
{
+ setupColumns();
+
lBPartner.setText(Msg.translate(Env.getCtx(), "C_BPartner_ID"));
Row row = form.getParameterPanel().newRows().newRow();
row.appendCellChild(lWarehouse.rightAlign());
ZKUpdateUtil.setHflex(fWarehouse.getComponent(), "true");
row.appendCellChild(fWarehouse.getComponent());
- row.appendCellChild(new Space());
row.appendCellChild(lBPartner.rightAlign());
ZKUpdateUtil.setHflex(fBPartner.getComponent(), "true");
- row.appendCellChild(fBPartner.getComponent());
- row.appendCellChild(new Space());
+ row.appendCellChild(fBPartner.getComponent());
row = new Row();
form.getParameterPanel().getRows().appendChild(row);
row.appendCellChild(lDocType.rightAlign());
ZKUpdateUtil.setHflex(cmbDocType, "true");
row.appendCellChild(cmbDocType);
- row.appendCellChild(new Space());
row.appendCellChild(lDocAction.rightAlign());
- ZKUpdateUtil.setHflex(docAction.getComponent(), "true");
+ ZKUpdateUtil.setHflex(docAction.getComponent(), "true");
row.appendCellChild(docAction.getComponent());
- row.appendCellChild(new Space());
+ if (noOfColumn < 6)
+ LayoutUtils.compactTo(form.getParameterPanel(), noOfColumn);
+ else
+ LayoutUtils.expandTo(form.getParameterPanel(), noOfColumn, true);
} // jbInit
+ protected void setupColumns() {
+ noOfColumn = 6;
+ if (ClientInfo.maxWidth(ClientInfo.MEDIUM_WIDTH-1))
+ {
+ if (ClientInfo.maxWidth(ClientInfo.SMALL_WIDTH-1))
+ noOfColumn = 2;
+ else
+ noOfColumn = 4;
+ }
+ if (noOfColumn == 2)
+ {
+ Columns columns = new Columns();
+ Column column = new Column();
+ column.setWidth("35%");
+ columns.appendChild(column);
+ column = new Column();
+ column.setWidth("65%");
+ columns.appendChild(column);
+ form.getParameterPanel().appendChild(columns);
+ }
+ }
+
/**
* Fill Picks.
* Column_ID from C_Order
@@ -165,10 +198,44 @@ public class WInOutGen extends InOutGen implements IFormController, EventListene
{
KeyNamePair docTypeKNPair = cmbDocType.getSelectedItem().toKeyNamePair();
executeQuery(docTypeKNPair, form.getMiniTable());
+ if (ClientInfo.maxHeight(ClientInfo.SMALL_HEIGHT-1))
+ {
+ Component comp = form.getParameterPanel().getParent();
+ if (comp instanceof North)
+ ((North)comp).setOpen(false);
+ }
form.getMiniTable().repaint();
form.invalidate();
} // executeQuery
+ protected void onClientInfo()
+ {
+ if (ClientInfo.isMobile() && form.getPage() != null)
+ {
+ if (noOfColumn > 0 && form.getParameterPanel().getRows() != null)
+ {
+ int t = 6;
+ if (ClientInfo.maxWidth(ClientInfo.MEDIUM_WIDTH-1))
+ {
+ if (ClientInfo.maxWidth(ClientInfo.SMALL_WIDTH-1))
+ t = 2;
+ else
+ t = 4;
+ }
+ if (t != noOfColumn)
+ {
+ form.getParameterPanel().getRows().detach();
+ if (form.getParameterPanel().getColumns() != null)
+ form.getParameterPanel().getColumns().detach();
+ try {
+ zkInit();
+ form.invalidate();
+ } catch (Exception e1) {}
+ }
+ }
+ }
+ }
+
/**
* Action Listener
* @param e event
diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WInvoiceGen.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WInvoiceGen.java
index ccc0186023..ecb1aa09af 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WInvoiceGen.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WInvoiceGen.java
@@ -16,6 +16,10 @@ package org.adempiere.webui.apps.form;
import java.util.ArrayList;
import java.util.logging.Level;
+import org.adempiere.webui.ClientInfo;
+import org.adempiere.webui.LayoutUtils;
+import org.adempiere.webui.component.Column;
+import org.adempiere.webui.component.Columns;
import org.adempiere.webui.component.Label;
import org.adempiere.webui.component.Listbox;
import org.adempiere.webui.component.ListboxFactory;
@@ -38,10 +42,11 @@ import org.compiere.util.DisplayType;
import org.compiere.util.Env;
import org.compiere.util.KeyNamePair;
import org.compiere.util.Msg;
+import org.zkoss.zk.ui.Component;
import org.zkoss.zk.ui.WrongValueException;
import org.zkoss.zk.ui.event.Event;
import org.zkoss.zk.ui.event.EventListener;
-import org.zkoss.zul.Space;
+import org.zkoss.zul.North;
/**
* Generate Invoice (manual) view class
@@ -63,11 +68,13 @@ public class WInvoiceGen extends InvoiceGen implements IFormController, EventLis
private Label lDocAction = new Label();
private WTableDirEditor docAction;
+ private int noOfColumn;
+
public WInvoiceGen()
{
log.info("");
- form = new WGenForm(this);
+ form = new WGenForm(this);
Env.setContext(Env.getCtx(), form.getWindowNo(), "IsSOTrx", "Y");
try
@@ -82,6 +89,8 @@ public class WInvoiceGen extends InvoiceGen implements IFormController, EventLis
{
log.log(Level.SEVERE, "init", ex);
}
+
+ ClientInfo.onClientInfo(form, this::onClientInfo);
} // init
/**
@@ -97,6 +106,8 @@ public class WInvoiceGen extends InvoiceGen implements IFormController, EventLis
*/
void zkInit() throws Exception
{
+ setupColumns();
+
lOrg.setText(Msg.translate(Env.getCtx(), "AD_Org_ID"));
lBPartner.setText(Msg.translate(Env.getCtx(), "C_BPartner_ID"));
@@ -104,24 +115,46 @@ public class WInvoiceGen extends InvoiceGen implements IFormController, EventLis
row.appendCellChild(lOrg.rightAlign());
ZKUpdateUtil.setHflex(fOrg.getComponent(), "true");
row.appendCellChild(fOrg.getComponent());
- row.appendCellChild(new Space());
row.appendCellChild(lBPartner.rightAlign());
ZKUpdateUtil.setHflex(fBPartner.getComponent(), "true");
row.appendCellChild(fBPartner.getComponent());
- row.appendCellChild(new Space());
row = new Row();
form.getParameterPanel().getRows().appendChild(row);
row.appendCellChild(lDocType.rightAlign());
ZKUpdateUtil.setHflex(cmbDocType, "true");
row.appendCellChild(cmbDocType);
- row.appendCellChild(new Space());
row.appendCellChild(lDocAction.rightAlign());
ZKUpdateUtil.setHflex(docAction.getComponent(), "true");
row.appendCellChild(docAction.getComponent());
- row.appendCellChild(new Space());
+ if (noOfColumn < 6)
+ LayoutUtils.compactTo(form.getParameterPanel(), noOfColumn);
+ else
+ LayoutUtils.expandTo(form.getParameterPanel(), noOfColumn, true);
} // jbInit
+ protected void setupColumns() {
+ noOfColumn = 6;
+ if (ClientInfo.maxWidth(ClientInfo.MEDIUM_WIDTH-1))
+ {
+ if (ClientInfo.maxWidth(ClientInfo.SMALL_WIDTH-1))
+ noOfColumn = 2;
+ else
+ noOfColumn = 4;
+ }
+ if (noOfColumn == 2)
+ {
+ Columns columns = new Columns();
+ Column column = new Column();
+ column.setWidth("35%");
+ columns.appendChild(column);
+ column = new Column();
+ column.setWidth("65%");
+ columns.appendChild(column);
+ form.getParameterPanel().appendChild(columns);
+ }
+ }
+
/**
* Fill Picks.
* Column_ID from C_Order
@@ -164,10 +197,44 @@ public class WInvoiceGen extends InvoiceGen implements IFormController, EventLis
{
KeyNamePair docTypeKNPair = cmbDocType.getSelectedItem().toKeyNamePair();
executeQuery(docTypeKNPair, form.getMiniTable());
+ if (ClientInfo.maxHeight(ClientInfo.SMALL_HEIGHT-1))
+ {
+ Component comp = form.getParameterPanel().getParent();
+ if (comp instanceof North)
+ ((North)comp).setOpen(false);
+ }
form.getMiniTable().repaint();
form.invalidate();
} // executeQuery
+ protected void onClientInfo()
+ {
+ if (ClientInfo.isMobile() && form.getPage() != null)
+ {
+ if (noOfColumn > 0 && form.getParameterPanel().getRows() != null)
+ {
+ int t = 6;
+ if (ClientInfo.maxWidth(ClientInfo.MEDIUM_WIDTH-1))
+ {
+ if (ClientInfo.maxWidth(ClientInfo.SMALL_WIDTH-1))
+ t = 2;
+ else
+ t = 4;
+ }
+ if (t != noOfColumn)
+ {
+ form.getParameterPanel().getRows().detach();
+ if (form.getParameterPanel().getColumns() != null)
+ form.getParameterPanel().getColumns().detach();
+ try {
+ zkInit();
+ form.invalidate();
+ } catch (Exception e1) {}
+ }
+ }
+ }
+ }
+
/**
* Action Listener
* @param e event
diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WMatch.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WMatch.java
index c9039b3017..2088c0b1c3 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WMatch.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WMatch.java
@@ -16,14 +16,21 @@
*****************************************************************************/
package org.adempiere.webui.apps.form;
+import static org.adempiere.webui.ClientInfo.MEDIUM_WIDTH;
+import static org.adempiere.webui.ClientInfo.SMALL_WIDTH;
+import static org.adempiere.webui.ClientInfo.maxWidth;
+
import java.math.BigDecimal;
import java.sql.Timestamp;
import java.util.logging.Level;
+import org.adempiere.webui.ClientInfo;
import org.adempiere.webui.LayoutUtils;
import org.adempiere.webui.apps.AEnv;
import org.adempiere.webui.component.Button;
import org.adempiere.webui.component.Checkbox;
+import org.adempiere.webui.component.Column;
+import org.adempiere.webui.component.Columns;
import org.adempiere.webui.component.Grid;
import org.adempiere.webui.component.GridFactory;
import org.adempiere.webui.component.Label;
@@ -63,6 +70,7 @@ import org.zkoss.zul.North;
import org.zkoss.zul.South;
import org.zkoss.zul.Separator;
import org.zkoss.zul.Space;
+import org.zkoss.zul.Vlayout;
/**
* Manual Matching
@@ -110,6 +118,11 @@ public class WMatch extends Match
{
log.log(Level.SEVERE, "", e);
}
+
+ if (ClientInfo.isMobile())
+ {
+ ClientInfo.onClientInfo(form, this::onClientInfo);
+ }
} // init
/** Window No */
@@ -182,7 +195,8 @@ public class WMatch extends Match
private Checkbox sameProduct = new Checkbox();
private Checkbox sameBPartner = new Checkbox();
private Checkbox sameQty = new Checkbox();
-
+ private int noOfColumn;
+
/**
* Static Init.
*
@@ -199,10 +213,11 @@ public class WMatch extends Match
private void zkInit() throws Exception
{
form.appendChild(mainPanel);
- mainPanel.setStyle("width: 99%; height: 100%; padding: 0; margin: 0");
+ mainPanel.setStyle("width: 100%; height: 100%; padding: 0; margin: 0; overflow: auto;");
mainPanel.appendChild(mainLayout);
ZKUpdateUtil.setWidth(mainLayout, "100%");
ZKUpdateUtil.setHeight(mainLayout, "100%");
+ mainLayout.setStyle("min-height: 750px");
northPanel.appendChild(northLayout);
matchFromLabel.setText(Msg.translate(Env.getCtx(), "MatchFrom"));
matchToLabel.setText(Msg.translate(Env.getCtx(), "MatchTo"));
@@ -225,9 +240,64 @@ public class WMatch extends Match
sameQty.setSelected(false);
sameQty.setText(Msg.translate(Env.getCtx(), "SameQty"));
+ // north - parameters
North north = new North();
mainLayout.appendChild(north);
north.appendChild(northPanel);
+ north.setCollapsible(true);
+ north.setSplittable(true);
+
+ layoutParameterAndSummary();
+
+ // center - match from and match to list
+ Center center = new Center();
+ center.setAutoscroll(true);
+ mainLayout.appendChild(center);
+ center.appendChild(centerPanel);
+ ZKUpdateUtil.setHflex(centerPanel, "1");
+ ZKUpdateUtil.setVflex(centerPanel, "1");
+ ZKUpdateUtil.setWidth(centerLayout, "100%");
+ ZKUpdateUtil.setHeight(centerLayout, "100%");
+ north = new North();
+ centerLayout.appendChild(north);
+ north.setStyle("border: none");
+ Panel p = new Panel();
+ p.appendChild(xMatchedBorder);
+ p.appendChild(xMatchedTable);
+ ZKUpdateUtil.setWidth(xMatchedTable, "100%");
+ p.setStyle("width: 100%; height: 100%; padding: 0; margin: 0");
+ north.appendChild(p);
+ ZKUpdateUtil.setHeight(north, "45%");
+ north.setSplittable(true);
+ north.setCollapsible(true);
+
+ center = new Center();
+ centerLayout.appendChild(center);
+ center.setBorder("none");
+ Vlayout vlayout = new Vlayout();
+ vlayout.setVflex("1");
+ vlayout.setHflex("1");
+ center.appendChild(vlayout);
+ ZKUpdateUtil.setVflex(xPanel, "1");
+ ZKUpdateUtil.setHflex(xPanel, "1");
+ xPanel.appendChild(sameBPartner);
+ xPanel.appendChild(new Space());
+ xPanel.appendChild(sameProduct);
+ xPanel.appendChild(new Space());
+ xPanel.appendChild(sameQty);
+ ZKUpdateUtil.setVflex(xPanel, "min");
+ xPanel.appendChild(new Separator());
+ vlayout.appendChild(xPanel);
+ vlayout.appendChild(xMatchedToBorder);
+ ZKUpdateUtil.setWidth(xMatchedToTable, "100%");
+ vlayout.appendChild(xMatchedToTable);
+ ZKUpdateUtil.setVflex(xMatchedTable, true);
+
+ centerPanel.setStyle("min-height: 300px;");
+ } // jbInit
+
+ protected void layoutParameterAndSummary() {
+ setupParameterColumns();
Rows rows = northLayout.newRows();
Row row = rows.newRow();
@@ -235,27 +305,31 @@ public class WMatch extends Match
row.appendChild(matchFrom);
row.appendChild(matchToLabel.rightAlign());
row.appendChild(matchTo);
- row.appendChild(new Space());
row = rows.newRow();
row.appendCellChild(matchModeLabel.rightAlign(), 1);
row.appendCellChild(matchMode, 1);
- row.appendCellChild(new Space(), 3);
row = rows.newRow();
row.appendChild(onlyVendorLabel.rightAlign());
row.appendChild(onlyVendor.getComponent());
row.appendChild(onlyProductLabel.rightAlign());
- row.appendChild(onlyProduct.getComponent());
- row.appendChild(new Space());
+ row.appendChild(onlyProduct.getComponent());
row = rows.newRow();
row.appendChild(dateFromLabel.rightAlign());
row.appendChild(dateFrom.getComponent());
row.appendChild(dateToLabel.rightAlign());
row.appendChild(dateTo.getComponent());
- row.appendChild(bSearch);
+ bSearch.setStyle("float: right");
+ int r = row.getChildren().size() % noOfColumn;
+ row.appendCellChild(bSearch, noOfColumn-r);
+ if (noOfColumn < 6)
+ LayoutUtils.compactTo(northLayout, noOfColumn);
+ else
+ LayoutUtils.expandTo(northLayout, noOfColumn, true);
+ // south - summary
South south = new South();
mainLayout.appendChild(south);
south.appendChild(southPanel);
@@ -269,51 +343,48 @@ public class WMatch extends Match
row.appendChild(xMatchedTo.getComponent());
row.appendChild(differenceLabel.rightAlign());
row.appendChild(difference.getComponent());
- row.appendChild(bProcess);
- Center center = new Center();
- mainLayout.appendChild(center);
- center.appendChild(centerPanel);
- ZKUpdateUtil.setHflex(centerPanel, "1");
- ZKUpdateUtil.setVflex(centerPanel, "1");
- ZKUpdateUtil.setWidth(centerLayout, "100%");
- ZKUpdateUtil.setHeight(centerLayout, "100%");
- north = new North();
- centerLayout.appendChild(north);
- north.setStyle("border: none");
- Panel p = new Panel();
- p.appendChild(xMatchedBorder);
- p.appendChild(xMatchedTable);
- ZKUpdateUtil.setWidth(xMatchedTable, "99%");
- //ZKUpdateUtil.setHeight(xMatchedTable, "85%");
- p.setStyle("width: 100%; height: 100%; padding: 0; margin: 0");
- north.appendChild(p);
- ZKUpdateUtil.setHeight(north, "44%");
-
- south = new South();
- centerLayout.appendChild(south);
- south.setStyle("border: none");
- ZKUpdateUtil.setWidth(xMatchedToTable, "99%");
- //ZKUpdateUtil.setHeight(xMatchedToTable, "99%");
- south.appendChild(xMatchedToTable);
- ZKUpdateUtil.setHeight(south, "44%");
-
- center = new Center();
- centerLayout.appendChild(center);
- center.setStyle("border: none");
-// ZKUpdateUtil.setHeight(center, "6%");
- center.appendChild(xPanel);
- ZKUpdateUtil.setVflex(xPanel, "1");
- ZKUpdateUtil.setHflex(xPanel, "1");
- xPanel.appendChild(sameBPartner);
- xPanel.appendChild(new Space());
- xPanel.appendChild(sameProduct);
- xPanel.appendChild(new Space());
- xPanel.appendChild(sameQty);
- ZKUpdateUtil.setHeight(xPanel, "50px");
- xPanel.appendChild(new Separator());
- xPanel.appendChild(xMatchedToBorder);
- } // jbInit
+ row = rows.newRow();
+ row.appendCellChild(bProcess, noOfColumn);
+ bProcess.setStyle("float: right");
+ if (noOfColumn < 6)
+ LayoutUtils.compactTo(southLayout, noOfColumn);
+ }
+
+ protected void setupParameterColumns() {
+ noOfColumn = 6;
+ if (maxWidth(MEDIUM_WIDTH-1))
+ {
+ if (maxWidth(SMALL_WIDTH-1))
+ noOfColumn = 2;
+ else
+ noOfColumn = 4;
+ }
+ Columns columns = new Columns();
+ Column column = new Column();
+ column.setWidth(noOfColumn == 2 ? "35%" : (noOfColumn == 4 ? "15%" : "10%"));
+ columns.appendChild(column);
+ column = new Column();
+ column.setWidth(noOfColumn == 2 ? "65%" : "35%");
+ columns.appendChild(column);
+ if (noOfColumn > 2) {
+ column = new Column();
+ column.setWidth(noOfColumn == 4 ? "15%" : "10%");
+ columns.appendChild(column);
+ column = new Column();
+ column.setWidth("35%");
+ columns.appendChild(column);
+ }
+ if (noOfColumn == 6) {
+ column = new Column();
+ column.setWidth("5%");
+ columns.appendChild(column);
+ column = new Column();
+ column.setWidth("5%");
+ columns.appendChild(column);
+ }
+ northLayout.appendChild(columns);
+ }
/**
* Dynamic Init.
@@ -373,6 +444,36 @@ public class WMatch extends Match
} // dispose
+ protected void onClientInfo()
+ {
+ if (ClientInfo.isMobile() && form.getPage() != null)
+ {
+ if (noOfColumn > 0 && northLayout.getRows() != null)
+ {
+ int t = 6;
+ if (maxWidth(MEDIUM_WIDTH-1))
+ {
+ if (maxWidth(SMALL_WIDTH-1))
+ t = 2;
+ else
+ t = 4;
+ }
+ if (t != noOfColumn)
+ {
+ northLayout.getRows().detach();
+ if (northLayout.getColumns() != null)
+ northLayout.getColumns().detach();
+ if (mainLayout.getSouth() != null)
+ mainLayout.getSouth().detach();
+ if (southLayout.getRows() != null)
+ southLayout.getRows().detach();
+ layoutParameterAndSummary();
+ form.invalidate();
+ }
+ }
+ }
+ }
+
/**************************************************************************
* Action Listener
* @param e event
diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPayPrint.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPayPrint.java
index 692eda2558..89b769bf6f 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPayPrint.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPayPrint.java
@@ -25,8 +25,12 @@ import java.util.List;
import java.util.logging.Level;
import org.adempiere.util.Callback;
+import org.adempiere.webui.ClientInfo;
+import org.adempiere.webui.LayoutUtils;
import org.adempiere.webui.apps.AEnv;
import org.adempiere.webui.component.Button;
+import org.adempiere.webui.component.Column;
+import org.adempiere.webui.component.Columns;
import org.adempiere.webui.component.ConfirmPanel;
import org.adempiere.webui.component.Grid;
import org.adempiere.webui.component.GridFactory;
@@ -104,6 +108,7 @@ public class WPayPrint extends PayPrint implements IFormController, EventListene
Center center = new Center();
contentLayout.appendChild(center);
center.appendChild(centerPanel);
+ center.setAutoscroll(true);
South south = new South();
south.setStyle("border: none");
contentLayout.appendChild(south);
@@ -212,6 +217,19 @@ public class WPayPrint extends PayPrint implements IFormController, EventListene
row.appendChild(lSumPayments.rightAlign()) ;
row.appendChild(fSumPayments.getComponent()) ;
+ if (ClientInfo.maxWidth(ClientInfo.MEDIUM_WIDTH))
+ {
+ Columns cols = new Columns();
+ centerLayout.appendChild(cols);
+ Column col = new Column();
+ col.setHflex("min");
+ cols.appendChild(col);
+ col = new Column();
+ col.setHflex("1");
+ cols.appendChild(col);
+ LayoutUtils.compactTo(centerLayout, 2);
+ }
+
southPanel.getButton(ConfirmPanel.A_OK).setVisible(false);
bExport.setDisabled(true);
bPrint.setDisabled(true);
diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaySelect.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaySelect.java
index 53a7f31b4f..d61ddaa980 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaySelect.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaySelect.java
@@ -28,10 +28,14 @@ import java.util.logging.Level;
import org.adempiere.util.Callback;
import org.adempiere.util.IProcessUI;
+import org.adempiere.webui.ClientInfo;
+import org.adempiere.webui.LayoutUtils;
import org.adempiere.webui.apps.AEnv;
import org.adempiere.webui.apps.ProcessModalDialog;
import org.adempiere.webui.component.Button;
import org.adempiere.webui.component.Checkbox;
+import org.adempiere.webui.component.Column;
+import org.adempiere.webui.component.Columns;
import org.adempiere.webui.component.ConfirmPanel;
import org.adempiere.webui.component.Grid;
import org.adempiere.webui.component.GridFactory;
@@ -160,6 +164,7 @@ public class WPaySelect extends PaySelect
//
labelBankAccount.setText(Msg.translate(Env.getCtx(), "C_BankAccount_ID"));
fieldBankAccount.addActionListener(this);
+ ZKUpdateUtil.setHflex(fieldBankAccount, "1");
labelBPartner.setText(Msg.translate(Env.getCtx(), "C_BPartner_ID"));
fieldBPartner.addActionListener(this);
bRefresh.addActionListener(this);
@@ -168,6 +173,7 @@ public class WPaySelect extends PaySelect
fieldPaymentRule.addActionListener(this);
labelDtype.setText(Msg.translate(Env.getCtx(), "C_DocType_ID"));
fieldDtype.addActionListener(this);
+ ZKUpdateUtil.setHflex(fieldDtype, "1");
//
labelBankBalance.setText(Msg.translate(Env.getCtx(), "CurrentBalance"));
labelBalance.setText("0");
@@ -176,6 +182,7 @@ public class WPaySelect extends PaySelect
dataStatus.setPre(true);
onlyDue.addActionListener(this);
fieldPayDate.addValueChangeListener(this);
+ ZKUpdateUtil.setHflex(fieldPayDate.getComponent(), "1");
//IDEMPIERE-2657, pritesh shah
bGenerate.setEnabled(false);
@@ -183,14 +190,44 @@ public class WPaySelect extends PaySelect
bCancel.addActionListener(this);
//
North north = new North();
- north.setStyle("border: none");
+ north.setStyle("border: none; max-height: 60%;");
mainLayout.appendChild(north);
- north.appendChild(parameterPanel);
+ north.appendChild(parameterPanel);
+ north.setSplittable(true);
+ north.setCollapsible(true);
+ north.setAutoscroll(true);
+ LayoutUtils.addSlideSclass(north);
+
+ if (ClientInfo.maxWidth(ClientInfo.MEDIUM_WIDTH-1))
+ {
+ Columns cols = new Columns();
+ parameterLayout.appendChild(cols);
+ Column col = new Column();
+ col.setHflex("min");
+ cols.appendChild(col);
+ col = new Column();
+ col.setHflex("1");
+ cols.appendChild(col);
+ col = new Column();
+ col.setHflex("min");
+ cols.appendChild(col);
+ if (ClientInfo.minWidth(ClientInfo.SMALL_WIDTH))
+ {
+ col = new Column();
+ col.setWidth("20%");
+ cols.appendChild(col);
+ }
+ }
Rows rows = parameterLayout.newRows();
Row row = rows.newRow();
row.appendChild(labelBankAccount.rightAlign());
row.appendChild(fieldBankAccount);
+ if (ClientInfo.maxWidth(ClientInfo.MEDIUM_WIDTH-1))
+ {
+ row.appendChild(new Space());
+ row = rows.newRow();
+ }
row.appendChild(labelBankBalance.rightAlign());
Panel balancePanel = new Panel();
balancePanel.appendChild(labelCurrency);
@@ -201,7 +238,12 @@ public class WPaySelect extends PaySelect
row = rows.newRow();
row.appendChild(labelBPartner.rightAlign());
row.appendChild(fieldBPartner);
- row.appendChild(new Space());
+ if (ClientInfo.maxWidth(ClientInfo.MEDIUM_WIDTH-1))
+ {
+ row.appendChild(new Space());
+ row = rows.newRow();
+ }
+ row.appendChild(new Space());
row.appendChild(onlyDue);
row.appendChild(new Space());
@@ -209,15 +251,25 @@ public class WPaySelect extends PaySelect
row.appendChild(labelDtype.rightAlign());
row.appendChild(fieldDtype);
row.appendChild(new Space());
- row.appendChild(new Space());
- row.appendChild(new Space());
+ if (ClientInfo.minWidth(ClientInfo.MEDIUM_WIDTH))
+ {
+ row.appendChild(new Space());
+ row.appendChild(new Space());
+ }
row = rows.newRow();
row.appendChild(labelPayDate.rightAlign());
row.appendChild(fieldPayDate.getComponent());
+ if (ClientInfo.maxWidth(ClientInfo.MEDIUM_WIDTH-1))
+ {
+ row.appendChild(new Space());
+ row = rows.newRow();
+ }
row.appendChild(labelPaymentRule.rightAlign());
row.appendChild(fieldPaymentRule);
row.appendChild(bRefresh);
+ if (ClientInfo.minWidth(ClientInfo.SMALL_WIDTH))
+ LayoutUtils.expandTo(parameterLayout, 4, true);
South south = new South();
south.setStyle("border: none");
@@ -318,6 +370,11 @@ public class WPaySelect extends PaySelect
loadTableInfo(bi, payDate, paymentRule, onlyDue.isSelected(), bpartner, docType, miniTable);
calculateSelection();
+ if (ClientInfo.maxHeight(ClientInfo.MEDIUM_HEIGHT-1))
+ {
+ mainLayout.getNorth().setOpen(false);
+ LayoutUtils.addSclass("slide", mainLayout.getNorth());
+ }
} // loadTableInfo
/**
diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormWindow.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormWindow.java
index c07b83c446..d77afb30ce 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormWindow.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPaymentFormWindow.java
@@ -19,6 +19,7 @@ import org.adempiere.webui.component.ConfirmPanel;
import org.adempiere.webui.component.Panel;
import org.adempiere.webui.component.Window;
import org.adempiere.webui.event.DialogEvents;
+import org.adempiere.webui.theme.ThemeManager;
import org.adempiere.webui.util.ZKUpdateUtil;
import org.adempiere.webui.window.FDialog;
import org.compiere.grid.PaymentForm;
@@ -70,9 +71,10 @@ public class WPaymentFormWindow extends Window implements EventListener,
}
this.setTitle(Msg.getMsg(Env.getCtx(), "Payment"));
- this.setSclass("popup-dialog");
+ this.setSclass("popup-dialog payment-form-dialog");
this.setBorder("normal");
- ZKUpdateUtil.setWidth(this, "500px");
+ if (!ThemeManager.isUseCSSForWindowSize())
+ ZKUpdateUtil.setWindowWidthX(this, 500);
this.setShadow(true);
this.setAttribute(Window.MODE_KEY, Window.MODE_HIGHLIGHTED);
}
diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WReportCustomization.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WReportCustomization.java
index 3b1c05b0f4..8eb421178d 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WReportCustomization.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WReportCustomization.java
@@ -453,8 +453,8 @@ public class WReportCustomization implements IFormController,EventListener nc)
+ LayoutUtils.compactTo(parameterBankLayout, nc);
+ else
+ LayoutUtils.expandTo(parameterBankLayout, nc);
+ ZKUpdateUtil.setCSSHeight(form);
+ ZKUpdateUtil.setCSSWidth(form);
+ form.invalidate();
+ }
+ }
+ }
+ }
+
protected void zkInit() throws Exception
{
bankAccountLabel.setText(Msg.translate(Env.getCtx(), "C_BankAccount_ID"));
@@ -191,34 +218,13 @@ public class WStatementCreateFromBatch extends StatementCreateFromBatch implemen
amtFromField.getComponent().setTooltiptext(Msg.translate(Env.getCtx(), "AmtFrom"));
amtToField.getComponent().setTooltiptext(Msg.translate(Env.getCtx(), "AmtTo"));
- Borderlayout parameterLayout = new Borderlayout();
- ZKUpdateUtil.setHeight(parameterLayout, "130px");
- ZKUpdateUtil.setWidth(parameterLayout, "100%");
Panel parameterPanel = form.getParameterPanel();
- parameterPanel.appendChild(parameterLayout);
- Grid parameterBankLayout = GridFactory.newGridLayout();
- Panel parameterBankPanel = new Panel();
- parameterBankPanel.appendChild(parameterBankLayout);
+ parameterBankLayout = GridFactory.newGridLayout();
+ ZKUpdateUtil.setVflex(parameterBankLayout, "min");
+ parameterPanel.appendChild(parameterBankLayout);
- Center center = new Center();
- parameterLayout.appendChild(center);
- center.appendChild(parameterBankPanel);
-
- Columns columns = new Columns();
- parameterBankLayout.appendChild(columns);
- Column column = new Column();
- columns.appendChild(column);
- column = new Column();
- ZKUpdateUtil.setWidth(column, "15%");
- columns.appendChild(column);
- ZKUpdateUtil.setWidth(column, "35%");
- column = new Column();
- ZKUpdateUtil.setWidth(column, "15%");
- columns.appendChild(column);
- column = new Column();
- ZKUpdateUtil.setWidth(column, "35%");
- columns.appendChild(column);
+ setupColumns(parameterBankLayout);
Rows rows = (Rows) parameterBankLayout.newRows();
Row row = rows.newRow();
@@ -254,8 +260,43 @@ public class WStatementCreateFromBatch extends StatementCreateFromBatch implemen
hbox.appendChild(dateToLabel.rightAlign());
hbox.appendChild(dateToField.getComponent());
row.appendChild(hbox);
+
+ if (ClientInfo.isMobile()) {
+ if (ClientInfo.maxWidth(ClientInfo.EXTRA_SMALL_WIDTH))
+ LayoutUtils.compactTo(parameterBankLayout, 2);
+ ClientInfo.onClientInfo(form, this::onClientInfo);
+ }
}
+ protected void setupColumns(Grid parameterBankLayout) {
+ Columns columns = new Columns();
+ parameterBankLayout.appendChild(columns);
+ if (ClientInfo.maxWidth(ClientInfo.EXTRA_SMALL_WIDTH))
+ {
+ Column column = new Column();
+ ZKUpdateUtil.setWidth(column, "35%");
+ columns.appendChild(column);
+ column = new Column();
+ ZKUpdateUtil.setWidth(column, "65%");
+ columns.appendChild(column);
+ }
+ else
+ {
+ Column column = new Column();
+ columns.appendChild(column);
+ column = new Column();
+ ZKUpdateUtil.setWidth(column, "15%");
+ columns.appendChild(column);
+ ZKUpdateUtil.setWidth(column, "35%");
+ column = new Column();
+ ZKUpdateUtil.setWidth(column, "15%");
+ columns.appendChild(column);
+ column = new Column();
+ ZKUpdateUtil.setWidth(column, "35%");
+ columns.appendChild(column);
+ }
+ }
+
/**
* Action Listener
* @param e event
diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WTreeBOM.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WTreeBOM.java
index 9a400feb89..6d97119c78 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WTreeBOM.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WTreeBOM.java
@@ -22,17 +22,14 @@ import java.util.Properties;
import java.util.Vector;
import java.util.logging.Level;
+import org.adempiere.webui.ClientInfo;
import org.adempiere.webui.component.Borderlayout;
import org.adempiere.webui.component.Checkbox;
import org.adempiere.webui.component.ConfirmPanel;
-import org.adempiere.webui.component.Grid;
-import org.adempiere.webui.component.GridFactory;
import org.adempiere.webui.component.Label;
import org.adempiere.webui.component.ListModelTable;
import org.adempiere.webui.component.ListboxFactory;
import org.adempiere.webui.component.Panel;
-import org.adempiere.webui.component.Row;
-import org.adempiere.webui.component.Rows;
import org.adempiere.webui.component.SimpleTreeModel;
import org.adempiere.webui.component.WListbox;
import org.adempiere.webui.editor.WSearchEditor;
@@ -61,8 +58,8 @@ import org.zkoss.zk.ui.event.EventListener;
import org.zkoss.zk.ui.event.Events;
import org.zkoss.zul.Center;
import org.zkoss.zul.DefaultTreeNode;
+import org.zkoss.zul.Hlayout;
import org.zkoss.zul.North;
-import org.zkoss.zul.Separator;
import org.zkoss.zul.South;
import org.zkoss.zul.Space;
import org.zkoss.zul.Tree;
@@ -94,8 +91,8 @@ public class WTreeBOM extends TreeBOM implements IFormController, EventListener<
private ConfirmPanel confirmPanel = new ConfirmPanel(true);
private WListbox tableBOM = ListboxFactory.newDataTable();
private Vector> dataBOM = new Vector>();
- private Grid northLayout = GridFactory.newGridLayout();
- private Grid southLayout = GridFactory.newGridLayout();
+ private Hlayout northLayout = new Hlayout();
+ private Hlayout southLayout = new Hlayout();
private mySimpleTreeNode m_root = null;
private boolean reload = false;
private Checkbox treeExpand = new Checkbox();
@@ -169,11 +166,12 @@ public class WTreeBOM extends TreeBOM implements IFormController, EventListener<
ZKUpdateUtil.setHeight(m_frame, "100%");
m_frame.setStyle("position: absolute; padding: 0; margin: 0");
m_frame.appendChild (mainLayout);
- ZKUpdateUtil.setWidth(mainLayout, "100%");
+ ZKUpdateUtil.setHflex(mainLayout, "1");
ZKUpdateUtil.setHeight(mainLayout, "100%");
- mainLayout.setStyle("position: absolute");
northPanel.appendChild(northLayout);
southPanel.appendChild(southLayout);
+ ZKUpdateUtil.setVflex(southPanel, "min");
+
labelProduct.setText (Msg.getElement(Env.getCtx(), "M_Product_ID"));
implosion.setText (Msg.getElement(Env.getCtx(), "Implosion"));
@@ -181,39 +179,47 @@ public class WTreeBOM extends TreeBOM implements IFormController, EventListener<
North north = new North();
north.appendChild(northPanel);
- ZKUpdateUtil.setHeight(north, "6%");
+ ZKUpdateUtil.setVflex(north, "min");
ZKUpdateUtil.setWidth(northPanel, "100%");
mainLayout.appendChild(north);
- Rows rows = northLayout.newRows();
-
- Row north_row = rows.newRow();
- north_row.appendChild(labelProduct.rightAlign());
- north_row.appendChild(fieldProduct.getComponent());
- north_row.appendChild(new Separator());
- north_row.appendChild(implosion);
- north_row.appendChild(new Space());
- north_row.appendChild(new Separator());
- north_row.appendChild(new Space());
- north_row.appendChild(treeInfo);
+ northLayout.setValign("middle");
+ northLayout.setStyle("padding: 4px;");
+ northLayout.appendChild(labelProduct.rightAlign());
+ if (ClientInfo.maxWidth(ClientInfo.EXTRA_SMALL_WIDTH-1))
+ ZKUpdateUtil.setWidth(fieldProduct.getComponent(), "150px");
+ else if (ClientInfo.maxWidth(ClientInfo.SMALL_WIDTH-1))
+ ZKUpdateUtil.setWidth(fieldProduct.getComponent(), "200px");
+ else if (ClientInfo.minWidth(ClientInfo.MEDIUM_WIDTH))
+ ZKUpdateUtil.setWidth(fieldProduct.getComponent(), "400px");
+ else
+ ZKUpdateUtil.setWidth(fieldProduct.getComponent(), "300px");
+ northLayout.appendChild(fieldProduct.getComponent());
+ northLayout.appendChild(new Space());
+ northLayout.appendChild(implosion);
+ northLayout.appendChild(new Space());
+ northLayout.appendChild(treeInfo);
+ if (ClientInfo.maxWidth(ClientInfo.SMALL_WIDTH-1))
+ treeInfo.setVisible(false);
treeExpand.setText(Msg.getMsg(Env.getCtx(), "ExpandTree"));
South south = new South();
south.appendChild(southPanel);
- ZKUpdateUtil.setHeight(south, "10%");
+ ZKUpdateUtil.setVflex(south, "min");
ZKUpdateUtil.setWidth(southPanel, "100%");
mainLayout.appendChild(south);
- Rows rows2 = southLayout.newRows();
-
- Row south_row = rows2.newRow();
-
- south_row.appendChild(treeExpand);
- south_row.appendChild(new Space());
- south_row.appendChild(new Separator());
- south_row.appendChild(new Space());
- south_row.appendChild(confirmPanel);
+ southLayout.setValign("middle");
+ southLayout.setStyle("padding: 4px");
+ ZKUpdateUtil.setHflex(southLayout, "1");
+ ZKUpdateUtil.setVflex(southLayout, "min");
+ southLayout.appendChild(treeExpand);
+ ZKUpdateUtil.setHflex(treeExpand, "1");
+ treeExpand.setStyle("float: left;");
+ southLayout.appendChild(confirmPanel);
+ ZKUpdateUtil.setHflex(confirmPanel, "1");
+ confirmPanel.setStyle("float: right;");
confirmPanel.addActionListener(this);
mainLayout.appendChild(west);
diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WTreeMaintenance.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WTreeMaintenance.java
index 5c1c94c344..e54166e24f 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WTreeMaintenance.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WTreeMaintenance.java
@@ -20,8 +20,8 @@ import java.util.ArrayList;
import java.util.logging.Level;
import org.adempiere.util.Callback;
+import org.adempiere.webui.ClientInfo;
import org.adempiere.webui.LayoutUtils;
-import org.adempiere.webui.component.Button;
import org.adempiere.webui.component.Checkbox;
import org.adempiere.webui.component.Label;
import org.adempiere.webui.component.Listbox;
@@ -29,6 +29,7 @@ import org.adempiere.webui.component.Panel;
import org.adempiere.webui.component.Searchbox;
import org.adempiere.webui.component.SimpleListModel;
import org.adempiere.webui.component.SimpleTreeModel;
+import org.adempiere.webui.component.ToolBarButton;
import org.adempiere.webui.panel.ADForm;
import org.adempiere.webui.panel.CustomForm;
import org.adempiere.webui.panel.IFormController;
@@ -48,12 +49,11 @@ import org.zkoss.zk.ui.event.Event;
import org.zkoss.zk.ui.event.EventListener;
import org.zkoss.zk.ui.event.Events;
import org.zkoss.zul.Borderlayout;
-import org.zkoss.zul.Cell;
import org.zkoss.zul.Center;
import org.zkoss.zul.DefaultTreeNode;
-import org.zkoss.zul.Div;
import org.zkoss.zul.East;
import org.zkoss.zul.Hbox;
+import org.zkoss.zul.Hlayout;
import org.zkoss.zul.ListModel;
import org.zkoss.zul.North;
import org.zkoss.zul.Space;
@@ -77,12 +77,11 @@ public class WTreeMaintenance extends TreeMaintenance implements IFormController
private Panel northPanel = new Panel ();
private Label treeLabel = new Label ();
private Listbox treeField;
- private Button bAddAll = new Button ();
- private Button bAdd = new Button ();
- private Button bDelete = new Button ();
- private Button bDeleteAll = new Button ();
+ private ToolBarButton bAddAll = new ToolBarButton ();
+ private ToolBarButton bAdd = new ToolBarButton ();
+ private ToolBarButton bDelete = new ToolBarButton ();
+ private ToolBarButton bDeleteAll = new ToolBarButton ();
private Checkbox cbAllNodes = new Checkbox ();
- private Label treeInfo = new Label ();
private Searchbox searchBox = new Searchbox();
//
@SuppressWarnings("unused")
@@ -132,33 +131,32 @@ public class WTreeMaintenance extends TreeMaintenance implements IFormController
bDelete.setImage(ThemeManager.getThemeResource("images/StepForward24.png"));
bDeleteAll.setImage(ThemeManager.getThemeResource("images/FastForward24.png"));
- ZKUpdateUtil.setWidth(form,"99%");
+ ZKUpdateUtil.setWidth(form,"100%");
ZKUpdateUtil.setHeight(form, "100%");
- form.setStyle("position: absolute; padding: 0; margin: 0");
+ form.setStyle("position: relative; padding: 0; margin: 0");
form.appendChild (mainLayout);
ZKUpdateUtil.setWidth(mainLayout, "100%");
ZKUpdateUtil.setHeight(mainLayout, "100%");
- mainLayout.setStyle("position: absolute");
treeLabel.setText (Msg.translate(Env.getCtx(), "AD_Tree_ID"));
cbAllNodes.setEnabled (false);
cbAllNodes.setText (Msg.translate(Env.getCtx(), "IsAllNodes"));
- treeInfo.setText (" ");
bAdd.setTooltiptext(Msg.getMsg(Env.getCtx(), "AddToTree"));
bAddAll.setTooltiptext(Msg.getMsg(Env.getCtx(), "AddAllToTree"));
bDelete.setTooltiptext(Msg.getMsg(Env.getCtx(), "DeleteFromTree"));
bDeleteAll.setTooltiptext(Msg.getMsg(Env.getCtx(), "DeleteAllFromTree"));
- bAdd.addActionListener(this);
- bAddAll.addActionListener(this);
- bDelete.addActionListener(this);
- bDeleteAll.addActionListener(this);
+ bAdd.addEventListener(Events.ON_CLICK, this);
+ bAddAll.addEventListener(Events.ON_CLICK, this);
+ bDelete.addEventListener(Events.ON_CLICK, this);
+ bDeleteAll.addEventListener(Events.ON_CLICK, this);
North north = new North();
mainLayout.appendChild(north);
north.appendChild(northPanel);
ZKUpdateUtil.setHflex(north, "1");
- ZKUpdateUtil.setVflex(north, "1");
+ ZKUpdateUtil.setVflex(north, "min");
ZKUpdateUtil.setWidth(northPanel, "100%");
+ ZKUpdateUtil.setVflex(northPanel, "min");
//
Hbox hbox = new Hbox();
hbox.setStyle("padding: 3px;");
@@ -167,31 +165,43 @@ public class WTreeMaintenance extends TreeMaintenance implements IFormController
ZKUpdateUtil.setVflex(hbox, "1");
northPanel.appendChild(hbox);
- hbox.appendChild (new Space());
+ if (ClientInfo.maxWidth(ClientInfo.EXTRA_SMALL_WIDTH-1))
+ treeField.setStyle("max-width: 200px");
hbox.appendChild (treeLabel);
hbox.appendChild (treeField);
hbox.appendChild (new Space());
- hbox.appendChild (cbAllNodes);
- hbox.appendChild (new Space());
- Cell cell = new Cell();
- cell.setColspan(1);
- cell.setRowspan(1);
- ZKUpdateUtil.setHflex(cell, "1");
- cell.appendChild(treeInfo);
- hbox.appendChild (cell);
- hbox.appendChild (new Space());
+ hbox.appendChild (cbAllNodes);
- Div div = new Div();
+ if (ClientInfo.maxWidth(ClientInfo.SMALL_WIDTH-1))
+ {
+ hbox = new Hbox();
+ hbox.setAlign("center");
+ hbox.setStyle("padding-top: 3px; padding-bottom: 3px;");
+ ZKUpdateUtil.setWidth(hbox, "100%");
+ ZKUpdateUtil.setVflex(hbox, "min");
+ northPanel.appendChild(hbox);
+ }
+ else
+ {
+ hbox.appendChild (new Space());
+ }
+
+ Hlayout div = new Hlayout();
div.appendChild (bAddAll);
div.appendChild (bAdd);
div.appendChild (bDelete);
div.appendChild (bDeleteAll);
+ ZKUpdateUtil.setVflex(div, "min");
searchBox.addEventListener(Events.ON_CLICK, this);
searchBox.getTextbox().addEventListener(Events.ON_OK, this);
searchBox.getButton().setImage(ThemeManager.getThemeResource("images/Find16.png"));
searchBox.setToolTipText(Msg.getCleanMsg(Env.getCtx(), "TreeSearch"));
- ZKUpdateUtil.setWidth(searchBox, "200px");
+ if (ClientInfo.maxWidth(ClientInfo.SMALL_WIDTH-1))
+ ZKUpdateUtil.setHflex(searchBox, "1");
+ else
+ ZKUpdateUtil.setWidth(searchBox, "200px");
+ ZKUpdateUtil.setVflex(searchBox, "min");
div.appendChild(searchBox);
hbox.appendChild(div);
//
@@ -289,10 +299,10 @@ public class WTreeMaintenance extends TreeMaintenance implements IFormController
// Tree
m_tree = new MTree (Env.getCtx(), tree.getKey(), null);
cbAllNodes.setSelected(m_tree.isAllNodes());
- bAddAll.setEnabled(!m_tree.isAllNodes());
- bAdd.setEnabled(!m_tree.isAllNodes());
- bDelete.setEnabled(!m_tree.isAllNodes());
- bDeleteAll.setEnabled(!m_tree.isAllNodes());
+ bAddAll.setDisabled(m_tree.isAllNodes());
+ bAdd.setDisabled(m_tree.isAllNodes());
+ bDelete.setDisabled(m_tree.isAllNodes());
+ bDeleteAll.setDisabled(m_tree.isAllNodes());
// List
SimpleListModel model = new SimpleListModel();
@@ -356,7 +366,7 @@ public class WTreeMaintenance extends TreeMaintenance implements IFormController
Treeitem ti = centerTree.renderItemByPath(path);
ti.setSelected(true);
}
- bAdd.setEnabled(stn == null);
+ bAdd.setDisabled(stn != null);
}
} // valueChanged
diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WTrxMaterial.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WTrxMaterial.java
index 4c813a777d..17a9f458c4 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WTrxMaterial.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WTrxMaterial.java
@@ -20,6 +20,7 @@ import java.sql.Timestamp;
import java.util.Properties;
import java.util.logging.Level;
+import org.adempiere.webui.ClientInfo;
import org.adempiere.webui.LayoutUtils;
import org.adempiere.webui.adwindow.ADTabpanel;
import org.adempiere.webui.apps.AEnv;
@@ -55,7 +56,6 @@ import org.zkoss.zul.Borderlayout;
import org.zkoss.zul.Center;
import org.zkoss.zul.North;
import org.zkoss.zul.South;
-import org.zkoss.zul.Separator;
/**
* Material Transaction History
@@ -92,6 +92,8 @@ public class WTrxMaterial extends TrxMaterial
private ConfirmPanel confirmPanel = new ConfirmPanel(true, true, false, false, false, true, false);
private StatusBarPanel statusBar = new StatusBarPanel();
+ private int noOfColumns;
+
/**
* Initialize Panel
@@ -104,7 +106,9 @@ public class WTrxMaterial extends TrxMaterial
m_WindowNo = form.getWindowNo();
dynParameter();
zkInit();
- dynInit();
+ dynInit();
+ if (ClientInfo.isMobile())
+ ClientInfo.onClientInfo(form, this::onClientInfo);
}
catch(Exception ex)
{
@@ -119,7 +123,7 @@ public class WTrxMaterial extends TrxMaterial
void zkInit() throws Exception
{
form.appendChild(mainPanel);
- mainPanel.setStyle("width: 99%; height: 100%; border: none; padding: 0; margin: 0");
+ mainPanel.setStyle("width: 100%; height: 100%; border: none; padding: 0; margin: 0");
mainPanel.appendChild(mainLayout);
ZKUpdateUtil.setWidth(mainLayout, "100%");
ZKUpdateUtil.setHeight(mainLayout, "100%");
@@ -135,39 +139,85 @@ public class WTrxMaterial extends TrxMaterial
North north = new North();
mainLayout.appendChild(north);
north.appendChild(parameterPanel);
+ north.setSplittable(true);
+ north.setCollapsible(true);
+ north.setAutoscroll(true);
+ LayoutUtils.addSlideSclass(north);
- Rows rows = parameterLayout.newRows();
- Row row = rows.newRow();
- row.appendCellChild(orgLabel.rightAlign());
- ZKUpdateUtil.setHflex(orgField.getComponent(), "true");
- row.appendCellChild(orgField.getComponent());
- row.appendCellChild(mtypeLabel.rightAlign());
- ZKUpdateUtil.setHflex(mtypeField.getComponent(), "true");
- row.appendCellChild(mtypeField.getComponent());
- row.appendCellChild(dateFLabel.rightAlign());
- row.appendCellChild(dateFField.getComponent());
-
- row = rows.newRow();
- row.appendCellChild(locatorLabel.rightAlign());
- ZKUpdateUtil.setHflex(locatorField.getComponent(), "true");
- row.appendCellChild(locatorField.getComponent());
- row.appendCellChild(productLabel.rightAlign());
- ZKUpdateUtil.setHflex(productField.getComponent(), "true");
- row.appendCellChild(productField.getComponent());
- row.appendCellChild(dateTLabel.rightAlign());
- row.appendCellChild(dateTField.getComponent());
+ layoutParameters();
//
southPanel.appendChild(confirmPanel);
- southPanel.appendChild(new Separator());
southPanel.appendChild(statusBar);
South south = new South();
south.setStyle("border: none");
mainLayout.appendChild(south);
south.appendChild(southPanel);
+ ZKUpdateUtil.setHeight(southPanel, "64px");
+ ZKUpdateUtil.setHeight(south, "64px");
+ ZKUpdateUtil.setHeight(confirmPanel, "32px");
+ ZKUpdateUtil.setHeight(statusBar, "32px");
+
+ ZKUpdateUtil.setWidth(southPanel, "100%");
+ ZKUpdateUtil.setWidth(confirmPanel, "100%");
+ ZKUpdateUtil.setWidth(statusBar, "100%");
LayoutUtils.addSclass("status-border", statusBar);
} // jbInit
+ protected void layoutParameters() {
+ noOfColumns = 6;
+ if (ClientInfo.maxWidth(639))
+ noOfColumns = 2;
+ else if (ClientInfo.maxWidth(ClientInfo.MEDIUM_WIDTH-1))
+ noOfColumns = 4;
+
+ int childCnt = 0;
+ Rows rows = parameterLayout.newRows();
+ Row row = rows.newRow();
+ row.appendCellChild(orgLabel.rightAlign());
+ ZKUpdateUtil.setHflex(orgField.getComponent(), "true");
+ row.appendCellChild(orgField.getComponent());
+ childCnt += 2;
+ if ((childCnt % noOfColumns) ==0 )
+ row = rows.newRow();
+ row.appendCellChild(mtypeLabel.rightAlign());
+ ZKUpdateUtil.setHflex(mtypeField.getComponent(), "true");
+ row.appendCellChild(mtypeField.getComponent());
+ childCnt += 2;
+ if ((childCnt % noOfColumns) ==0 )
+ row = rows.newRow();
+ if (noOfColumns == 6)
+ {
+ row.appendCellChild(dateFLabel.rightAlign());
+ row.appendCellChild(dateFField.getComponent());
+ childCnt += 2;
+ if ((childCnt % noOfColumns) ==0 )
+ row = rows.newRow();
+ }
+ row.appendCellChild(locatorLabel.rightAlign());
+ ZKUpdateUtil.setHflex(locatorField.getComponent(), "true");
+ row.appendCellChild(locatorField.getComponent());
+ childCnt += 2;
+ if ((childCnt % noOfColumns) ==0 )
+ row = rows.newRow();
+ row.appendCellChild(productLabel.rightAlign());
+ ZKUpdateUtil.setHflex(productField.getComponent(), "true");
+ row.appendCellChild(productField.getComponent());
+ childCnt +=2;
+ if ((childCnt % noOfColumns) ==0 )
+ row = rows.newRow();
+ if (noOfColumns < 6)
+ {
+ row.appendCellChild(dateFLabel.rightAlign());
+ row.appendCellChild(dateFField.getComponent());
+ childCnt += 2;
+ if ((childCnt % noOfColumns) ==0 )
+ row = rows.newRow();
+ }
+ row.appendCellChild(dateTLabel.rightAlign());
+ row.appendCellChild(dateTField.getComponent());
+ }
+
/**
* Initialize Parameter fields
* @throws Exception if Lookups cannot be initialized
@@ -269,6 +319,8 @@ public class WTrxMaterial extends TrxMaterial
Timestamp movementDateTo = (Timestamp)dateTField.getValue();
refresh(organization, locator, product, movementType, movementDateFrom, movementDateTo, statusBar);
+ if (ClientInfo.maxHeight(ClientInfo.MEDIUM_HEIGHT-1))
+ mainLayout.getNorth().setOpen(false);
} // refresh
/**
@@ -287,4 +339,21 @@ public class WTrxMaterial extends TrxMaterial
return form;
}
+ protected void onClientInfo()
+ {
+ if (noOfColumns > 0 && parameterLayout.getRows() != null)
+ {
+ int n = 6;
+ if (ClientInfo.maxWidth(639))
+ n = 2;
+ else if (ClientInfo.maxWidth(ClientInfo.MEDIUM_WIDTH-1))
+ n = 4;
+ if (n != noOfColumns)
+ {
+ parameterLayout.getRows().detach();
+ layoutParameters();
+ form.invalidate();
+ }
+ }
+ }
} // VTrxMaterial
diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/graph/WGraph.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/graph/WGraph.java
index 3cf72dc072..7006a6000a 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/graph/WGraph.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/graph/WGraph.java
@@ -22,6 +22,7 @@ import java.util.List;
import org.adempiere.apps.graph.GraphColumn;
import org.adempiere.base.Service;
+import org.adempiere.webui.ClientInfo;
import org.adempiere.webui.apps.AEnv;
import org.adempiere.webui.apps.graph.model.GoalModel;
import org.adempiere.webui.editor.WTableDirEditor;
@@ -181,7 +182,7 @@ public class WGraph extends Div implements IdSpace {
if (m_renderTable && m_renderChart) {
layout = new Borderlayout();
appendChild(layout);
- layout.setStyle("height: 100%; width: 100%; position: absolute;");
+ layout.setStyle("height: 100%; width: 100%; position: relative;");
Center center = new Center();
layout.appendChild(center);
center.appendChild(panel);
@@ -196,6 +197,11 @@ public class WGraph extends Div implements IdSpace {
if (m_renderChart) {
East east = new East();
east.setAutoscroll(true);
+ if (ClientInfo.maxWidth(ClientInfo.MEDIUM_WIDTH-1)) {
+ east.setOpen(false);
+ east.setSplittable(true);
+ east.setCollapsible(true);
+ }
layout.appendChild(east);
renderTable(east);
} else {
@@ -251,12 +257,17 @@ public class WGraph extends Div implements IdSpace {
private void renderChart(String type) {
int width = 560;
int height = 400;
+ if (ClientInfo.maxWidth(width-1)) {
+ width = ClientInfo.get().desktopWidth;
+ height = (int)(width * (400f / 560f));
+ }
if (panel.getPanelchildren() != null) {
panel.getPanelchildren().getChildren().clear();
} else {
Panelchildren pc = new Panelchildren();
panel.appendChild(pc);
}
+ panel.getPanelchildren().setStyle("overflow: auto;");
GoalModel goalModel = new GoalModel();
goalModel.goal = m_goal;
goalModel.chartType = type != null ? type : m_goal.getChartType();
diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/ConfirmPanel.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/ConfirmPanel.java
index cc8d9a28ab..1e2ddf530c 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/ConfirmPanel.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/ConfirmPanel.java
@@ -22,9 +22,11 @@ import java.util.Iterator;
import java.util.List;
import java.util.Map;
+import org.adempiere.webui.LayoutUtils;
import org.adempiere.webui.factory.ButtonFactory;
import org.adempiere.webui.theme.ThemeManager;
import org.adempiere.webui.util.ZKUpdateUtil;
+import org.compiere.util.Util;
import org.zkoss.zk.ui.event.EventListener;
import org.zkoss.zk.ui.event.Events;
import org.zkoss.zul.Div;
@@ -106,6 +108,8 @@ public final class ConfirmPanel extends Div
Button button = ButtonFactory.createNamedButton(name, m_withText, m_withImage);
button.setId(name);
buttonMap.put(name, button);
+ if (!Util.isEmpty(extraButtonSClass))
+ LayoutUtils.addSclass(extraButtonSClass, button);
return button;
}
@@ -226,6 +230,8 @@ public final class ConfirmPanel extends Div
// IDEMPIERE-1334 center panel, contain all process button
private Hlayout pnlBtnCenter;
+ private String extraButtonSClass;
+
/**
* initialise components
*/
@@ -523,4 +529,16 @@ public final class ConfirmPanel extends Div
return getButton(A_OK);
}
+ public void addButtonSclass(String cls) {
+ for(Button btn : buttonMap.values()) {
+ LayoutUtils.addSclass(cls, btn);
+ }
+ extraButtonSClass = cls;
+ }
+
+ public void removeButtonSclass(String cls) {
+ for(Button btn : buttonMap.values()) {
+ LayoutUtils.removeSclass(cls, btn);
+ }
+ }
} // ConfirmPanel
diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/FolderBrowser.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/FolderBrowser.java
index 48a3dd3613..8076b6173c 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/FolderBrowser.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/FolderBrowser.java
@@ -81,8 +81,8 @@ public class FolderBrowser extends Window implements EventListener
this.browseForFolder = browseForFolder;
setTitle(browseForFolder ? "Directory Browser" : "File Browser");
- ZKUpdateUtil.setWidth(this, "500px");
- ZKUpdateUtil.setHeight(this, "500px");
+ ZKUpdateUtil.setWindowWidthX(this, 500);
+ ZKUpdateUtil.setWindowHeightX(this, 500);
setBorder("normal");
Borderlayout contentLayout = new Borderlayout();
diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/Messagebox.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/Messagebox.java
index 0834be083d..525a6b34e9 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/Messagebox.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/Messagebox.java
@@ -21,6 +21,7 @@ import java.util.Properties;
import org.adempiere.util.Callback;
import org.adempiere.webui.AdempiereIdGenerator;
+import org.adempiere.webui.ClientInfo;
import org.adempiere.webui.apps.AEnv;
import org.adempiere.webui.factory.ButtonFactory;
import org.adempiere.webui.session.SessionManager;
@@ -54,6 +55,7 @@ public class Messagebox extends Window implements EventListener
private static final long serialVersionUID = 8928526331932742124L;
private static final String MESSAGE_PANEL_STYLE = "text-align:left; word-break: break-all; overflow: auto; max-height: 350pt; min-width: 230pt; max-width: 450pt;";
+ private static final String SMALLER_MESSAGE_PANEL_STYLE = "text-align:left; word-break: break-all; overflow: auto; max-height: 350pt; min-width: 180pt; ";
private String msg = new String("");
private String imgSrc = new String("");
@@ -126,6 +128,7 @@ public class Messagebox extends Window implements EventListener
Properties ctx = Env.getCtx();
lblMsg.setEncode(false);
lblMsg.setValue(msg);
+ lblMsg.setClientAttribute("style", "word-break: normal;");
// Invert - Unify OK/Cancel IDEMPIERE-77
btnOk = ButtonFactory.createNamedButton(ConfirmPanel.A_OK);
btnOk.setId("btnOk");
@@ -162,8 +165,15 @@ public class Messagebox extends Window implements EventListener
btnIgnore.setId("btnIgnore");
Panel pnlMessage = new Panel();
- pnlMessage.setStyle(MESSAGE_PANEL_STYLE);
+ if (ClientInfo.maxWidth(399))
+ {
+ pnlMessage.setStyle(SMALLER_MESSAGE_PANEL_STYLE);
+ this.setWidth("100%");
+ }
+ else
+ pnlMessage.setStyle(MESSAGE_PANEL_STYLE);
pnlMessage.appendChild(lblMsg);
+ ZKUpdateUtil.setHflex(pnlMessage, "min");
Panel pnlInput= new Panel();
pnlInput.setStyle(MESSAGE_PANEL_STYLE);
@@ -188,6 +198,7 @@ public class Messagebox extends Window implements EventListener
north.appendChild(pnlImage);
north.appendChild(pnlText);
north.setSclass("dialog-content");
+ north.setWidth("100%");;
Hbox pnlButtons = new Hbox();
pnlButtons.setAlign("center");
diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/NumberBox.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/NumberBox.java
index 00fd1315db..f44a66d4b9 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/NumberBox.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/NumberBox.java
@@ -21,6 +21,7 @@ import java.math.BigDecimal;
import java.text.NumberFormat;
import java.text.ParseException;
+import org.adempiere.webui.ClientInfo;
import org.adempiere.webui.LayoutUtils;
import org.adempiere.webui.theme.ThemeManager;
import org.adempiere.webui.util.ZKUpdateUtil;
@@ -87,7 +88,7 @@ public class NumberBox extends Div
ZKUpdateUtil.setHflex(decimalBox, "0");
decimalBox.setSclass("editor-input");
decimalBox.setId(decimalBox.getUuid());
-
+
char separatorChar = DisplayType.getNumberFormat(DisplayType.Number, Env.getLanguage(Env.getCtx())).getDecimalFormatSymbols().getDecimalSeparator();
String separator = Character.toString(separatorChar);
boolean processDotKeypad = MSysConfig.getBooleanValue(MSysConfig.ZK_DECIMALBOX_PROCESS_DOTKEYPAD, true, Env.getAD_Client_ID(Env.getCtx()));
@@ -138,6 +139,13 @@ public class NumberBox extends Div
LayoutUtils.addSclass("number-box", this);
LayoutUtils.addSclass("editor-box", this);
+
+ if (ClientInfo.isMobile())
+ {
+ LayoutUtils.addSclass("mobile", decimalBox);
+ btn.setVisible(false);
+ }
+
}
/**
diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/SimpleTreeModel.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/SimpleTreeModel.java
index a477f557a2..ae3cb8b2d0 100644
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/SimpleTreeModel.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/SimpleTreeModel.java
@@ -18,6 +18,7 @@ import java.util.Enumeration;
import java.util.List;
import java.util.logging.Level;
+import org.adempiere.webui.ClientInfo;
import org.compiere.model.MTree;
import org.compiere.model.MTreeNode;
import org.compiere.util.CLogger;
@@ -160,12 +161,16 @@ public class SimpleTreeModel extends org.zkoss.zul.DefaultTreeModel