IDEMPIERE-4140 cph::erp Improvement to the layout of the info Windows (#807)
Co-authored-by: gsjeffen <public@birch-rasmussen.dk>
This commit is contained in:
parent
62b90fe6ca
commit
db22889fa1
|
@ -56,5 +56,5 @@ Copyright (C) 2007 Ashley G Ramdass (ADempiere WebUI).
|
||||||
|
|
||||||
<!-- this js module doesn't actually exists and it is here for default theme version -->
|
<!-- this js module doesn't actually exists and it is here for default theme version -->
|
||||||
<!-- since loading of js module is on demand, it doesn't cause any error as long as you don't try to load it -->
|
<!-- since loading of js module is on demand, it doesn't cause any error as long as you don't try to load it -->
|
||||||
<javascript-module name="idempiere.theme.default" version="202107230430" />
|
<javascript-module name="idempiere.theme.default" version="202107301039" />
|
||||||
</language>
|
</language>
|
||||||
|
|
|
@ -208,11 +208,26 @@ public class InfoProductWindow extends InfoWindow {
|
||||||
m_sqlRelated = relatedTbl.prepareTable(s_layoutRelated, s_sqlFrom, s_sqlWhere, false, "M_PRODUCT_SUBSTITUTERELATED_V");
|
m_sqlRelated = relatedTbl.prepareTable(s_layoutRelated, s_sqlFrom, s_sqlWhere, false, "M_PRODUCT_SUBSTITUTERELATED_V");
|
||||||
relatedTbl.setMultiSelection(false);
|
relatedTbl.setMultiSelection(false);
|
||||||
relatedTbl.autoSize();
|
relatedTbl.autoSize();
|
||||||
// relatedTbl.getModel().addTableModelListener(this);
|
|
||||||
|
|
||||||
//Available to Promise Tab
|
//Available to Promise Tab
|
||||||
|
|
||||||
|
// Header
|
||||||
|
|
||||||
|
ColumnInfo[] s_LayoutAtp = new ColumnInfo[]{
|
||||||
|
new ColumnInfo(Msg.translate(Env.getCtx(), "Date"), "Date", Timestamp.class),
|
||||||
|
new ColumnInfo(Msg.translate(Env.getCtx(), "QtyOnHand"), "QtyOnHand", Double.class),
|
||||||
|
new ColumnInfo(Msg.translate(Env.getCtx(), "C_BPartner_ID"), "C_BPartner_ID", String.class),
|
||||||
|
new ColumnInfo(Msg.translate(Env.getCtx(), "QtyOrdered"), "QtyOrdered", Double.class),
|
||||||
|
new ColumnInfo(Msg.translate(Env.getCtx(), "QtyReserved"), "QtyReserved", Double.class),
|
||||||
|
new ColumnInfo(Msg.translate(Env.getCtx(), "M_Locator_ID"), "M_Locator_ID", String.class),
|
||||||
|
new ColumnInfo(Msg.translate(Env.getCtx(), "M_AttributeSetInstance_ID"), "M_AttributeSetInstance_ID", String.class),
|
||||||
|
new ColumnInfo(Msg.translate(Env.getCtx(), "DocumentNo"), "DocumentNo", String.class),
|
||||||
|
new ColumnInfo(Msg.translate(Env.getCtx(), "M_Warehouse_ID"), "M_Warehouse_ID", String.class)
|
||||||
|
};
|
||||||
|
|
||||||
m_tableAtp = ListboxFactory.newDataTableAutoSize();
|
m_tableAtp = ListboxFactory.newDataTableAutoSize();
|
||||||
m_tableAtp.setMultiSelection(false);
|
m_tableAtp.setMultiSelection(false);
|
||||||
|
m_tableAtp.prepareTable(s_LayoutAtp, "", "", false, "");
|
||||||
|
|
||||||
//IDEMPIERE-337
|
//IDEMPIERE-337
|
||||||
ArrayList<ColumnInfo> list = new ArrayList<ColumnInfo>();
|
ArrayList<ColumnInfo> list = new ArrayList<ColumnInfo>();
|
||||||
|
@ -368,6 +383,11 @@ public class InfoProductWindow extends InfoWindow {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
warehouseTbl.repaint();
|
||||||
|
substituteTbl.repaint();
|
||||||
|
relatedTbl.repaint();
|
||||||
|
productpriceTbl.repaint();
|
||||||
|
m_tableAtp.repaint();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void onPAttributeClick() {
|
protected void onPAttributeClick() {
|
||||||
|
@ -650,18 +670,6 @@ public class InfoProductWindow extends InfoWindow {
|
||||||
*/
|
*/
|
||||||
protected void initAtpTab (int m_M_Warehouse_ID, int m_M_Product_ID)
|
protected void initAtpTab (int m_M_Warehouse_ID, int m_M_Product_ID)
|
||||||
{
|
{
|
||||||
// Header
|
|
||||||
Vector<String> columnNames = new Vector<String>();
|
|
||||||
columnNames.add(Msg.translate(Env.getCtx(), "Date"));
|
|
||||||
columnNames.add(Msg.translate(Env.getCtx(), "QtyOnHand"));
|
|
||||||
columnNames.add(Msg.translate(Env.getCtx(), "C_BPartner_ID"));
|
|
||||||
columnNames.add(Msg.translate(Env.getCtx(), "QtyOrdered"));
|
|
||||||
columnNames.add(Msg.translate(Env.getCtx(), "QtyReserved"));
|
|
||||||
columnNames.add(Msg.translate(Env.getCtx(), "M_Locator_ID"));
|
|
||||||
columnNames.add(Msg.translate(Env.getCtx(), "M_AttributeSetInstance_ID"));
|
|
||||||
columnNames.add(Msg.translate(Env.getCtx(), "DocumentNo"));
|
|
||||||
columnNames.add(Msg.translate(Env.getCtx(), "M_Warehouse_ID"));
|
|
||||||
|
|
||||||
// Fill Storage Data
|
// Fill Storage Data
|
||||||
boolean showDetail = isShowDetailATP();
|
boolean showDetail = isShowDetailATP();
|
||||||
String sql = "SELECT s.QtyOnHand, s.QtyReserved, s.QtyOrdered,"
|
String sql = "SELECT s.QtyOnHand, s.QtyReserved, s.QtyOrdered,"
|
||||||
|
@ -796,18 +804,8 @@ public class InfoProductWindow extends InfoWindow {
|
||||||
|
|
||||||
// Table
|
// Table
|
||||||
ListModelTable model = new ListModelTable(data);
|
ListModelTable model = new ListModelTable(data);
|
||||||
|
Vector<String> columnNames = new Vector<String>();
|
||||||
m_tableAtp.setData(model, columnNames);
|
m_tableAtp.setData(model, columnNames);
|
||||||
//
|
|
||||||
m_tableAtp.setColumnClass(0, Timestamp.class, true); // Date
|
|
||||||
m_tableAtp.setColumnClass(1, Double.class, true); // Quantity
|
|
||||||
m_tableAtp.setColumnClass(2, String.class, true); // Partner
|
|
||||||
m_tableAtp.setColumnClass(3, Double.class, true); // Quantity
|
|
||||||
m_tableAtp.setColumnClass(4, Double.class, true); // Quantity
|
|
||||||
m_tableAtp.setColumnClass(5, String.class, true); // Locator
|
|
||||||
m_tableAtp.setColumnClass(6, String.class, true); // ASI
|
|
||||||
m_tableAtp.setColumnClass(7, String.class, true); // DocNo
|
|
||||||
m_tableAtp.setColumnClass(8, String.class, true); // Warehouse
|
|
||||||
//
|
|
||||||
m_tableAtp.autoSize();
|
m_tableAtp.autoSize();
|
||||||
} // initAtpTab
|
} // initAtpTab
|
||||||
|
|
||||||
|
|
|
@ -261,6 +261,8 @@ public class InfoWindow extends InfoPanel implements ValueChangeListener, EventL
|
||||||
}
|
}
|
||||||
|
|
||||||
renderWindow();
|
renderWindow();
|
||||||
|
prepareTable();
|
||||||
|
contentPanel.repaint();
|
||||||
|
|
||||||
if (queryValue != null && queryValue.trim().length() > 0)
|
if (queryValue != null && queryValue.trim().length() > 0)
|
||||||
{
|
{
|
||||||
|
@ -1368,6 +1370,7 @@ public class InfoWindow extends InfoPanel implements ValueChangeListener, EventL
|
||||||
protected void renderFooter(South south) {
|
protected void renderFooter(South south) {
|
||||||
southBody = new Vbox();
|
southBody = new Vbox();
|
||||||
ZKUpdateUtil.setHflex(southBody, "1");
|
ZKUpdateUtil.setHflex(southBody, "1");
|
||||||
|
southBody.setClass("info");
|
||||||
south.appendChild(southBody);
|
south.appendChild(southBody);
|
||||||
southBody.appendChild(new Separator());
|
southBody.appendChild(new Separator());
|
||||||
southBody.appendChild(confirmPanel);
|
southBody.appendChild(confirmPanel);
|
||||||
|
@ -1897,10 +1900,7 @@ public class InfoWindow extends InfoPanel implements ValueChangeListener, EventL
|
||||||
|
|
||||||
if (paging != null)
|
if (paging != null)
|
||||||
paging.setParent(null);
|
paging.setParent(null);
|
||||||
|
|
||||||
layout.invalidate();
|
layout.invalidate();
|
||||||
|
|
||||||
contentPanel.getListHead().detach();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -614,6 +614,13 @@ public class InfoGeneralPanel extends InfoPanel implements EventListener<Event>
|
||||||
return s;
|
return s;
|
||||||
} // getSQLText
|
} // getSQLText
|
||||||
|
|
||||||
|
protected void resetParameters() {
|
||||||
|
txt1.setValue("");
|
||||||
|
txt2.setValue("");
|
||||||
|
txt3.setValue("");
|
||||||
|
txt4.setValue("");
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set Parameters for Query.
|
* Set Parameters for Query.
|
||||||
* (as defined in getSQLWhere)
|
* (as defined in getSQLWhere)
|
||||||
|
|
|
@ -37,10 +37,12 @@ import org.zkoss.zk.ui.event.Event;
|
||||||
import org.zkoss.zk.ui.event.EventListener;
|
import org.zkoss.zk.ui.event.EventListener;
|
||||||
import org.zkoss.zk.ui.event.Events;
|
import org.zkoss.zk.ui.event.Events;
|
||||||
import org.zkoss.zk.ui.util.Clients;
|
import org.zkoss.zk.ui.util.Clients;
|
||||||
import org.zkoss.zul.Cell;
|
import org.zkoss.zul.Center;
|
||||||
import org.zkoss.zul.Div;
|
import org.zkoss.zul.Div;
|
||||||
|
import org.zkoss.zul.East;
|
||||||
import org.zkoss.zul.Hbox;
|
import org.zkoss.zul.Hbox;
|
||||||
import org.zkoss.zul.Vbox;
|
import org.zkoss.zul.West;
|
||||||
|
import org.zkoss.zul.Borderlayout;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This class is based on org.compiere.apps.StatusBar written by Jorg Janke.
|
* This class is based on org.compiere.apps.StatusBar written by Jorg Janke.
|
||||||
|
@ -75,8 +77,6 @@ public class StatusBarPanel extends Panel implements EventListener<Event>, IStat
|
||||||
|
|
||||||
private Div east;
|
private Div east;
|
||||||
|
|
||||||
private Div west;
|
|
||||||
|
|
||||||
private Div popup;
|
private Div popup;
|
||||||
|
|
||||||
private Div popupContent;
|
private Div popupContent;
|
||||||
|
@ -93,52 +93,48 @@ public class StatusBarPanel extends Panel implements EventListener<Event>, IStat
|
||||||
setWidgetAttribute(AdempiereWebUI.WIDGET_INSTANCE_NAME, "statusBar");
|
setWidgetAttribute(AdempiereWebUI.WIDGET_INSTANCE_NAME, "statusBar");
|
||||||
statusDB = new Label(" ");
|
statusDB = new Label(" ");
|
||||||
statusLine = new Label();
|
statusLine = new Label();
|
||||||
|
|
||||||
Hbox hbox = new Hbox();
|
|
||||||
ZKUpdateUtil.setWidth(hbox, "100%");
|
|
||||||
ZKUpdateUtil.setHeight(hbox, "100%");
|
|
||||||
ZKUpdateUtil.setHflex(hbox, "1");
|
|
||||||
Cell leftCell = new Cell();
|
|
||||||
hbox.appendChild(leftCell);
|
|
||||||
Cell rightCell = new Cell();
|
|
||||||
hbox.appendChild(rightCell);
|
|
||||||
|
|
||||||
ZKUpdateUtil.setWidth(leftCell, "50%");
|
|
||||||
ZKUpdateUtil.setWidth(rightCell, "50%");
|
|
||||||
|
|
||||||
west = new Div();
|
|
||||||
west.setStyle("text-align: left; ");
|
|
||||||
selectedLine = new Label();
|
selectedLine = new Label();
|
||||||
west.appendChild(selectedLine);
|
|
||||||
selectedLine.setVisible(false);
|
selectedLine.setVisible(false);
|
||||||
LayoutUtils.addSclass("status-selected", selectedLine);
|
|
||||||
|
|
||||||
west.appendChild(statusLine);
|
|
||||||
Vbox vbox = new Vbox();
|
|
||||||
vbox.setPack("center");
|
|
||||||
LayoutUtils.addSclass("status", vbox);
|
|
||||||
vbox.appendChild(west);
|
|
||||||
leftCell.appendChild(vbox);
|
|
||||||
|
|
||||||
east = new Div();
|
|
||||||
ZKUpdateUtil.setWidth(east, "100%");
|
|
||||||
east.setStyle("text-align: right; ");
|
|
||||||
|
|
||||||
infoLine = new Label();
|
infoLine = new Label();
|
||||||
east.appendChild(infoLine);
|
infoLine.setVisible(false);
|
||||||
infoLine.setVisible(false);
|
|
||||||
east.appendChild(statusDB);
|
Borderlayout statusBar = new Borderlayout();
|
||||||
|
statusBar.setClass("statusBar");
|
||||||
|
ZKUpdateUtil.setWidth(statusBar, "100%");
|
||||||
|
ZKUpdateUtil.setHeight(statusBar, "24px");
|
||||||
|
|
||||||
|
West west = new West();
|
||||||
|
statusBar.appendChild(west);
|
||||||
|
|
||||||
|
Center center = new Center();
|
||||||
|
statusBar.appendChild(center);
|
||||||
|
|
||||||
|
East east = new East();
|
||||||
|
statusBar.appendChild(east);
|
||||||
|
|
||||||
|
Hbox selectedLineHbox = new Hbox();
|
||||||
|
selectedLineHbox.appendChild(selectedLine);
|
||||||
|
LayoutUtils.addSclass("status-selected", selectedLine);
|
||||||
|
selectedLine.setVisible(false);
|
||||||
|
west.appendChild(selectedLineHbox);
|
||||||
|
statusBar.appendChild(west);
|
||||||
|
|
||||||
|
Hbox statusLineHbox = new Hbox();
|
||||||
|
statusLineHbox.appendChild(statusLine);
|
||||||
|
center.appendChild(statusLineHbox);
|
||||||
|
statusBar.appendChild(center);
|
||||||
|
|
||||||
|
Hbox statusDbHbox = new Hbox();
|
||||||
|
statusDbHbox.appendChild(infoLine);
|
||||||
|
LayoutUtils.addSclass("status-info", infoLine);
|
||||||
|
statusDbHbox.appendChild(statusDB);
|
||||||
|
|
||||||
LayoutUtils.addSclass("status-db", statusDB);
|
LayoutUtils.addSclass("status-db", statusDB);
|
||||||
LayoutUtils.addSclass("status-info", infoLine);
|
east.appendChild(statusDbHbox);
|
||||||
vbox = new Vbox();
|
east.setStyle("text-align: left; ");
|
||||||
vbox.setAlign("stretch");
|
statusBar.appendChild(east);
|
||||||
vbox.setPack("center");
|
|
||||||
LayoutUtils.addSclass("status", vbox);
|
|
||||||
vbox.appendChild(east);
|
|
||||||
rightCell.appendChild(vbox);
|
|
||||||
|
|
||||||
this.appendChild(hbox);
|
this.appendChild(statusBar);
|
||||||
|
|
||||||
statusDB.addEventListener(Events.ON_CLICK, this);
|
statusDB.addEventListener(Events.ON_CLICK, this);
|
||||||
|
|
||||||
|
|
|
@ -75,4 +75,7 @@
|
||||||
border-left: 1px solid #cfcfcf;
|
border-left: 1px solid #cfcfcf;
|
||||||
box-shadow: 0px 0px 1px 1px #cfcfcf;
|
box-shadow: 0px 0px 1px 1px #cfcfcf;
|
||||||
padding-left: 4px;
|
padding-left: 4px;
|
||||||
|
}
|
||||||
|
.z-north, .z-south, .z-west, .z-center, .z-east {
|
||||||
|
border: none;
|
||||||
}
|
}
|
|
@ -6,7 +6,25 @@
|
||||||
border: none !important;
|
border: none !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.info-panel .z-center {
|
.info-panel .statusBar .z-west,
|
||||||
|
.info-panel .statusBar .z-center {
|
||||||
|
background: #F4F4F4;
|
||||||
|
border: none;
|
||||||
|
padding-top: 2px;
|
||||||
|
padding-left: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.info-panel .statusBar .z-east {
|
||||||
|
background: #F4F4F4;
|
||||||
|
border: none;
|
||||||
|
padding-top: 2px;
|
||||||
|
padding-left: 4px;
|
||||||
|
width:24px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.info-panel .z-south-title{
|
||||||
|
bottom: 4px;
|
||||||
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
.info-panel .z-listbox {
|
.info-panel .z-listbox {
|
||||||
|
|
Loading…
Reference in New Issue