IDEMPIERE-4780 : Dashboard / Report : hardcoded messages (#676)

This commit is contained in:
Nicolas Micoud 2021-05-10 04:15:11 +02:00 committed by GitHub
parent 759473f6ed
commit cdc867eb6d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 26 additions and 2 deletions

View File

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

View File

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

View File

@ -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<Event> {
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);
}