From 8a1635f42c0feda63efcd4651e0a91bd698a364f Mon Sep 17 00:00:00 2001 From: Nicolas Micoud Date: Wed, 8 Nov 2017 08:26:46 +0100 Subject: [PATCH] IDEMPIERE-3546 Use specific messages for range process parameters placeholder --- .../i5.1/oracle/201711061600_IDEMPIERE-3546.sql | 14 ++++++++++++++ .../postgresql/201711061600_IDEMPIERE-3546.sql | 11 +++++++++++ .../webui/apps/ProcessParameterPanel.java | 8 ++++---- 3 files changed, 29 insertions(+), 4 deletions(-) create mode 100644 migration/i5.1/oracle/201711061600_IDEMPIERE-3546.sql create mode 100644 migration/i5.1/postgresql/201711061600_IDEMPIERE-3546.sql diff --git a/migration/i5.1/oracle/201711061600_IDEMPIERE-3546.sql b/migration/i5.1/oracle/201711061600_IDEMPIERE-3546.sql new file mode 100644 index 0000000000..2f2ecea38c --- /dev/null +++ b/migration/i5.1/oracle/201711061600_IDEMPIERE-3546.sql @@ -0,0 +1,14 @@ +SET SQLBLANKLINES ON +SET DEFINE OFF + +-- IDEMPIERE-3546 - Use specific messages for range process parameters placeholder +-- Nov 6, 2017 4:07:29 PM CET +INSERT INTO AD_Message (MsgType,MsgText,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Message_ID,Value,EntityType,AD_Message_UU) VALUES ('I','From',0,0,'Y',TO_DATE('2017-11-06 16:07:28','YYYY-MM-DD HH24:MI:SS'),0,TO_DATE('2017-11-06 16:07:28','YYYY-MM-DD HH24:MI:SS'),0,200438,'ProcessParameterRangeFrom','D','44852250-153e-462a-b206-897d0c2cd1ab') +; + +-- Nov 6, 2017 4:07:42 PM CET +INSERT INTO AD_Message (MsgType,MsgText,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Message_ID,Value,EntityType,AD_Message_UU) VALUES ('I','To',0,0,'Y',TO_DATE('2017-11-06 16:07:42','YYYY-MM-DD HH24:MI:SS'),0,TO_DATE('2017-11-06 16:07:42','YYYY-MM-DD HH24:MI:SS'),0,200439,'ProcessParameterRangeTo','D','07220887-ecb2-42e9-9665-260041080b52') +; + +SELECT register_migration_script('201711061600_IDEMPIERE-3546.sql') FROM dual +; diff --git a/migration/i5.1/postgresql/201711061600_IDEMPIERE-3546.sql b/migration/i5.1/postgresql/201711061600_IDEMPIERE-3546.sql new file mode 100644 index 0000000000..cc0f923b9a --- /dev/null +++ b/migration/i5.1/postgresql/201711061600_IDEMPIERE-3546.sql @@ -0,0 +1,11 @@ +-- IDEMPIERE-3546 - Use specific messages for range process parameters placeholder +-- Nov 6, 2017 4:07:29 PM CET +INSERT INTO AD_Message (MsgType,MsgText,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Message_ID,Value,EntityType,AD_Message_UU) VALUES ('I','From',0,0,'Y',TO_TIMESTAMP('2017-11-06 16:07:28','YYYY-MM-DD HH24:MI:SS'),0,TO_TIMESTAMP('2017-11-06 16:07:28','YYYY-MM-DD HH24:MI:SS'),0,200438,'ProcessParameterRangeFrom','D','44852250-153e-462a-b206-897d0c2cd1ab') +; + +-- Nov 6, 2017 4:07:42 PM CET +INSERT INTO AD_Message (MsgType,MsgText,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Message_ID,Value,EntityType,AD_Message_UU) VALUES ('I','To',0,0,'Y',TO_TIMESTAMP('2017-11-06 16:07:42','YYYY-MM-DD HH24:MI:SS'),0,TO_TIMESTAMP('2017-11-06 16:07:42','YYYY-MM-DD HH24:MI:SS'),0,200439,'ProcessParameterRangeTo','D','07220887-ecb2-42e9-9665-260041080b52') +; + +SELECT register_migration_script('201711061600_IDEMPIERE-3546.sql') FROM dual +; diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/ProcessParameterPanel.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/ProcessParameterPanel.java index 382d69bea9..3f7ef31270 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/ProcessParameterPanel.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/ProcessParameterPanel.java @@ -333,7 +333,7 @@ public class ProcessParameterPanel extends Panel implements ZKUpdateUtil.setWidth(box, "100%"); box.appendChild(editor.getComponent()); ZKUpdateUtil.setWidth((HtmlBasedComponent) editor.getComponent(), "49%"); - setEditorPlaceHolder(editor, Msg.getMsg(Env.getCtx(), "From")); + setEditorPlaceHolder(editor, Msg.getMsg(Env.getCtx(), "ProcessParameterRangeFrom")); // GridFieldVO voF2 = GridFieldVO.createParameter(voF); GridField mField2 = new GridField(voF2); @@ -348,7 +348,7 @@ public class ProcessParameterPanel extends Panel implements mField2.addPropertyChangeListener(editor2); editor2.dynamicDisplay(); ZKUpdateUtil.setWidth((HtmlBasedComponent) editor2.getComponent(), "49%"); - setEditorPlaceHolder(editor2, Msg.getMsg(Env.getCtx(), "To")); + setEditorPlaceHolder(editor2, Msg.getMsg(Env.getCtx(), "ProcessParameterRangeTo")); // setup editor context menu popupMenu = editor2.getPopupMenu(); if (popupMenu != null) { @@ -417,7 +417,7 @@ public class ProcessParameterPanel extends Panel implements sb.append(", "); sb.append(field.getHeader()); if (m_wEditors2.get(i) != null) // is a range - sb.append(" (").append(Msg.getMsg(Env.getCtx(), "From")).append(")"); + sb.append(" (").append(Msg.getMsg(Env.getCtx(), "ProcessParameterRangeFrom")).append(")"); } else field.setError(false); // Check for Range @@ -433,7 +433,7 @@ public class ProcessParameterPanel extends Panel implements if (sb.length() > 0) sb.append(", "); sb.append(field2.getHeader()); - sb.append(" (").append(Msg.getMsg(Env.getCtx(), "To")).append(")"); + sb.append(" (").append(Msg.getMsg(Env.getCtx(), "ProcessParameterRangeTo")).append(")"); } else field2.setError(false); } // range field