IDEMPIERE-5805 - Dashboard Help Icon Produces Unwanted Network Requests (#1947)
This commit is contained in:
parent
236cd6bddc
commit
a72caac1fc
|
@ -57,6 +57,6 @@ Copyright (C) 2007 Ashley G Ramdass (ADempiere WebUI).
|
||||||
|
|
||||||
<!-- this js module doesn't actually exists and it is here for default theme version -->
|
<!-- this js module doesn't actually exists and it is here for default theme version -->
|
||||||
<!-- since loading of js module is on demand, it doesn't cause any error as long as you don't try to load it -->
|
<!-- since loading of js module is on demand, it doesn't cause any error as long as you don't try to load it -->
|
||||||
<javascript-module name="idempiere.theme.default" version="202307100900" />
|
<javascript-module name="idempiere.theme.default" version="202307191000" />
|
||||||
|
|
||||||
</language>
|
</language>
|
||||||
|
|
|
@ -117,7 +117,6 @@ import org.zkoss.zul.Iframe;
|
||||||
import org.zkoss.zul.Include;
|
import org.zkoss.zul.Include;
|
||||||
import org.zkoss.zul.Panel;
|
import org.zkoss.zul.Panel;
|
||||||
import org.zkoss.zul.Panelchildren;
|
import org.zkoss.zul.Panelchildren;
|
||||||
import org.zkoss.zul.Popup;
|
|
||||||
import org.zkoss.zul.Separator;
|
import org.zkoss.zul.Separator;
|
||||||
import org.zkoss.zul.Timer;
|
import org.zkoss.zul.Timer;
|
||||||
import org.zkoss.zul.Toolbar;
|
import org.zkoss.zul.Toolbar;
|
||||||
|
@ -434,32 +433,18 @@ public class DashboardController implements EventListener<Event> {
|
||||||
* @param text
|
* @param text
|
||||||
*/
|
*/
|
||||||
private void renderHelpButton(Caption caption, String text) {
|
private void renderHelpButton(Caption caption, String text) {
|
||||||
A help = new A();
|
A icon = new A();
|
||||||
help.setSclass("dashboard-content-help-icon");
|
icon.setSclass("dashboard-content-help-icon");
|
||||||
help.setVisible(false);
|
|
||||||
if (ThemeManager.isUseFontIconForImage())
|
if (ThemeManager.isUseFontIconForImage())
|
||||||
help.setIconSclass("z-icon-Help");
|
icon.setIconSclass("z-icon-Help");
|
||||||
else
|
else
|
||||||
help.setImage(ThemeManager.getThemeResource(IMAGES_CONTEXT_HELP_PNG));
|
icon.setImage(ThemeManager.getThemeResource(IMAGES_CONTEXT_HELP_PNG));
|
||||||
caption.appendChild(help);
|
caption.appendChild(icon);
|
||||||
Popup popup = new Popup();
|
Div popup = new Div();
|
||||||
popup.setPopup(popup);
|
|
||||||
Text t = new Text(text);
|
Text t = new Text(text);
|
||||||
popup.setSclass("dashboard-content-help");
|
popup.setSclass("dashboard-content-help-popup");
|
||||||
popup.appendChild(t);
|
popup.appendChild(t);
|
||||||
help.setTooltip(popup);
|
caption.appendChild(popup);
|
||||||
help.addEventListener(Events.ON_MOUSE_OVER, (Event event) -> {
|
|
||||||
popup.setPage(help.getPage());
|
|
||||||
popup.open(help, "after_start");
|
|
||||||
LayoutUtils.autoDetachOnClose(popup);
|
|
||||||
});
|
|
||||||
caption.addEventListener(Events.ON_MOUSE_OVER, (Event event) -> {
|
|
||||||
help.setVisible(true);
|
|
||||||
});
|
|
||||||
caption.addEventListener(Events.ON_MOUSE_OUT, (Event event) -> {
|
|
||||||
popup.detach();
|
|
||||||
help.setVisible(false);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -341,6 +341,26 @@
|
||||||
.dashboard-content-help-icon {
|
.dashboard-content-help-icon {
|
||||||
padding: 5px;
|
padding: 5px;
|
||||||
cursor: default;
|
cursor: default;
|
||||||
|
visibility: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.z-caption:hover .dashboard-content-help-icon {
|
||||||
|
visibility: visible;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dashboard-content-help-popup {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dashboard-content-help-icon:hover ~ .dashboard-content-help-popup {
|
||||||
|
display: inline-flex;
|
||||||
|
background: black;
|
||||||
|
color: white;
|
||||||
|
border-radius: 5px;
|
||||||
|
padding: 4px 7px;
|
||||||
|
position: fixed;
|
||||||
|
z-index: 1800;
|
||||||
|
max-width: 300px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.fill-mandatory-process-para-wrapper {
|
.fill-mandatory-process-para-wrapper {
|
||||||
|
|
Loading…
Reference in New Issue