diff --git a/migration/iD10/oracle/202206221758_IDEMPIERE-5300.sql b/migration/iD10/oracle/202206221758_IDEMPIERE-5300.sql new file mode 100644 index 0000000000..ce4e8595e9 --- /dev/null +++ b/migration/iD10/oracle/202206221758_IDEMPIERE-5300.sql @@ -0,0 +1,10 @@ +-- IDEMPIERE-5300 ErrorMsg doesn't show full message + LifeTime Msg configurable +SELECT register_migration_script('202206221758_IDEMPIERE-5300.sql') FROM dual; + +SET SQLBLANKLINES ON +SET DEFINE OFF + +-- Jun 22, 2022, 5:58:45 PM CEST +INSERT INTO AD_SysConfig (AD_SysConfig_ID,AD_Client_ID,AD_Org_ID,Created,Updated,CreatedBy,UpdatedBy,IsActive,Name,Value,Description,EntityType,ConfigurationLevel,AD_SysConfig_UU) VALUES (200200,0,0,TO_TIMESTAMP('2022-06-22 17:58:44','YYYY-MM-DD HH24:MI:SS'),TO_TIMESTAMP('2022-06-22 17:58:44','YYYY-MM-DD HH24:MI:SS'),100,100,'Y','ZK_ERROR_MSG_LIFETIME_MILLISECONDS','3500','Lifetime for the popup error message on windows. Setting to zero will make the popup stay open and requires manual closing','D','C','634c3da3-bb6c-4476-8d3f-a158ef36efd1') +; + diff --git a/migration/iD10/postgresql/202206221758_IDEMPIERE-5300.sql b/migration/iD10/postgresql/202206221758_IDEMPIERE-5300.sql new file mode 100644 index 0000000000..5bba6e2b66 --- /dev/null +++ b/migration/iD10/postgresql/202206221758_IDEMPIERE-5300.sql @@ -0,0 +1,7 @@ +-- IDEMPIERE-5300 ErrorMsg doesn't show full message + LifeTime Msg configurable +SELECT register_migration_script('202206221758_IDEMPIERE-5300.sql') FROM dual; + +-- Jun 22, 2022, 5:58:45 PM CEST +INSERT INTO AD_SysConfig (AD_SysConfig_ID,AD_Client_ID,AD_Org_ID,Created,Updated,CreatedBy,UpdatedBy,IsActive,Name,Value,Description,EntityType,ConfigurationLevel,AD_SysConfig_UU) VALUES (200200,0,0,TO_TIMESTAMP('2022-06-22 17:58:44','YYYY-MM-DD HH24:MI:SS'),TO_TIMESTAMP('2022-06-22 17:58:44','YYYY-MM-DD HH24:MI:SS'),100,100,'Y','ZK_ERROR_MSG_LIFETIME_MILLISECONDS','3500','Lifetime for the popup error message on windows. Setting to zero will make the popup stay open and requires manual closing','D','C','634c3da3-bb6c-4476-8d3f-a158ef36efd1') +; + diff --git a/org.adempiere.base/src/org/compiere/model/MSysConfig.java b/org.adempiere.base/src/org/compiere/model/MSysConfig.java index 733809ae27..7548089a91 100644 --- a/org.adempiere.base/src/org/compiere/model/MSysConfig.java +++ b/org.adempiere.base/src/org/compiere/model/MSysConfig.java @@ -44,7 +44,7 @@ public class MSysConfig extends X_AD_SysConfig /** * */ - private static final long serialVersionUID = -8518931184171552658L; + private static final long serialVersionUID = 4959612634759674069L; public static final String ADDRESS_VALIDATION = "ADDRESS_VALIDATION"; public static final String ALERT_SEND_ATTACHMENT_AS_XLS = "ALERT_SEND_ATTACHMENT_AS_XLS"; @@ -192,6 +192,7 @@ public class MSysConfig extends X_AD_SysConfig public static final String ZK_DESKTOP_SHOW_TAB_LIST_BUTTON = "ZK_DESKTOP_SHOW_TAB_LIST_BUTTON"; public static final String ZK_DESKTOP_TAB_AUTO_SHRINK_TO_FIT = "ZK_DESKTOP_TAB_AUTO_SHRINK_TO_FIT"; public static final String ZK_DESKTOP_TAB_MAX_TITLE_LENGTH = "ZK_DESKTOP_TAB_MAX_TITLE_LENGTH"; + public static final String ZK_ERROR_MSG_LIFETIME_MILLISECONDS = "ZK_ERROR_MSG_LIFETIME_MILLISECONDS"; public static final String ZK_FLAT_VIEW_MENU_TREE = "ZK_FLAT_VIEW_MENU_TREE"; public static final String ZK_FOOTER_SERVER_DATETIME_FORMAT = "ZK_FOOTER_SERVER_DATETIME_FORMAT"; public static final String ZK_FOOTER_SERVER_MSG = "ZK_FOOTER_SERVER_MSG"; diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/StatusBar.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/StatusBar.java index 9f736d07e8..87415d67cc 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/StatusBar.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/StatusBar.java @@ -27,7 +27,9 @@ import org.adempiere.webui.component.Tabpanel; import org.adempiere.webui.component.Window; import org.adempiere.webui.util.ZKUpdateUtil; import org.adempiere.webui.window.WTextEditorDialog; +import org.compiere.model.MSysConfig; import org.compiere.process.ProcessInfoLog; +import org.compiere.util.Env; import org.zkoss.zk.ui.Component; import org.zkoss.zk.ui.Execution; import org.zkoss.zk.ui.Executions; @@ -173,8 +175,9 @@ public class StatusBar extends Panel implements EventListener return; String labelText = buildLabelText(m_statusText); + int duration = MSysConfig.getIntValue(MSysConfig.ZK_ERROR_MSG_LIFETIME_MILLISECONDS, 3500, Env.getAD_Client_ID(Env.getCtx())); if (error) { - Notification.show(buildNotificationText(m_statusText), "error", findTabpanel(this), "top_left", 3500, true); + Notification.show(buildNotificationText(m_statusText), "error", findTabpanel(this), "top_left", duration, true); } else if (ClientInfo.maxWidth(ClientInfo.SMALL_WIDTH)) { Notification.show(buildNotificationText(m_statusText), "info", findTabpanel(this), "top_left", 2000, true); }