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