fixes #39 Unify format of datefields on forms
http://bitbucket.org/idempiere/idempiere/issue/39
This commit is contained in:
parent
26337eddb8
commit
f1dc9e783c
|
@ -304,9 +304,7 @@ public class WArchiveViewer extends Archive implements IFormController, EventLis
|
|||
div.appendChild(createdQLabel);
|
||||
row.appendChild(div);
|
||||
row.appendChild(createdQFrom);
|
||||
createdQFrom.setWidth("100%");
|
||||
row.appendChild(createdQTo);
|
||||
createdQTo.setWidth("100%");
|
||||
|
||||
div = new Div();
|
||||
div.setAlign("center");
|
||||
|
|
|
@ -17,6 +17,10 @@
|
|||
|
||||
package org.adempiere.webui.component;
|
||||
|
||||
import org.adempiere.webui.apps.AEnv;
|
||||
import org.compiere.util.DisplayType;
|
||||
import org.compiere.util.Env;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author <a href="mailto:agramdass@gmail.com">Ashley G Ramdass</a>
|
||||
|
@ -25,11 +29,16 @@ package org.adempiere.webui.component;
|
|||
*/
|
||||
public class Datebox extends org.zkoss.zul.Datebox
|
||||
{
|
||||
/**
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = -5890574778856946570L;
|
||||
|
||||
public Datebox() {
|
||||
super();
|
||||
setFormat(DisplayType.getDateFormat(AEnv.getLanguage(Env.getCtx())).toPattern());
|
||||
}
|
||||
|
||||
public void setEnabled(boolean enabled)
|
||||
{
|
||||
this.setReadonly(!enabled);
|
||||
|
|
|
@ -280,7 +280,6 @@ public class WListItemRenderer implements ListitemRenderer, EventListener, Listi
|
|||
if (isCellEditable)
|
||||
{
|
||||
Datebox datebox = new Datebox();
|
||||
datebox.setFormat(dateFormat.toPattern());
|
||||
datebox.setValue(new Date(((Timestamp)field).getTime()));
|
||||
datebox.addEventListener(Events.ON_CHANGE, this);
|
||||
listcell.appendChild(datebox);
|
||||
|
|
|
@ -106,7 +106,6 @@ public class WDateEditor extends WEditor implements ContextMenuListener
|
|||
|
||||
private void init()
|
||||
{
|
||||
getComponent().setFormat(DisplayType.getDateFormat(AEnv.getLanguage(Env.getCtx())).toPattern());
|
||||
popupMenu = new WEditorPopupMenu(false, false, true);
|
||||
popupMenu.addMenuListener(this);
|
||||
if (gridField != null && gridField.getGridTab() != null)
|
||||
|
|
|
@ -98,7 +98,6 @@ public class WDatetimeEditor extends WEditor implements ContextMenuListener
|
|||
|
||||
private void init()
|
||||
{
|
||||
getComponent().setDateFormat(DisplayType.getDateFormat());
|
||||
popupMenu = new WEditorPopupMenu(false, false, true);
|
||||
popupMenu.addMenuListener(this);
|
||||
if (gridField != null && gridField.getGridTab() != null)
|
||||
|
|
|
@ -174,7 +174,7 @@ public class WAssignmentDialog extends Window implements EventListener
|
|||
Div div = new Div();
|
||||
div.appendChild(fDateFrom);
|
||||
div.appendChild(fTimeFrom);
|
||||
fTimeFrom.setStyle("margin-left: 5px");
|
||||
fTimeFrom.setStyle("margin-left: 1px");
|
||||
row.appendChild(div);
|
||||
rows.appendChild(row);
|
||||
|
||||
|
|
Loading…
Reference in New Issue