From 8786638e1e7f73b79a3af98e740a91081da4734f Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Fri, 7 Mar 2014 19:17:14 -0500 Subject: [PATCH] IDEMPIERE-1789 remove grid border from workflow window --- .../src/org/adempiere/webui/apps/wf/WFNodeContainer.java | 8 ++++++++ .../WEB-INF/src/org/adempiere/webui/apps/wf/WFPanel.java | 5 +++-- org.adempiere.ui.zk/theme/default/css/theme.css.dsp | 4 ++++ 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/wf/WFNodeContainer.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/wf/WFNodeContainer.java index 153dc7cb44..c05e4c851a 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/wf/WFNodeContainer.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/wf/WFNodeContainer.java @@ -49,6 +49,7 @@ public class WFNodeContainer private int currentRow = 1; private int currentColumn = 0; private int noOfColumns = 4; + private int maxColumn = 0; private int rowCount = 0; private WorkflowGraphScene graphScene = new WorkflowGraphScene(); @@ -146,6 +147,9 @@ public class WFNodeContainer w.setRow(currentRow); nodes[currentColumn - 1] = node.getAD_WF_Node_ID(); + if (currentColumn > maxColumn) { + maxColumn = currentColumn; + } if (currentRow < oldRow) { currentRow = oldRow; @@ -227,6 +231,10 @@ public class WFNodeContainer return noOfColumns; } + public int getMaxColumnWithNode() { + return maxColumn; + } + public GraphScene getGraphScene() { return graphScene; } diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/wf/WFPanel.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/wf/WFPanel.java index bff9f74f4d..602ef1a3e0 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/wf/WFPanel.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/wf/WFPanel.java @@ -187,14 +187,15 @@ public class WFPanel extends Borderlayout implements EventListener, IHelp try { int row = nodeContainer.getRowCount(); + int maxCol = nodeContainer.getMaxColumnWithNode(); for(int i = 0; i < row; i++) { Tr tr = new Tr(); table.appendChild(tr); - for(int c = 0; c < 4; c++) { + for(int c = 0; c < maxCol; c++) { BufferedImage t = new BufferedImage(WFGraphLayout.COLUMN_WIDTH, WFGraphLayout.ROW_HEIGHT, BufferedImage.TYPE_INT_ARGB); Graphics2D tg = t.createGraphics(); Td td = new Td(); -// td.setStyle("border: 1px dotted lightgray"); + td.setSclass("workflow-panel-table"); tr.appendChild(td); int x = c * WFGraphLayout.COLUMN_WIDTH; diff --git a/org.adempiere.ui.zk/theme/default/css/theme.css.dsp b/org.adempiere.ui.zk/theme/default/css/theme.css.dsp index 2f57ac8e94..2d9f7384f0 100644 --- a/org.adempiere.ui.zk/theme/default/css/theme.css.dsp +++ b/org.adempiere.ui.zk/theme/default/css/theme.css.dsp @@ -1764,6 +1764,10 @@ table.z-vbox > tbody > tr > td > table { .workflow-activity-form { } +.workflow-panel-table { + border: 0px; +} + <%-- find window --%> .find-window { }