fixes #39 Unify format of datefields on forms

http://bitbucket.org/idempiere/idempiere/issue/39
This commit is contained in:
Carlos Ruiz 2011-06-16 21:54:03 -05:00
parent 26337eddb8
commit f1dc9e783c
6 changed files with 11 additions and 7 deletions

View File

@ -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");

View File

@ -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);

View File

@ -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);

View File

@ -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)

View File

@ -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)

View File

@ -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);