IDEMPIERE-1313 Web Client: Reduce space used by collapsed context help pane.
This commit is contained in:
parent
6e10cd8e6d
commit
3f13b7472a
|
@ -27,6 +27,7 @@ import org.adempiere.base.event.IEventManager;
|
||||||
import org.adempiere.base.event.IEventTopics;
|
import org.adempiere.base.event.IEventTopics;
|
||||||
import org.adempiere.model.MBroadcastMessage;
|
import org.adempiere.model.MBroadcastMessage;
|
||||||
import org.adempiere.util.ServerContext;
|
import org.adempiere.util.ServerContext;
|
||||||
|
import org.adempiere.webui.LayoutUtils;
|
||||||
import org.adempiere.webui.adwindow.ADWindow;
|
import org.adempiere.webui.adwindow.ADWindow;
|
||||||
import org.adempiere.webui.apps.AEnv;
|
import org.adempiere.webui.apps.AEnv;
|
||||||
import org.adempiere.webui.apps.BusyDialog;
|
import org.adempiere.webui.apps.BusyDialog;
|
||||||
|
@ -71,6 +72,7 @@ import org.zkoss.zk.au.out.AuScript;
|
||||||
import org.zkoss.zk.ui.Component;
|
import org.zkoss.zk.ui.Component;
|
||||||
import org.zkoss.zk.ui.Desktop;
|
import org.zkoss.zk.ui.Desktop;
|
||||||
import org.zkoss.zk.ui.Executions;
|
import org.zkoss.zk.ui.Executions;
|
||||||
|
import org.zkoss.zk.ui.HtmlBasedComponent;
|
||||||
import org.zkoss.zk.ui.Page;
|
import org.zkoss.zk.ui.Page;
|
||||||
import org.zkoss.zk.ui.event.Event;
|
import org.zkoss.zk.ui.event.Event;
|
||||||
import org.zkoss.zk.ui.event.EventListener;
|
import org.zkoss.zk.ui.event.EventListener;
|
||||||
|
@ -164,7 +166,7 @@ public class DefaultDesktop extends TabbedDesktop implements MenuListener, Seria
|
||||||
@Override
|
@Override
|
||||||
public void onEvent(Event event) throws Exception {
|
public void onEvent(Event event) throws Exception {
|
||||||
OpenEvent oe = (OpenEvent) event;
|
OpenEvent oe = (OpenEvent) event;
|
||||||
updateMenuCollapsedPreference(!oe.isOpen());
|
updateMenuCollapsedPreference(!oe.isOpen());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
w.addEventListener(Events.ON_SWIPE, new EventListener<SwipeEvent>() {
|
w.addEventListener(Events.ON_SWIPE, new EventListener<SwipeEvent>() {
|
||||||
|
@ -192,6 +194,14 @@ public class DefaultDesktop extends TabbedDesktop implements MenuListener, Seria
|
||||||
public void onEvent(Event event) throws Exception {
|
public void onEvent(Event event) throws Exception {
|
||||||
OpenEvent oe = (OpenEvent) event;
|
OpenEvent oe = (OpenEvent) event;
|
||||||
updateHelpCollapsedPreference(!oe.isOpen());
|
updateHelpCollapsedPreference(!oe.isOpen());
|
||||||
|
HtmlBasedComponent comp = windowContainer.getComponent();
|
||||||
|
if (comp != null) {
|
||||||
|
if (oe.isOpen()) {
|
||||||
|
LayoutUtils.removeSclass("with-right-icon", comp);
|
||||||
|
} else {
|
||||||
|
LayoutUtils.addSclass("with-right-icon", comp);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -210,7 +220,10 @@ public class DefaultDesktop extends TabbedDesktop implements MenuListener, Seria
|
||||||
});
|
});
|
||||||
|
|
||||||
boolean helpCollapsed= pref.isPropertyBool(UserPreference.P_HELP_COLLAPSED);
|
boolean helpCollapsed= pref.isPropertyBool(UserPreference.P_HELP_COLLAPSED);
|
||||||
e.setOpen(!helpCollapsed);
|
e.setOpen(!helpCollapsed);
|
||||||
|
Clients.evalJavaScript("$('.desktop-layout > div > .z-east-colpsd > .z-borderlayout-icon').attr('title', '" +
|
||||||
|
Msg.getElement(Env.getCtx(), "AD_CtxHelp_ID") + "');");
|
||||||
|
|
||||||
|
|
||||||
helpController.render(e, this);
|
helpController.render(e, this);
|
||||||
|
|
||||||
|
@ -267,6 +280,10 @@ public class DefaultDesktop extends TabbedDesktop implements MenuListener, Seria
|
||||||
max.setSclass("window-container-toolbar-btn");
|
max.setSclass("window-container-toolbar-btn");
|
||||||
max.setStyle("cursor: pointer; border: 1px solid transparent; padding: 2px;");
|
max.setStyle("cursor: pointer; border: 1px solid transparent; padding: 2px;");
|
||||||
|
|
||||||
|
if (!e.isOpen()) {
|
||||||
|
LayoutUtils.addSclass("with-right-icon", windowContainer.getComponent());
|
||||||
|
}
|
||||||
|
|
||||||
return layout;
|
return layout;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -496,6 +496,10 @@ div.wc-modal, div.wc-modal-none, div.wc-highlighted, div.wc-highlighted-none {
|
||||||
margin: 0px !important;
|
margin: 0px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.desktop-tabbox.with-right-icon .z-tabs .z-toolbar-tabs-body {
|
||||||
|
margin-right: 12px !important;
|
||||||
|
}
|
||||||
|
|
||||||
.desktop-tabbox .z-tabs .z-toolbar-tabs-body .z-toolbarbutton {
|
.desktop-tabbox .z-tabs .z-toolbar-tabs-body .z-toolbarbutton {
|
||||||
padding: 0px !important;
|
padding: 0px !important;
|
||||||
border: 1px solid transparent !important;
|
border: 1px solid transparent !important;
|
||||||
|
@ -1504,8 +1508,8 @@ i.grid-combobox-editor {
|
||||||
.z-west-splt-btn-over,
|
.z-west-splt-btn-over,
|
||||||
.z-north-splt-btn-over,
|
.z-north-splt-btn-over,
|
||||||
.z-south-splt-btn-over {
|
.z-south-splt-btn-over {
|
||||||
-webkit-filter: brightness(-30%);
|
-webkit-filter: brightness(50%);
|
||||||
filter: brightness(-30%);
|
filter: brightness(50%);
|
||||||
}
|
}
|
||||||
|
|
||||||
.help-content
|
.help-content
|
||||||
|
@ -1910,4 +1914,37 @@ table.z-vbox > tbody > tr > td > table {
|
||||||
.payment-rule-editor .editor-button :hover {
|
.payment-rule-editor .editor-button :hover {
|
||||||
border-radius: 0px;
|
border-radius: 0px;
|
||||||
background-color: #ddd;
|
background-color: #ddd;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
<%-- Context Help --%>
|
||||||
|
.desktop-layout > div > .z-east-colpsd {
|
||||||
|
border: none;
|
||||||
|
width: 0px !important;
|
||||||
|
position: absolute;
|
||||||
|
overflow: visible;
|
||||||
|
padding: 0px !important;
|
||||||
|
margin: 0px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.desktop-layout > div > .z-east-colpsd > .z-borderlayout-icon {
|
||||||
|
background-image: url(${c:encodeURL('/theme/default/images/Help16.png')}) !important;
|
||||||
|
background-position:center !important;
|
||||||
|
width: 16px;
|
||||||
|
height: 16px;
|
||||||
|
position: relative;
|
||||||
|
left: -20px;
|
||||||
|
background-size: 16px 16px;
|
||||||
|
margin-left: 0px !important;
|
||||||
|
margin-right: 0px !important;
|
||||||
|
margin-top: 4px !important;
|
||||||
|
padding: 3px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.desktop-layout > div > .z-east-colpsd > .z-borderlayout-icon:hover {
|
||||||
|
background-color:#DDD !important;
|
||||||
|
-webkit-box-shadow:inset 0px 0px 3px #CCC;
|
||||||
|
-moz-box-shadow:inset 0px 0px 3px #CCC;
|
||||||
|
-o-box-shadow:inset 0px 0px 3px #CCC;
|
||||||
|
-ms-box-shadow:inset 0px 0px 3px #CCC;
|
||||||
|
box-shadow:inset 0px 0px 3px #CCC;
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue