IDEMPIERE-5998:In case there is a document link, the status bar does not show a popup when clicked (#2193)

* IDEMPIERE-5998:In case there is a document link, the status bar does not show a popup when clicked (refactoring code)
This commit is contained in:
hieplq 2024-01-19 19:26:26 +07:00 committed by Carlos Ruiz
parent 7865952db2
commit 076558cc0d
1 changed files with 14 additions and 3 deletions

View File

@ -174,7 +174,6 @@ public class StatusBar extends Panel implements EventListener<Event>
public void setStatusLine (String text, boolean error, ProcessInfoLog[] m_logs)
{
pInfoLogs = m_logs;
Div div = null;
//detect duplicate call within the current execution cycle
Execution execution = Executions.getCurrent();
@ -206,6 +205,8 @@ public class StatusBar extends Panel implements EventListener<Event>
Notification.show(buildNotificationText(m_statusText), "info", findTabpanel(this), "top_left", 2000, true);
}
Div div = buildProcessLogContent(m_logs);
messageContainer.setSclass(error ? "docstatus-error" : "docstatus-normal");
if (!ClientInfo.maxWidth(ClientInfo.SMALL_WIDTH))
{
@ -229,7 +230,15 @@ public class StatusBar extends Panel implements EventListener<Event>
messageContainer.appendChild(label);
label.addEventListener(Events.ON_CLICK, this);
}
}
/**
* add document/record link from ProcessInfoLog to popup
* @param m_logs
* @return
*/
private Div buildProcessLogContent(ProcessInfoLog[] m_logs) {
Div div = null;
//add document/record link from ProcessInfoLog
if (m_logs != null) {
div = new Div();
@ -251,6 +260,8 @@ public class StatusBar extends Panel implements EventListener<Event>
{
msgPopupCnt.appendChild(div);
}
return div;
}
/**