IDEMPIERE-369 Master Detail layout improvements. More correct patch for jquery issue under firefox. Now works fine under firefox and chrome.

This commit is contained in:
Heng Sin Low 2012-10-12 21:44:06 +08:00
parent a5ab8b00f5
commit 65025b35f3
9 changed files with 290 additions and 267 deletions

View File

@ -27,6 +27,7 @@ import java.util.logging.Level;
import org.adempiere.webui.LayoutUtils;
import org.adempiere.webui.apps.AEnv;
import org.adempiere.webui.component.Borderlayout;
import org.adempiere.webui.component.Column;
import org.adempiere.webui.component.Columns;
import org.adempiere.webui.component.EditorBox;
@ -52,6 +53,7 @@ import org.compiere.model.GridField;
import org.compiere.model.GridTab;
import org.compiere.model.GridWindow;
import org.compiere.model.MLookup;
import org.compiere.model.MSysConfig;
import org.compiere.model.MTree;
import org.compiere.model.MTreeNode;
import org.compiere.model.X_AD_FieldGroup;
@ -59,6 +61,7 @@ import org.compiere.util.CLogger;
import org.compiere.util.DisplayType;
import org.compiere.util.Env;
import org.compiere.util.Evaluatee;
import org.compiere.util.Msg;
import org.compiere.util.Util;
import org.zkoss.zk.au.out.AuFocus;
import org.zkoss.zk.ui.Component;
@ -67,12 +70,12 @@ import org.zkoss.zk.ui.event.Event;
import org.zkoss.zk.ui.event.EventListener;
import org.zkoss.zk.ui.event.Events;
import org.zkoss.zk.ui.util.Clients;
import org.zkoss.zul.Borderlayout;
import org.zkoss.zul.Center;
import org.zkoss.zul.DefaultTreeNode;
import org.zkoss.zul.Div;
import org.zkoss.zul.Separator;
import org.zkoss.zul.Space;
import org.zkoss.zul.Style;
import org.zkoss.zul.Treeitem;
import org.zkoss.zul.Vlayout;
import org.zkoss.zul.West;
@ -180,7 +183,17 @@ DataStatusListener, IADTabpanel
if (formContainer.isVisible()) {
detailPane = component;
if (formContainer instanceof Borderlayout) {
form.getParent().appendChild(detailPane);
if (isUseSplitViewForForm()) {
Borderlayout borderLayout = (Borderlayout) formContainer;
borderLayout.appendSouth(detailPane);
borderLayout.getSouth().setCollapsible(true);
borderLayout.getSouth().setSplittable(true);
borderLayout.getSouth().setOpen(true);
borderLayout.getSouth().setSclass("adwindow-gridview-detail");
} else {
form.getParent().appendChild(detailPane);
}
} else {
formContainer.appendChild(component);
}
@ -230,9 +243,23 @@ DataStatusListener, IADTabpanel
Env.getAD_Client_ID(Env.getCtx()), gridTab.getKeyColumnName());
if (gridTab.isTreeTab() && AD_Tree_ID != 0)
{
StringBuilder cssContent = new StringBuilder();
cssContent.append(".adtab-form-borderlayout .z-south-colpsd:before { ");
cssContent.append("content: \"");
cssContent.append(Util.cleanAmp(Msg.getMsg(Env.getCtx(), "Detail")));
cssContent.append("\"; ");
cssContent.append("position: relative; font-size: 12px; font-weight: bold; ");
cssContent.append("top: 3px; ");
cssContent.append("left: 4px; ");
cssContent.append("z-index: -1; ");
cssContent.append("} ");
Style style = new Style();
style.setContent(cssContent.toString());
appendChild(style);
Borderlayout layout = new Borderlayout();
layout.setParent(this);
layout.setSclass("adtab-tree-layout");
layout.setSclass("adtab-form-borderlayout");
treePanel = new ADTreePanel(windowNo, gridTab.getTabNo());
West west = new West();
@ -268,8 +295,34 @@ DataStatusListener, IADTabpanel
div.appendChild(form);
div.setVflex("1");
div.setWidth("100%");
this.appendChild(div);
formContainer = div;
if (isUseSplitViewForForm()) {
StringBuilder cssContent = new StringBuilder();
cssContent.append(".adtab-form-borderlayout .z-south-colpsd:before { ");
cssContent.append("content: \"");
cssContent.append(Util.cleanAmp(Msg.getMsg(Env.getCtx(), "Detail")));
cssContent.append("\"; ");
cssContent.append("position: relative; font-size: 12px; font-weight: bold; ");
cssContent.append("top: 3px; ");
cssContent.append("left: 4px; ");
cssContent.append("z-index: -1; ");
cssContent.append("} ");
Style style = new Style();
style.setContent(cssContent.toString());
appendChild(style);
Borderlayout layout = new Borderlayout();
layout.setParent(this);
layout.setSclass("adtab-form-borderlayout");
Center center = new Center();
layout.appendChild(center);
center.appendChild(div);
formContainer = layout;
} else {
this.appendChild(div);
formContainer = div;
}
if (AEnv.isTablet())
{
@ -283,7 +336,11 @@ DataStatusListener, IADTabpanel
}
/**
public static boolean isUseSplitViewForForm() {
return MSysConfig.getBooleanValue("ZK_AD_WINDOW_FORM_SPLITVIEW", true);
}
/**
* Create UI components if not already created
*/
public void createUI()

View File

@ -658,19 +658,6 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements
*/
public void onDetailRecord()
{
/*
int maxInd = adTab.getTabCount() - 1;
int curInd = adTab.getSelectedIndex();
if (curInd < maxInd)
{
setActiveTab(curInd + 1, new Callback<Boolean>() {
@Override
public void onCallback(Boolean result) {
focusToActivePanel();
}
});
}*/
adTabbox.onDetailRecord();
}
@ -679,17 +666,10 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements
*/
public void onParentRecord()
{
// int curInd = adTab.getSelectedIndex();
// if (curInd > 0)
// {
// setActiveTab(curInd - 1, new Callback<Boolean>() {
// @Override
// public void onCallback(Boolean result) {
// focusToActivePanel();
// }
// });
// }
adTabbox.onParentRecord();
List<BreadCrumbLink> parents = breadCrumb.getParentLinks();
if (!parents.isEmpty()) {
Events.sendEvent(parents.get(parents.size()-1), new Event(Events.ON_CLICK, parents.get(parents.size()-1)));
}
}
/**
@ -1087,7 +1067,7 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements
{
// toolbar.enableTabNavigation(adTab.getSelectedGridTab()Index > 0,
// adTab.getSelectedGridTab()Index < (adTab.getTabCount() - 1));
toolbar.enableTabNavigation(adTabbox.getTabCount() > 1, adTabbox.getTabCount() > 1);
toolbar.enableTabNavigation(breadCrumb.hasParentLink(), adTabbox.getSelectedDetailADTabpanel() != null);
toolbar.getButton("Attachment").setPressed(adTabbox.getSelectedGridTab().hasAttachment());
toolbar.getButton("Chat").setPressed(adTabbox.getSelectedGridTab().hasChat());

View File

@ -13,8 +13,10 @@
*****************************************************************************/
package org.adempiere.webui.adwindow;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import org.adempiere.webui.AdempiereIdGenerator;
@ -32,6 +34,7 @@ import org.compiere.model.MRole;
import org.compiere.util.Env;
import org.compiere.util.Msg;
import org.zkoss.zhtml.Text;
import org.zkoss.zk.ui.Component;
import org.zkoss.zk.ui.Execution;
import org.zkoss.zk.ui.Executions;
import org.zkoss.zk.ui.Page;
@ -176,6 +179,15 @@ public class BreadCrumb extends Div implements EventListener<Event>{
}
}
public List<BreadCrumbLink> getParentLinks() {
List<BreadCrumbLink> parents = new ArrayList<BreadCrumbLink>();
for(Component component : layout.getChildren()) {
if (component instanceof BreadCrumbLink)
parents.add((BreadCrumbLink) component);
}
return parents;
}
public void addLinks(LinkedHashMap<String, String> links) {
this.links = links;
final Label pathLabel = (Label) layout.getChildren().get(layout.getChildren().size()-2);
@ -222,8 +234,7 @@ public class BreadCrumb extends Div implements EventListener<Event>{
if (toolbarListener != null)
toolbarListener.onLast();
} else {
MouseEvent me = (MouseEvent) event;
Events.sendEvent(this, me);
Events.sendEvent(this, event);
}
}
@ -350,7 +361,7 @@ public class BreadCrumb extends Div implements EventListener<Event>{
messageContainer.appendChild(image);
String labelText = buildLabelText(m_statusText);
if (error) {
Clients.showNotification(labelText, "error", image, "overlap_start", 3500, true);
Clients.showNotification(buildNotificationText(m_statusText), "error", image, "overlap_start", 3500, true);
}
Label label = new Label(labelText);
messageContainer.appendChild(label);
@ -381,6 +392,18 @@ public class BreadCrumb extends Div implements EventListener<Event>{
return statusText.substring(0, index);
return statusText.substring(0, 80);
}
private String buildNotificationText(String statusText) {
if (statusText == null)
return "";
if (statusText.length() <= 140)
return statusText;
int index = statusText.indexOf(" - java.lang.Exception");
if (index > 0)
return statusText.substring(0, index);
return statusText.substring(0, 136) + " ...";
}
protected void createPopupContent() {
Text t = new Text(m_statusText);
@ -430,5 +453,13 @@ public class BreadCrumb extends Div implements EventListener<Event>{
toolbarContainer.setVisible(visible);
}
public boolean hasParentLink() {
for(Component c : layout.getChildren()) {
if (c instanceof BreadCrumbLink) {
return true;
}
}
return false;
}
}

View File

@ -32,6 +32,7 @@ import org.compiere.model.GridField;
import org.compiere.model.GridTab;
import org.compiere.util.CLogger;
import org.compiere.util.Env;
import org.compiere.util.Evaluator;
import org.compiere.util.Msg;
import org.zkoss.zk.ui.Component;
import org.zkoss.zk.ui.Execution;
@ -40,7 +41,6 @@ import org.zkoss.zk.ui.HtmlBasedComponent;
import org.zkoss.zk.ui.event.Event;
import org.zkoss.zk.ui.event.EventListener;
import org.zkoss.zk.ui.event.Events;
import org.zkoss.zk.ui.util.Clients;
import org.zkoss.zul.Menuitem;
import org.zkoss.zul.Vlayout;
@ -255,9 +255,9 @@ public class CompositeADTabbox extends AbstractADTabbox
if (tabPanel == headerTab) {
IADTabpanel detailPanel = getSelectedDetailADTabpanel();
if (detailPanel != null) {
detailPanel.setDetailPaneMode(true, headerTab.isGridView());
detailPanel.setDetailPaneMode(true, isUseVflexForDetailPane());
}
detailPane.setVflex(Boolean.toString(headerTab.isGridView()));
detailPane.setVflex(Boolean.toString(isUseVflexForDetailPane()));
layout.invalidate();
}
}
@ -292,45 +292,66 @@ public class CompositeADTabbox extends AbstractADTabbox
detailPane.setHflex("1");
detailPane.setStyle("min-height: 200px; overflow-y: visible;");
detailPane.addADTabpanel(tabPanel, tabLabel);
tabPanel.setDetailPaneMode(true, headerTab.isGridView());
detailPane.setVflex(Boolean.toString(headerTab.isGridView()));
tabPanel.setDetailPaneMode(true, isUseVflexForDetailPane());
detailPane.setVflex(Boolean.toString(isUseVflexForDetailPane()));
if (activate)
activateDetailADTabpanel();
} else {
detailPane.addADTabpanel(tabPanel, tabLabel, false);
tabPanel.setDetailPaneMode(true, headerTab.isGridView());
detailPane.setVflex(Boolean.toString(headerTab.isGridView()));
tabPanel.setDetailPaneMode(true, isUseVflexForDetailPane());
detailPane.setVflex(Boolean.toString(isUseVflexForDetailPane()));
}
HtmlBasedComponent htmlComponent = (HtmlBasedComponent) tabPanel;
htmlComponent.setVflex("1");
htmlComponent.setWidth("100%");
tabPanel.getGridTab().addDataStatusListener(new SyncDataStatusListener(tabPanel));
if (detailPane.getTabcount() > 1) {
int selectedIndex = detailPane.getSelectedIndex();
updateTabState();
if (detailPane.getSelectedIndex() != selectedIndex) {
activateDetailADTabpanel();
}
}
}
protected void activateDetailADTabpanel() {
private void activateDetailADTabpanel() {
if (detailPane != null && detailPane.getParent() != null) {
IADTabpanel tabPanel = detailPane.getSelectedADTabpanel();
tabPanel.activate(true);
if (!tabPanel.isGridView()) {
tabPanel.switchRowPresentation();
}
}
}
}
/**
* Evaluate Tab Logic
* @param e event
*/
public void evaluate (DataStatusEvent e)
{
super.evaluate(e);
} // evaluate
@Override
protected void updateTabState() {
detailPane.refresh();
if (detailPane != null && detailPane.getTabcount() > 0)
{
for(int i = 0; i < detailPane.getTabcount(); i++)
{
IADTabpanel adtab = detailPane.getADTabpanel(i);
if (adtab.getDisplayLogic() != null && adtab.getDisplayLogic().trim().length() > 0) {
if (!Evaluator.evaluateLogic(headerTab, adtab.getDisplayLogic())) {
detailPane.setTabVisibility(i, false);
} else {
detailPane.setTabVisibility(i, true);
}
}
}
int selected = detailPane.getSelectedIndex();
if (detailPane.getADTabpanel(selected) == null || !detailPane.isTabVisible(selected)) {
for(int i = 0; i < detailPane.getTabcount(); i++) {
if (selected == i) continue;
if (detailPane.isTabVisible(i)) {
detailPane.setSelectedIndex(i);
break;
}
}
}
}
}
/**
@ -378,17 +399,17 @@ public class CompositeADTabbox extends AbstractADTabbox
}
if (tabPanel.getParent() != null) tabPanel.detach();
detailPane.addADTabpanel(tabPanel, tabLabel);
tabPanel.setDetailPaneMode(true, headerTab.isGridView());
tabPanel.setDetailPaneMode(true, isUseVflexForDetailPane());
} else if (tabLevel > currentLevel ){
detailPane.addADTabpanel(tabPanel, tabLabel, false);
tabPanel.setDetailPaneMode(true, headerTab.isGridView());
tabPanel.setDetailPaneMode(true, isUseVflexForDetailPane());
}
}
if (detailPane.getTabcount() > 0 && !headerTab.getGridTab().isSortTab()) {
ADTabpanel adtabpanel = (ADTabpanel) headerTab;
adtabpanel.addDetails(detailPane);
detailPane.setVflex(Boolean.toString(headerTab.isGridView()));
detailPane.setVflex(Boolean.toString(isUseVflexForDetailPane()));
detailPane.setSelectedIndex(0);
}
@ -449,7 +470,7 @@ public class CompositeADTabbox extends AbstractADTabbox
}
}
protected BreadCrumb getBreadCrumb() {
private BreadCrumb getBreadCrumb() {
ADWindowContent window = (ADWindowContent) adWindowPanel;
BreadCrumb breadCrumb = window.getBreadCrumb();
return breadCrumb;
@ -469,9 +490,6 @@ public class CompositeADTabbox extends AbstractADTabbox
return null;
}
// public void refresh() {
// }
class SyncDataStatusListener implements DataStatusListener {
private IADTabpanel tabPanel;
@ -514,8 +532,8 @@ public class CompositeADTabbox extends AbstractADTabbox
}
detailTab.query(false, 0, 0);
detailTab.activate(true);
detailTab.setDetailPaneMode(true, headerTab.isGridView());
detailPane.setVflex(Boolean.toString(headerTab.isGridView()));
detailTab.setDetailPaneMode(true, isUseVflexForDetailPane());
detailPane.setVflex(Boolean.toString(isUseVflexForDetailPane()));
}
}
@ -523,18 +541,13 @@ public class CompositeADTabbox extends AbstractADTabbox
@Override
public void onDetailRecord() {
if (detailPane != null && detailPane.getParent() != null) {
Clients.scrollIntoView(detailPane);
detailPane.focus();
if (detailPane != null && detailPane.getSelectedADTabpanel() != null) {
try {
detailPane.onEdit();
} catch (Exception e) {}
}
}
@Override
public void onParentRecord() {
Clients.scrollIntoView(headerTab);
((HtmlBasedComponent)headerTab).focus();
}
@Override
public boolean isSortTab() {
return headerTab != null ? headerTab.getGridTab().isSortTab() : false;
@ -611,7 +624,7 @@ public class CompositeADTabbox extends AbstractADTabbox
return null;
}
protected void onActivateDetail(IADTabpanel tabPanel) {
private void onActivateDetail(IADTabpanel tabPanel) {
tabPanel.createUI();
tabPanel.query(false, 0, 0);
if (!tabPanel.isVisible())
@ -619,8 +632,8 @@ public class CompositeADTabbox extends AbstractADTabbox
if (!tabPanel.isGridView()) {
tabPanel.switchRowPresentation();
}
tabPanel.setDetailPaneMode(true, headerTab.isGridView());
detailPane.setVflex(Boolean.toString(headerTab.isGridView()));
tabPanel.setDetailPaneMode(true, isUseVflexForDetailPane());
detailPane.setVflex(Boolean.toString(isUseVflexForDetailPane()));
if (tabPanel instanceof ADSortTab) {
detailPane.invalidate();
detailPane.updateToolbar(false, true);
@ -637,6 +650,10 @@ public class CompositeADTabbox extends AbstractADTabbox
//other error will be catch in the dataStatusChanged event
}
private boolean isUseVflexForDetailPane() {
return headerTab.isGridView() || ADTabpanel.isUseSplitViewForForm();
}
@Override
public void updateDetailPaneToolbar(boolean changed, boolean readOnly) {
detailPane.updateToolbar(changed, readOnly);
@ -649,7 +666,10 @@ public class CompositeADTabbox extends AbstractADTabbox
IADTabpanel adtab = detailPane.getADTabpanel(i);
int index = (Integer) adtab.getAttribute(ADTAB_INDEX_ATTRIBUTE);
if (index == tabIndex) {
if (i != detailPane.getSelectedIndex()) {
if (!detailPane.isTabVisible(i)) {
return;
}
if (i != detailPane.getSelectedIndex()) {
detailPane.setSelectedIndex(i);
detailPane.fireActivateDetailEvent();
}
@ -659,5 +679,5 @@ public class CompositeADTabbox extends AbstractADTabbox
}
}
}
}
}
}

View File

@ -48,11 +48,9 @@ public class DetailPane extends Panel implements EventListener<Event> {
private static final String STATUS_ERROR_ATTRIBUTE = "status.error";
private static final String TABBOX_STYLE = "min-height: 200px; overflow-y: visible; width: 99%; margin: auto;";
private static final String DELETE_IMAGE = "/images/Delete16.png";
private static final String EDIT_IMAGE = "/images/EditRecord16.png";
private static final String NEW_IMAGE = "/images/New16.png";
private static final String STYLE = "min-height: 200px; width: 100%; overflow-y: visible;";
/**
* generated serial id
@ -94,14 +92,12 @@ public class DetailPane extends Panel implements EventListener<Event> {
fireActivateDetailEvent();
}
});
tabbox.setStyle(TABBOX_STYLE);
tabbox.setSclass("adwindow-detailpane-tabbox");
createPopup();
this.setStyle(STYLE);
this.setSclass("adwindow-detailpane");
//TODO: this probably not needed
this.setHflex("true");
}
public int getSelectedIndex() {
@ -200,11 +196,11 @@ public class DetailPane extends Panel implements EventListener<Event> {
Hbox messageContainer = new Hbox();
messageContainer.setPack("end");
messageContainer.setHflex("1");
messageContainer.setStyle("float: right");
messageContainer.setAlign("center");
messageContainer.setSclass("adwindow-detailpane-message");
toolbar.appendChild(messageContainer);
toolbar.setSclass("adtab-detail-toolbar");
toolbar.setSclass("adwindow-detailpane-toolbar");
toolbar.setVflex("0");
messageContainers.put(tabLabel.AD_Tab_ID, messageContainer);
tabPanel.setAttribute("AD_Tab_ID", tabLabel.AD_Tab_ID);
@ -282,7 +278,7 @@ public class DetailPane extends Panel implements EventListener<Event> {
messageContainer.appendChild(image);
String labelText = buildLabelText(status);
if (error) {
Clients.showNotification(labelText, "error", image, "overlap_start", 3500, true);
Clients.showNotification(buildNotificationText(status), "error", image, "overlap_start", 3500, true);
}
Label label = new Label(labelText);
messageContainer.appendChild(label);
@ -313,6 +309,18 @@ public class DetailPane extends Panel implements EventListener<Event> {
return statusText.substring(0, 80);
}
private String buildNotificationText(String statusText) {
if (statusText == null)
return "";
if (statusText.length() <= 140)
return statusText;
int index = statusText.indexOf(" - java.lang.Exception");
if (index > 0)
return statusText.substring(0, index);
return statusText.substring(0, 136) + " ...";
}
@Override
public void onEvent(Event event) throws Exception {
Component messageContainer = event.getTarget().getParent();
@ -415,4 +423,34 @@ public class DetailPane extends Panel implements EventListener<Event> {
Event activateEvent = new Event(ON_ACTIVATE_DETAIL_EVENT, tabPanel, prevSelectedIndex);
Events.sendEvent(activateEvent);
}
public void setTabVisibility(int i, boolean visible) {
if (i < 0 || tabbox.getTabs() == null || i >= tabbox.getTabs().getChildren().size())
return;
tabbox.getTabs().getChildren().get(i).setVisible(visible);
}
public boolean isTabVisible(int i) {
if (i < 0 || tabbox.getTabs() == null || i >= tabbox.getTabs().getChildren().size())
return false;
return tabbox.getTabs().getChildren().get(i).isVisible();
}
public boolean isTabEnabled(int i) {
if (i < 0 || tabbox.getTabs() == null || i >= tabbox.getTabs().getChildren().size())
return false;
Tab tab = (Tab) tabbox.getTabs().getChildren().get(i);
return !tab.isDisabled();
}
public void setTabEnabled(int i, boolean enabled) {
if (i < 0 || tabbox.getTabs() == null || i >= tabbox.getTabs().getChildren().size())
return;
Tab tab = (Tab) tabbox.getTabs().getChildren().get(i);
tab.setDisabled(!enabled);
}
}

View File

@ -54,6 +54,7 @@ import org.zkoss.zul.Div;
import org.zkoss.zul.North;
import org.zkoss.zul.Paging;
import org.zkoss.zul.Row;
import org.zkoss.zul.Style;
import org.zkoss.zul.Vbox;
import org.zkoss.zul.event.ZulEvents;
@ -137,8 +138,22 @@ public class GridView extends Vbox implements EventListener<Event>
gridFooter.setHflex("1");
gridFooter.setVflex("0");
StringBuilder cssContent = new StringBuilder();
cssContent.append(".adwindow-gridview-borderlayout .z-south-colpsd:before { ");
cssContent.append("content: \"");
cssContent.append(Util.cleanAmp(Msg.getMsg(Env.getCtx(), "Detail")));
cssContent.append("\"; ");
cssContent.append("position: relative; font-size: 12px; font-weight: bold; ");
cssContent.append("top: 3px; ");
cssContent.append("left: 4px; ");
cssContent.append("z-index: -1; ");
cssContent.append("} ");
Style style = new Style();
style.setContent(cssContent.toString());
appendChild(style);
borderLayout = new Borderlayout();
borderLayout.setStyle("position: absolute; height: 100%; width: 100%;");
borderLayout.setSclass("adwindow-gridview-borderlayout");
appendChild(borderLayout);
Center center = new Center();
borderLayout.appendChild(center);
@ -172,6 +187,7 @@ public class GridView extends Vbox implements EventListener<Event>
listbox.setSizedByContent(true);
listbox.setVflex("1");
listbox.setHflex("1");
listbox.setSclass("adtab-grid");
}
public void setDetailPaneMode(boolean detailPaneMode, boolean vflex) {
@ -187,6 +203,7 @@ public class GridView extends Vbox implements EventListener<Event>
}
//false work for header form, true work for header grid
listbox.setVflex(vflex);
listbox.setSclass("");
this.setVflex(Boolean.toString(vflex));
} else {
pageSize = MSysConfig.getIntValue(MSysConfig.ZK_PAGING_SIZE, 50);
@ -199,6 +216,7 @@ public class GridView extends Vbox implements EventListener<Event>
borderLayout.appendNorth(gridFooter);
}
listbox.setVflex("true");
listbox.setSclass("adtab-grid");
this.setVflex("true");
}
}
@ -858,9 +876,9 @@ public class GridView extends Vbox implements EventListener<Event>
detail = component;
borderLayout.appendSouth(detail);
borderLayout.getSouth().setCollapsible(true);
borderLayout.getSouth().setTitle(Util.cleanAmp(Msg.getMsg(Env.getCtx(), "Detail")));
borderLayout.getSouth().setOpen(false);
borderLayout.getSouth().setHeight("250px");
borderLayout.getSouth().setSplittable(true);
borderLayout.getSouth().setOpen(true);
borderLayout.getSouth().setSclass("adwindow-gridview-detail");
}
public Component removeDetails() {

View File

@ -111,8 +111,6 @@ public interface IADTabbox extends UIPart {
public void onDetailRecord();
public void onParentRecord();
public boolean isSortTab();
public boolean needSave(boolean rowChange, boolean onlyRealChange);

View File

@ -504,7 +504,7 @@ public abstract class WEditor implements EventListener<Event>, PropertyChangeLis
image.setWidth("24px");
image.setHeight("24px");
} else {
if (getComponent() instanceof InputElement && !tableEditor) {
if (getComponent() instanceof InputElement) {
((InputElement)getComponent()).setHflex("1");
} else {
((HtmlBasedComponent)getComponent()).setWidth(width);

View File

@ -110,10 +110,7 @@ html,body {
}
.desktop-header {
background-image: url(../images/header-bg.png);
background-repeat: repeat-x;
background-position: bottom left;
background-color: white;
background-color: #F4F4F4;
width: 100%;
height: 38px;
}
@ -214,7 +211,11 @@ div.wc-modal, div.wc-modal-none, div.wc-highlighted, div.wc-highlighted-none {
.desktop-tabbox {
padding-top: 0px;
background-color: #D1E7F6;
background-color: #F4F4F4;
}
.desktop-tabbox .z-tab {
margin-right: 2px;
}
.desktop-north, .desktop-center {
@ -239,9 +240,9 @@ div.wc-modal, div.wc-modal-none, div.wc-highlighted, div.wc-highlighted-none {
}
.desktop-left-column {
width: 310px;
width: 300px;
border: none;
background-color: #D2E0EB;
background-color: #F4F4F4;
}
.desktop-left-column + .z-west-splt {
@ -315,13 +316,6 @@ div.wc-modal, div.wc-modal-none, div.wc-highlighted, div.wc-highlighted-none {
}
<%-- adwindow and form --%>
.adform-content-none {
overflow: auto;
position: absolute;
width: 100%;
margin: 3px;
}
.adwindow-layout {
position:absolute;
border: none;
@ -335,6 +329,7 @@ div.wc-modal, div.wc-modal-none, div.wc-highlighted, div.wc-highlighted-none {
.adwindow-north {
border: none;
border-bottom: 1px solid #C5C5C5 !important;
}
.adwindow-south {
@ -347,145 +342,58 @@ div.wc-modal, div.wc-modal-none, div.wc-highlighted, div.wc-highlighted-none {
}
.adwindow-status {
background-color: #EEEEEE;
background-color: #F4F4F4;
height: 20px;
}
.adwindow-nav {
}
.adwindow-left-nav {
border-right: 1px solid #7EAAC6;
border-left: none;
border-top: none;
border-bottom: none;
}
.adwindow-right-nav {
border-left: 1px solid #7EAAC6;
border-right: none;
border-top: none;
border-bottom: none;
}
.adwindow-nav-content {
background-color: #D2E0EB;
height: 100%;
padding-top: 2px;
}
.adwindow-toolbar {
border: 0px;
}
.adwindow-navbtn-first {
margin-top: 8px !important;
}
.adwindow-navbtn-dis, .adwindow-navbtn-sel, .adwindow-navbtn-uns {
border: 0px;
margin-top: 3px;
padding-top: 2px;
padding-bottom: 2px;
}
.adwindow-navbtn-sel {
background-color: #9CBDFF;
font-weight: bold;
color: #274D5F;
cursor: pointer;
border-top: 2px solid #7EAAC6;
border-bottom: 2px solid #7EAAC6;
}
.adwindow-left-navbtn-sel {
border-left: 2px solid #7EAAC6;
border-right: none;
text-align: right;
-moz-border-radius-topleft: 5px;
-moz-border-radius-bottomleft: 5px;
border-top-left-radius: 5px;
border-bottom-left-radius: 5px;
-webkit-border-top-left-radius: 5px;
-webkit-border-bottom-left-radius: 5px;
background-color: #D2E0EB !important;
background-image: url(../images/adtab-left-bg.png);
background-repeat: repeat-y;
background-position: top right;
}
.adwindow-right-navbtn-sel {
border-right: 2px solid #7EAAC6;
border-left: none;
text-align: left;
-moz-border-radius-topright: 5px;
-moz-border-radius-bottomright: 5px;
border-top-right-radius: 5px;
border-bottom-right-radius: 5px;
-webkit-border-top-right-radius: 5px;
-webkit-border-bottom-right-radius: 5px;
background-color: #D2E0EB !important;
background-image: url(../images/adtab-right-bg.png);
background-repeat: repeat-y;
background-position: top left;
}
.adwindow-navbtn-uns {
background-color: #C4DCFB;
font-weight: normal;
color: #274D5F;
cursor: pointer;
}
.adwindow-navbtn-dis {
background-color: #C4DCFB;
}
.adwindow-navbtn-uns, .adwindow-navbtn-dis {
border-top: 1px solid #CCCCCC;
border-bottom: 1px solid #CCCCCC;
}
.adwindow-left-navbtn-uns, .adwindow-left-navbtn-dis {
border-left: 1px solid #CCCCCC;
border-right: none;
text-align: right;
-moz-border-radius-topleft: 5px;
-moz-border-radius-bottomleft: 5px;
border-top-left-radius: 5px;
border-bottom-left-radius: 5px;
-webkit-border-top-left-radius: 5px;
-webkit-border-bottom-left-radius: 5px;
}
.adwindow-right-navbtn-uns, .adwindow-right-navbtn-dis {
border-right: 1px solid #CCCCCC;
border-left: none;
text-align: left;
-moz-border-radius-topright: 5px;
-moz-border-radius-bottomright: 5px;
border-top-right-radius: 5px;
border-bottom-right-radius: 5px;
-webkit-border-top-right-radius: 5px;
-webkit-border-bottom-right-radius: 5px;
}
.adwindow-breadcrumb {
height: 30px;
background-color: #EEEEEE;
background-color: #FFF;
padding-left: 2px;
}
<%-- ad tab --%>
.adtab-body {
position: absolute;
margin: 0;
padding: 0;
width: 100%;
height: 100%;
.adwindow-detailpane {
min-height: 200px; width: 100%; overflow-y: visible;
}
.adwindow-detailpane-toolbar {
border: none;
}
.adwindow-detailpane-toolbar .z-toolbar-body {
width: 100%;
}
.adwindow-detailpane-toolbar .z-toolbarbutton {
float: left;
display: inline-block;
}
.adwindow-detailpane-message {
float: right;
}
.adwindow-detailpane-tabbox {
min-height: 200px; width: 99%; margin: auto;
}
.adwindow-gridview-detail {
height: 250px;
}
.adwindow-gridview-detail .z-south-body {
padding-top: 1px;
}
.adwindow-gridview-borderlayout {
position: absolute; height: 100%; width: 100%;
}
<%-- ad tab --%>
.adtab-content {
margin: 0;
padding: 0;
@ -500,30 +408,9 @@ div.wc-modal, div.wc-modal-none, div.wc-highlighted, div.wc-highlighted-none {
overflow-y: visible;
}
.adtab-form .z-grid {
border:none !important;
}
.adtab-grid-panel {
position: absolute;
overflow: hidden;
width: 100%;
height: 100%;
border: none;
}
.adtab-grid-panel .z-grid {
border: none;
}
.adtab-grid-panel .z-center {
border: none;
}
.adtab-grid {
width: 100%;
position: absolute;
margin-top: -1px;
border: none !important;
}
.adtab-grid-south {
@ -532,16 +419,10 @@ div.wc-modal, div.wc-modal-none, div.wc-highlighted, div.wc-highlighted-none {
.adtab-grid-south .z-paging {
border: none;
padding: 0;
}
.adtab-tabpanels {
border-top: 1px solid #9CBDFF;
border-bottom: 1px solid #9CBDFF;
border-left: 2px solid #9CBDFF;
border-right: 2px solid #9CBDFF;
}
.adtab-tree-layout {
.adtab-form-borderlayout {
width: 100%;
height: 100%;
position: absolute;
@ -789,6 +670,10 @@ img.z-group-img-close {
background-color: #F0F0F0;
}
span.z-tab-text {
height: 13px;
}
<%-- menu tree cell --%>
div.z-tree-body td.menu-tree-cell {
cursor: pointer;
@ -923,10 +808,6 @@ tbody.z-grid-empty-body td {
text-align: left;
}
.adtab-detail-toolbar .z-toolbar-body {
width: 100%;
}
.z-notification .z-notification-cl,
.z-notification .z-notification-cnt {
width: 300px;