From cdc867eb6def250f3209d90761bf0a2838f4b5c8 Mon Sep 17 00:00:00 2001 From: Nicolas Micoud <58596990+nmicoud@users.noreply.github.com> Date: Mon, 10 May 2021 04:15:11 +0200 Subject: [PATCH] IDEMPIERE-4780 : Dashboard / Report : hardcoded messages (#676) --- .../i8.2/oracle/202105061420_IDEMPIERE-4780.sql | 13 +++++++++++++ .../i8.2/postgresql/202105061420_IDEMPIERE-4780.sql | 10 ++++++++++ .../webui/desktop/DashboardController.java | 5 +++-- 3 files changed, 26 insertions(+), 2 deletions(-) create mode 100644 migration/i8.2/oracle/202105061420_IDEMPIERE-4780.sql create mode 100644 migration/i8.2/postgresql/202105061420_IDEMPIERE-4780.sql diff --git a/migration/i8.2/oracle/202105061420_IDEMPIERE-4780.sql b/migration/i8.2/oracle/202105061420_IDEMPIERE-4780.sql new file mode 100644 index 0000000000..350a5f84be --- /dev/null +++ b/migration/i8.2/oracle/202105061420_IDEMPIERE-4780.sql @@ -0,0 +1,13 @@ +SET SQLBLANKLINES ON +SET DEFINE OFF + +-- May 6, 2021, 2:19:41 PM CEST +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','Open run dialog',0,0,'Y',TO_DATE('2021-05-06 14:19:41','YYYY-MM-DD HH24:MI:SS'),0,TO_DATE('2021-05-06 14:19:41','YYYY-MM-DD HH24:MI:SS'),0,200675,'OpenRunDialog','D','37c7d67f-2a8b-479e-85e2-53cce5861fd7') +; + +-- May 6, 2021, 2:20:03 PM CEST +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','View report in new tab',0,0,'Y',TO_DATE('2021-05-06 14:20:03','YYYY-MM-DD HH24:MI:SS'),0,TO_DATE('2021-05-06 14:20:03','YYYY-MM-DD HH24:MI:SS'),0,200676,'ViewReportInNewTab','D','df6e54ee-dc5b-46a6-b2fe-29f8a4a72b93') +; + +SELECT register_migration_script('202105061420_IDEMPIERE-4780.sql') FROM dual +; diff --git a/migration/i8.2/postgresql/202105061420_IDEMPIERE-4780.sql b/migration/i8.2/postgresql/202105061420_IDEMPIERE-4780.sql new file mode 100644 index 0000000000..745fd89b5c --- /dev/null +++ b/migration/i8.2/postgresql/202105061420_IDEMPIERE-4780.sql @@ -0,0 +1,10 @@ +-- May 6, 2021, 2:19:42 PM CEST +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','Open run dialog',0,0,'Y',TO_TIMESTAMP('2021-05-06 14:19:41','YYYY-MM-DD HH24:MI:SS'),0,TO_TIMESTAMP('2021-05-06 14:19:41','YYYY-MM-DD HH24:MI:SS'),0,200675,'OpenRunDialog','D','37c7d67f-2a8b-479e-85e2-53cce5861fd7') +; + +-- May 6, 2021, 2:20:03 PM CEST +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','View report in new tab',0,0,'Y',TO_TIMESTAMP('2021-05-06 14:20:03','YYYY-MM-DD HH24:MI:SS'),0,TO_TIMESTAMP('2021-05-06 14:20:03','YYYY-MM-DD HH24:MI:SS'),0,200676,'ViewReportInNewTab','D','df6e54ee-dc5b-46a6-b2fe-29f8a4a72b93') +; + +SELECT register_migration_script('202105061420_IDEMPIERE-4780.sql') FROM dual +; diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/desktop/DashboardController.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/desktop/DashboardController.java index f3d0c57850..621ddf2c8a 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/desktop/DashboardController.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/desktop/DashboardController.java @@ -59,6 +59,7 @@ import org.compiere.util.CLogger; import org.compiere.util.DB; import org.compiere.util.DisplayType; import org.compiere.util.Env; +import org.compiere.util.Msg; import org.zkoss.util.media.AMedia; import org.zkoss.zk.ui.Component; import org.zkoss.zk.ui.Desktop; @@ -419,14 +420,14 @@ public class DashboardController implements EventListener { Toolbar toolbar = new Toolbar(); content.appendChild(toolbar); - btn.setLabel("Open run dialog"); + btn.setLabel(Msg.getMsg(Env.getCtx(), "OpenRunDialog")); toolbar.appendChild(btn); btn = new ToolBarButton(); btn.setAttribute("AD_Process_ID", AD_Process_ID); btn.setAttribute("ProcessParameters", processParameters); btn.addEventListener(Events.ON_CLICK, this); - btn.setLabel("View report in new tab"); + btn.setLabel(Msg.getMsg(Env.getCtx(), "ViewReportInNewTab")); toolbar.appendChild(new Separator("vertical")); toolbar.appendChild(btn); }