IDEMPIERE-548 Zk: Error notification show at two different location at the same time.
This commit is contained in:
parent
90d521b3a2
commit
44d863d488
|
@ -24,6 +24,7 @@ import org.adempiere.webui.LayoutUtils;
|
|||
import org.adempiere.webui.apps.AEnv;
|
||||
import org.adempiere.webui.component.Label;
|
||||
import org.adempiere.webui.component.Menupopup;
|
||||
import org.adempiere.webui.component.Tabpanel;
|
||||
import org.adempiere.webui.component.ToolBar;
|
||||
import org.adempiere.webui.component.ToolBarButton;
|
||||
import org.adempiere.webui.component.Window;
|
||||
|
@ -387,7 +388,7 @@ public class BreadCrumb extends Div implements EventListener<Event> {
|
|||
messageContainer.appendChild(image);
|
||||
String labelText = buildLabelText(m_statusText);
|
||||
if (error) {
|
||||
Clients.showNotification(buildNotificationText(m_statusText), "error", image, "overlap_start", 3500, true);
|
||||
Clients.showNotification(buildNotificationText(m_statusText), "error", findTabpanel(this), "top_left", 3500, true);
|
||||
}
|
||||
Label label = new Label(labelText);
|
||||
messageContainer.appendChild(label);
|
||||
|
@ -429,6 +430,16 @@ public class BreadCrumb extends Div implements EventListener<Event> {
|
|||
|
||||
}
|
||||
|
||||
private Component findTabpanel(BreadCrumb breadCrumb) {
|
||||
Component parent = breadCrumb.getParent();
|
||||
while (parent != null) {
|
||||
if (parent instanceof Tabpanel)
|
||||
return parent;
|
||||
|
||||
parent = parent.getParent();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private void doZoom(RecordLink link) {
|
||||
int Record_ID = 0;
|
||||
|
|
|
@ -351,7 +351,7 @@ public class DetailPane extends Panel implements EventListener<Event>, IdSpace {
|
|||
messageContainer.appendChild(image);
|
||||
String labelText = buildLabelText(status);
|
||||
if (error) {
|
||||
Clients.showNotification(buildNotificationText(status), "error", image, "overlap_start", 3500, true);
|
||||
Clients.showNotification(buildNotificationText(status), "error", findTabpanel(this), "top_left", 3500, true);
|
||||
}
|
||||
Label label = new Label(labelText);
|
||||
messageContainer.appendChild(label);
|
||||
|
@ -581,4 +581,15 @@ public class DetailPane extends Panel implements EventListener<Event>, IdSpace {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
private Component findTabpanel(Component comp) {
|
||||
Component parent = comp.getParent();
|
||||
while (parent != null) {
|
||||
if (parent instanceof Tabpanel)
|
||||
return parent;
|
||||
|
||||
parent = parent.getParent();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -957,7 +957,11 @@ tbody.z-grid-empty-body td {
|
|||
<%-- notification message --%>
|
||||
.z-notification .z-notification-cl,
|
||||
.z-notification .z-notification-cnt {
|
||||
width: 300px;
|
||||
width: 400px;
|
||||
}
|
||||
|
||||
.z-notification {
|
||||
padding: 3px !important;
|
||||
}
|
||||
|
||||
<%-- toolbar popup dialog --%>
|
||||
|
|
Loading…
Reference in New Issue