IDEMPIERE-6101 Account Info and other forms don't have Date Range Editor (#2308)
* IDEMPIERE-6101 Account Info doesn't have Date Range Editor * - add DateRangeEditor to Archive Viewer, Fact Reconcile, Match, Trx Material forms
This commit is contained in:
parent
76edaa9e1d
commit
6ab6878eeb
|
@ -35,7 +35,6 @@ import org.adempiere.webui.component.Button;
|
||||||
import org.adempiere.webui.component.Checkbox;
|
import org.adempiere.webui.component.Checkbox;
|
||||||
import org.adempiere.webui.component.Column;
|
import org.adempiere.webui.component.Column;
|
||||||
import org.adempiere.webui.component.Columns;
|
import org.adempiere.webui.component.Columns;
|
||||||
import org.adempiere.webui.component.Datebox;
|
|
||||||
import org.adempiere.webui.component.Grid;
|
import org.adempiere.webui.component.Grid;
|
||||||
import org.adempiere.webui.component.Label;
|
import org.adempiere.webui.component.Label;
|
||||||
import org.adempiere.webui.component.ListModelTable;
|
import org.adempiere.webui.component.ListModelTable;
|
||||||
|
@ -52,11 +51,13 @@ import org.adempiere.webui.component.VerticalBox;
|
||||||
import org.adempiere.webui.component.WListItemRenderer;
|
import org.adempiere.webui.component.WListItemRenderer;
|
||||||
import org.adempiere.webui.component.Window;
|
import org.adempiere.webui.component.Window;
|
||||||
import org.adempiere.webui.desktop.IDesktop;
|
import org.adempiere.webui.desktop.IDesktop;
|
||||||
|
import org.adempiere.webui.editor.WDateEditor;
|
||||||
import org.adempiere.webui.event.DialogEvents;
|
import org.adempiere.webui.event.DialogEvents;
|
||||||
import org.adempiere.webui.panel.InfoPanel;
|
import org.adempiere.webui.panel.InfoPanel;
|
||||||
import org.adempiere.webui.session.SessionManager;
|
import org.adempiere.webui.session.SessionManager;
|
||||||
import org.adempiere.webui.theme.ThemeManager;
|
import org.adempiere.webui.theme.ThemeManager;
|
||||||
import org.adempiere.webui.util.ZKUpdateUtil;
|
import org.adempiere.webui.util.ZKUpdateUtil;
|
||||||
|
import org.adempiere.webui.window.DateRangeButton;
|
||||||
import org.adempiere.webui.window.Dialog;
|
import org.adempiere.webui.window.Dialog;
|
||||||
import org.compiere.model.MAcctSchema;
|
import org.compiere.model.MAcctSchema;
|
||||||
import org.compiere.model.MAcctSchemaElement;
|
import org.compiere.model.MAcctSchemaElement;
|
||||||
|
@ -164,8 +165,8 @@ public class WAcctViewer extends Window implements EventListener<Event>
|
||||||
private Label lSort = new Label();
|
private Label lSort = new Label();
|
||||||
private Label lGroup = new Label();
|
private Label lGroup = new Label();
|
||||||
|
|
||||||
private Datebox selDateFrom = new Datebox();
|
private WDateEditor selDateFrom = new WDateEditor();
|
||||||
private Datebox selDateTo = new Datebox();
|
private WDateEditor selDateTo = new WDateEditor();
|
||||||
|
|
||||||
private Checkbox selDocument = new Checkbox();
|
private Checkbox selDocument = new Checkbox();
|
||||||
private Checkbox displayQty = new Checkbox();
|
private Checkbox displayQty = new Checkbox();
|
||||||
|
@ -327,9 +328,11 @@ public class WAcctViewer extends Window implements EventListener<Event>
|
||||||
row = rows.newRow();
|
row = rows.newRow();
|
||||||
row.appendChild(lDate);
|
row.appendChild(lDate);
|
||||||
hlayout = new Hlayout();
|
hlayout = new Hlayout();
|
||||||
hlayout.appendChild(selDateFrom);
|
hlayout.appendChild(selDateFrom.getComponent());
|
||||||
hlayout.appendChild(new Label(" - "));
|
hlayout.appendChild(new Label(" - "));
|
||||||
hlayout.appendChild(selDateTo);
|
hlayout.appendChild(selDateTo.getComponent());
|
||||||
|
DateRangeButton drb = (new DateRangeButton(selDateFrom, selDateTo));
|
||||||
|
hlayout.appendChild(drb);
|
||||||
row.appendChild(hlayout);
|
row.appendChild(hlayout);
|
||||||
|
|
||||||
// Organization
|
// Organization
|
||||||
|
@ -1193,8 +1196,8 @@ public class WAcctViewer extends Window implements EventListener<Event>
|
||||||
selTable.setEnabled(doc);
|
selTable.setEnabled(doc);
|
||||||
selRecord.setEnabled(doc);
|
selRecord.setEnabled(doc);
|
||||||
//
|
//
|
||||||
selDateFrom.setEnabled(!doc);
|
selDateFrom.setReadWrite(!doc);
|
||||||
selDateTo.setEnabled(!doc);
|
selDateTo.setReadWrite(!doc);
|
||||||
selOrg.setEnabled(!doc);
|
selOrg.setEnabled(!doc);
|
||||||
selAcct.setEnabled(!doc);
|
selAcct.setEnabled(!doc);
|
||||||
sel1.setEnabled(!doc);
|
sel1.setEnabled(!doc);
|
||||||
|
|
|
@ -41,7 +41,6 @@ import org.adempiere.webui.component.Checkbox;
|
||||||
import org.adempiere.webui.component.Column;
|
import org.adempiere.webui.component.Column;
|
||||||
import org.adempiere.webui.component.Columns;
|
import org.adempiere.webui.component.Columns;
|
||||||
import org.adempiere.webui.component.ConfirmPanel;
|
import org.adempiere.webui.component.ConfirmPanel;
|
||||||
import org.adempiere.webui.component.Datebox;
|
|
||||||
import org.adempiere.webui.component.DatetimeBox;
|
import org.adempiere.webui.component.DatetimeBox;
|
||||||
import org.adempiere.webui.component.Grid;
|
import org.adempiere.webui.component.Grid;
|
||||||
import org.adempiere.webui.component.GridFactory;
|
import org.adempiere.webui.component.GridFactory;
|
||||||
|
@ -57,6 +56,7 @@ import org.adempiere.webui.component.Tabpanels;
|
||||||
import org.adempiere.webui.component.Tabs;
|
import org.adempiere.webui.component.Tabs;
|
||||||
import org.adempiere.webui.component.Textbox;
|
import org.adempiere.webui.component.Textbox;
|
||||||
import org.adempiere.webui.component.ToolBarButton;
|
import org.adempiere.webui.component.ToolBarButton;
|
||||||
|
import org.adempiere.webui.editor.WDateEditor;
|
||||||
import org.adempiere.webui.editor.WSearchEditor;
|
import org.adempiere.webui.editor.WSearchEditor;
|
||||||
import org.adempiere.webui.panel.ADForm;
|
import org.adempiere.webui.panel.ADForm;
|
||||||
import org.adempiere.webui.panel.CustomForm;
|
import org.adempiere.webui.panel.CustomForm;
|
||||||
|
@ -64,6 +64,7 @@ import org.adempiere.webui.panel.IFormController;
|
||||||
import org.adempiere.webui.session.SessionManager;
|
import org.adempiere.webui.session.SessionManager;
|
||||||
import org.adempiere.webui.theme.ThemeManager;
|
import org.adempiere.webui.theme.ThemeManager;
|
||||||
import org.adempiere.webui.util.ZKUpdateUtil;
|
import org.adempiere.webui.util.ZKUpdateUtil;
|
||||||
|
import org.adempiere.webui.window.DateRangeButton;
|
||||||
import org.adempiere.webui.window.Dialog;
|
import org.adempiere.webui.window.Dialog;
|
||||||
import org.adempiere.webui.window.WEMailDialog;
|
import org.adempiere.webui.window.WEMailDialog;
|
||||||
import org.compiere.apps.form.Archive;
|
import org.compiere.apps.form.Archive;
|
||||||
|
@ -178,9 +179,9 @@ public class WArchiveViewer extends Archive implements IFormController, EventLis
|
||||||
private Listbox createdByQField = new Listbox();
|
private Listbox createdByQField = new Listbox();
|
||||||
private Label createdQLabel = new Label(Msg.translate(Env.getCtx(), "Created"));
|
private Label createdQLabel = new Label(Msg.translate(Env.getCtx(), "Created"));
|
||||||
/** Created date from field of query tab */
|
/** Created date from field of query tab */
|
||||||
private Datebox createdQFrom = new Datebox();
|
private WDateEditor createdQFrom = new WDateEditor();
|
||||||
/** Created date to field of query tab */
|
/** Created date to field of query tab */
|
||||||
private Datebox createdQTo = new Datebox();
|
private WDateEditor createdQTo = new WDateEditor();
|
||||||
|
|
||||||
//Viewer Tab
|
//Viewer Tab
|
||||||
/** Prior button of viewer tab */
|
/** Prior button of viewer tab */
|
||||||
|
@ -457,8 +458,10 @@ public class WArchiveViewer extends Archive implements IFormController, EventLis
|
||||||
rows.appendChild(row);
|
rows.appendChild(row);
|
||||||
row.appendChild(createdQLabel);
|
row.appendChild(createdQLabel);
|
||||||
Hbox hbox = new Hbox();
|
Hbox hbox = new Hbox();
|
||||||
hbox.appendChild(createdQFrom);
|
hbox.appendChild(createdQFrom.getComponent());
|
||||||
hbox.appendChild(createdQTo);
|
hbox.appendChild(createdQTo.getComponent());
|
||||||
|
DateRangeButton drb = (new DateRangeButton(createdQFrom, createdQTo));
|
||||||
|
hbox.appendChild(drb);
|
||||||
row.appendChild(hbox);
|
row.appendChild(hbox);
|
||||||
row.appendChild(new Space());
|
row.appendChild(new Space());
|
||||||
|
|
||||||
|
|
|
@ -67,6 +67,7 @@ import org.adempiere.webui.panel.IFormController;
|
||||||
import org.adempiere.webui.session.SessionManager;
|
import org.adempiere.webui.session.SessionManager;
|
||||||
import org.adempiere.webui.theme.ThemeManager;
|
import org.adempiere.webui.theme.ThemeManager;
|
||||||
import org.adempiere.webui.util.ZKUpdateUtil;
|
import org.adempiere.webui.util.ZKUpdateUtil;
|
||||||
|
import org.adempiere.webui.window.DateRangeButton;
|
||||||
import org.compiere.apps.form.FactReconcile;
|
import org.compiere.apps.form.FactReconcile;
|
||||||
import org.compiere.model.MClient;
|
import org.compiere.model.MClient;
|
||||||
import org.compiere.model.MColumn;
|
import org.compiere.model.MColumn;
|
||||||
|
@ -86,6 +87,7 @@ import org.zkoss.zk.ui.event.EventListener;
|
||||||
import org.zkoss.zk.ui.event.Events;
|
import org.zkoss.zk.ui.event.Events;
|
||||||
import org.zkoss.zul.Borderlayout;
|
import org.zkoss.zul.Borderlayout;
|
||||||
import org.zkoss.zul.Center;
|
import org.zkoss.zul.Center;
|
||||||
|
import org.zkoss.zul.Hbox;
|
||||||
import org.zkoss.zul.North;
|
import org.zkoss.zul.North;
|
||||||
import org.zkoss.zul.South;
|
import org.zkoss.zul.South;
|
||||||
|
|
||||||
|
@ -261,11 +263,14 @@ implements IFormController, EventListener<Event>, WTableModelListener, ValueChan
|
||||||
row.appendCellChild(fieldProduct.getComponent(), 2);
|
row.appendCellChild(fieldProduct.getComponent(), 2);
|
||||||
row = rows.newRow();
|
row = rows.newRow();
|
||||||
row.appendCellChild(labelDateAcct.rightAlign());
|
row.appendCellChild(labelDateAcct.rightAlign());
|
||||||
ZKUpdateUtil.setHflex(fieldDateAcct.getComponent(), "true");
|
|
||||||
row.appendCellChild(fieldDateAcct.getComponent(), 2);
|
row.appendCellChild(fieldDateAcct.getComponent(), 2);
|
||||||
row.appendCellChild(labelDateAcct2.rightAlign());
|
row.appendCellChild(labelDateAcct2.rightAlign());
|
||||||
ZKUpdateUtil.setHflex(fieldDateAcct2.getComponent(), "true");
|
Hbox boxTo = new Hbox();
|
||||||
row.appendCellChild(fieldDateAcct2.getComponent(), 2);
|
boxTo.appendChild(fieldDateAcct2.getComponent());
|
||||||
|
DateRangeButton drb = (new DateRangeButton(fieldDateAcct, fieldDateAcct2));
|
||||||
|
boxTo.appendChild(drb);
|
||||||
|
row.appendCellChild(boxTo, 2);
|
||||||
|
|
||||||
row = rows.newRow();
|
row = rows.newRow();
|
||||||
row.appendChild(bRefresh);
|
row.appendChild(bRefresh);
|
||||||
if (ClientInfo.maxWidth(ClientInfo.EXTRA_SMALL_WIDTH-1))
|
if (ClientInfo.maxWidth(ClientInfo.EXTRA_SMALL_WIDTH-1))
|
||||||
|
|
|
@ -52,6 +52,7 @@ import org.adempiere.webui.panel.IFormController;
|
||||||
import org.adempiere.webui.panel.StatusBarPanel;
|
import org.adempiere.webui.panel.StatusBarPanel;
|
||||||
import org.adempiere.webui.session.SessionManager;
|
import org.adempiere.webui.session.SessionManager;
|
||||||
import org.adempiere.webui.util.ZKUpdateUtil;
|
import org.adempiere.webui.util.ZKUpdateUtil;
|
||||||
|
import org.adempiere.webui.window.DateRangeButton;
|
||||||
import org.compiere.apps.form.Match;
|
import org.compiere.apps.form.Match;
|
||||||
import org.compiere.minigrid.ColumnInfo;
|
import org.compiere.minigrid.ColumnInfo;
|
||||||
import org.compiere.minigrid.IDColumn;
|
import org.compiere.minigrid.IDColumn;
|
||||||
|
@ -65,9 +66,10 @@ import org.zkoss.zk.ui.event.EventListener;
|
||||||
import org.zkoss.zk.ui.event.Events;
|
import org.zkoss.zk.ui.event.Events;
|
||||||
import org.zkoss.zul.Borderlayout;
|
import org.zkoss.zul.Borderlayout;
|
||||||
import org.zkoss.zul.Center;
|
import org.zkoss.zul.Center;
|
||||||
|
import org.zkoss.zul.Hbox;
|
||||||
import org.zkoss.zul.North;
|
import org.zkoss.zul.North;
|
||||||
import org.zkoss.zul.South;
|
|
||||||
import org.zkoss.zul.Separator;
|
import org.zkoss.zul.Separator;
|
||||||
|
import org.zkoss.zul.South;
|
||||||
import org.zkoss.zul.Space;
|
import org.zkoss.zul.Space;
|
||||||
import org.zkoss.zul.Vlayout;
|
import org.zkoss.zul.Vlayout;
|
||||||
|
|
||||||
|
@ -342,7 +344,11 @@ public class WMatch extends Match
|
||||||
row.appendChild(dateFromLabel.rightAlign());
|
row.appendChild(dateFromLabel.rightAlign());
|
||||||
row.appendChild(dateFrom.getComponent());
|
row.appendChild(dateFrom.getComponent());
|
||||||
row.appendChild(dateToLabel.rightAlign());
|
row.appendChild(dateToLabel.rightAlign());
|
||||||
row.appendChild(dateTo.getComponent());
|
Hbox boxTo = new Hbox();
|
||||||
|
boxTo.appendChild(dateTo.getComponent());
|
||||||
|
DateRangeButton drb = (new DateRangeButton(dateFrom, dateTo));
|
||||||
|
boxTo.appendChild(drb);
|
||||||
|
row.appendChild(boxTo);
|
||||||
bSearch.setStyle("float: right");
|
bSearch.setStyle("float: right");
|
||||||
int r = row.getChildren().size() % noOfColumn;
|
int r = row.getChildren().size() % noOfColumn;
|
||||||
row.appendCellChild(bSearch, noOfColumn-r);
|
row.appendCellChild(bSearch, noOfColumn-r);
|
||||||
|
|
|
@ -43,6 +43,7 @@ import org.adempiere.webui.panel.IFormController;
|
||||||
import org.adempiere.webui.panel.StatusBarPanel;
|
import org.adempiere.webui.panel.StatusBarPanel;
|
||||||
import org.adempiere.webui.session.SessionManager;
|
import org.adempiere.webui.session.SessionManager;
|
||||||
import org.adempiere.webui.util.ZKUpdateUtil;
|
import org.adempiere.webui.util.ZKUpdateUtil;
|
||||||
|
import org.adempiere.webui.window.DateRangeButton;
|
||||||
import org.compiere.apps.form.TrxMaterial;
|
import org.compiere.apps.form.TrxMaterial;
|
||||||
import org.compiere.model.MLocatorLookup;
|
import org.compiere.model.MLocatorLookup;
|
||||||
import org.compiere.model.MLookup;
|
import org.compiere.model.MLookup;
|
||||||
|
@ -54,6 +55,7 @@ import org.zkoss.zk.ui.event.Event;
|
||||||
import org.zkoss.zk.ui.event.EventListener;
|
import org.zkoss.zk.ui.event.EventListener;
|
||||||
import org.zkoss.zul.Borderlayout;
|
import org.zkoss.zul.Borderlayout;
|
||||||
import org.zkoss.zul.Center;
|
import org.zkoss.zul.Center;
|
||||||
|
import org.zkoss.zul.Hbox;
|
||||||
import org.zkoss.zul.North;
|
import org.zkoss.zul.North;
|
||||||
import org.zkoss.zul.South;
|
import org.zkoss.zul.South;
|
||||||
|
|
||||||
|
@ -225,7 +227,11 @@ public class WTrxMaterial extends TrxMaterial
|
||||||
row = rows.newRow();
|
row = rows.newRow();
|
||||||
}
|
}
|
||||||
row.appendCellChild(dateTLabel.rightAlign());
|
row.appendCellChild(dateTLabel.rightAlign());
|
||||||
row.appendCellChild(dateTField.getComponent());
|
Hbox boxTo = new Hbox();
|
||||||
|
boxTo.appendChild(dateTField.getComponent());
|
||||||
|
DateRangeButton drb = (new DateRangeButton(dateFField, dateTField));
|
||||||
|
boxTo.appendChild(drb);
|
||||||
|
row.appendCellChild(boxTo);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue