IDEMPIERE-3921 DateTimeBox assigned Time format. (#354)
* IDEMPIERE-3921 DateTimeBox assigned Time format. Use time pattern defined in language for time fields * IDEMPIERE-3921 DateTimeBox assigned Time format. Move setting format to constructor
This commit is contained in:
parent
d454b03407
commit
ffd05346f9
|
@ -17,7 +17,6 @@ import java.util.Calendar;
|
|||
import java.util.Date;
|
||||
|
||||
import org.zkoss.zk.ui.event.EventListener;
|
||||
import org.zkoss.zul.Timebox;
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
|
@ -0,0 +1,46 @@
|
|||
/***********************************************************************
|
||||
* This file is part of iDempiere ERP Open Source *
|
||||
* http://www.idempiere.org *
|
||||
* *
|
||||
* Copyright (C) Contributors *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or *
|
||||
* modify it under the terms of the GNU General Public License *
|
||||
* as published by the Free Software Foundation; either version 2 *
|
||||
* of the License, or (at your option) any later version. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU General Public License *
|
||||
* along with this program; if not, write to the Free Software *
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, *
|
||||
* MA 02110-1301, USA. *
|
||||
* *
|
||||
* Contributors: *
|
||||
* - Carlos Ruiz - globalqss *
|
||||
**********************************************************************/
|
||||
package org.adempiere.webui.component;
|
||||
|
||||
import org.compiere.model.MLanguage;
|
||||
import org.compiere.util.Env;
|
||||
import org.compiere.util.Language;
|
||||
|
||||
public class Timebox extends org.zkoss.zul.Timebox
|
||||
{
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 3904468791491496039L;
|
||||
|
||||
public Timebox() {
|
||||
super();
|
||||
MLanguage mlang = MLanguage.get(Env.getCtx(), Language.getLoginLanguage());
|
||||
if (mlang != null && mlang.get_ID() > 0 && mlang.getTimePattern() != null) {
|
||||
setFormat(mlang.getTimePattern());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -29,6 +29,7 @@ import org.adempiere.webui.component.Label;
|
|||
import org.adempiere.webui.component.Row;
|
||||
import org.adempiere.webui.component.Rows;
|
||||
import org.adempiere.webui.component.Textbox;
|
||||
import org.adempiere.webui.component.Timebox;
|
||||
import org.adempiere.webui.component.Window;
|
||||
import org.adempiere.webui.editor.WTableDirEditor;
|
||||
import org.adempiere.webui.theme.ThemeManager;
|
||||
|
@ -50,7 +51,6 @@ import org.zkoss.zk.ui.event.EventListener;
|
|||
import org.zkoss.zk.ui.event.Events;
|
||||
import org.zkoss.zul.Center;
|
||||
import org.zkoss.zul.South;
|
||||
import org.zkoss.zul.Timebox;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -245,13 +245,13 @@ public class RequestWindow extends Window implements EventListener<Event> {
|
|||
rows.appendChild(row);
|
||||
row.appendChild(lblStartTime.rightAlign());
|
||||
row.appendChild(tbxStartTime);
|
||||
ZKUpdateUtil.setWidth(tbxStartTime, "40%");
|
||||
ZKUpdateUtil.setWidth(tbxStartTime, "50%");
|
||||
|
||||
row = new Row();
|
||||
rows.appendChild(row);
|
||||
row.appendChild(lblEndTime.rightAlign());
|
||||
row.appendChild(tbxEndTime);
|
||||
ZKUpdateUtil.setWidth(tbxEndTime, "40%");
|
||||
ZKUpdateUtil.setWidth(tbxEndTime, "50%");
|
||||
|
||||
Borderlayout borderlayout = new Borderlayout();
|
||||
this.appendChild(borderlayout);
|
||||
|
|
|
@ -18,6 +18,7 @@ import java.util.Date;
|
|||
import java.util.logging.Level;
|
||||
|
||||
import org.adempiere.webui.ValuePreference;
|
||||
import org.adempiere.webui.component.Timebox;
|
||||
import org.adempiere.webui.event.ContextMenuEvent;
|
||||
import org.adempiere.webui.event.ContextMenuListener;
|
||||
import org.adempiere.webui.event.ValueChangeEvent;
|
||||
|
@ -26,7 +27,6 @@ import org.compiere.model.GridField;
|
|||
import org.compiere.util.CLogger;
|
||||
import org.zkoss.zk.ui.event.Event;
|
||||
import org.zkoss.zk.ui.event.Events;
|
||||
import org.zkoss.zul.Timebox;
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
|
@ -42,6 +42,7 @@ import org.adempiere.webui.component.NumberBox;
|
|||
import org.adempiere.webui.component.Row;
|
||||
import org.adempiere.webui.component.Rows;
|
||||
import org.adempiere.webui.component.Textbox;
|
||||
import org.adempiere.webui.component.Timebox;
|
||||
import org.adempiere.webui.component.Window;
|
||||
import org.adempiere.webui.theme.ThemeManager;
|
||||
import org.adempiere.webui.util.ZKUpdateUtil;
|
||||
|
@ -59,7 +60,6 @@ import org.zkoss.zk.ui.event.EventListener;
|
|||
import org.zkoss.zk.ui.event.Events;
|
||||
import org.zkoss.zul.Div;
|
||||
import org.zkoss.zul.Listitem;
|
||||
import org.zkoss.zul.Timebox;
|
||||
|
||||
/**
|
||||
* Resource Assignment Dialog
|
||||
|
|
Loading…
Reference in New Issue