IDEMPIERE-5300 ErrorMsg doesn't show full message + LifeTime Msg conf… (#1342)
* IDEMPIERE-5300 ErrorMsg doesn't show full message + LifeTime Msg configurable * IDEMPIERE-5300 ErrorMsg doesn't show full message + LifeTime Msg configurable / peer review / solve issues requested by Heng Sin Co-authored-by: Carlos Ruiz <carg67@gmail.com>
This commit is contained in:
parent
417ef846a3
commit
06c41d2c68
|
@ -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')
|
||||
;
|
||||
|
|
@ -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')
|
||||
;
|
||||
|
|
@ -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";
|
||||
|
|
|
@ -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<Event>
|
|||
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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue