diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/GridPanel.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/GridPanel.java index bba3740d49..4631d8aa1b 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/GridPanel.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/GridPanel.java @@ -267,8 +267,10 @@ public class GridPanel extends Borderlayout implements EventListener frozen.setColumns(1); listbox.appendChild(frozen); org.zkoss.zul.Column indicator = new Column(); - indicator.setWidth("30px"); - + indicator.setWidth("10px"); + try { + indicator.setSort("none"); + } catch (Exception e) {} columns.appendChild(indicator); listbox.appendChild(columns); columns.setSizable(true); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/GridTabRowRenderer.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/GridTabRowRenderer.java index fd3b4a2602..b045a6e35d 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/GridTabRowRenderer.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/GridTabRowRenderer.java @@ -22,6 +22,7 @@ import java.util.Map; import java.util.Map.Entry; import org.adempiere.util.GridRowCtx; +import org.adempiere.webui.LayoutUtils; import org.adempiere.webui.apps.AEnv; import org.adempiere.webui.editor.WButtonEditor; import org.adempiere.webui.editor.WEditor; @@ -47,6 +48,7 @@ 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.Cell; import org.zkoss.zul.Div; import org.zkoss.zul.Grid; import org.zkoss.zul.Paging; @@ -368,12 +370,11 @@ public class GridTabRowRenderer implements RowRenderer, RowRendererExt rowIndex = (paging.getActivePage() * paging.getPageSize()) + rowIndex; } - Div indicatorDiv = new Div(); - indicatorDiv.setStyle("text-align: center; border: none; width: 100%; height: 100%;"); - indicatorDiv.appendChild(new Label()); + Cell cell = new Cell(); + cell.setWidth("10px"); //TODO: checkbox for selection and batch action ( delete, export, complete, etc ) -// indicatorDiv.appendChild(new Checkbox()); - row.appendChild(indicatorDiv); +// cell.appendChild(new Checkbox()); + row.appendChild(cell); int colIndex = -1; for (int i = 0; i < columnCount; i++) { @@ -419,19 +420,16 @@ public class GridTabRowRenderer implements RowRenderer, RowRendererExt */ public void setCurrentRow(Row row) { if (currentRow != null && currentRow.getParent() != null && currentRow != row) { - Div div = (Div) currentRow.getFirstChild(); - if (div != null) { - Label label = (Label) div.getFirstChild(); - label.getChildren().clear(); + Cell cell = (Cell) currentRow.getFirstChild(); + if (cell != null) { + cell.setStyle("background-color: transparent"); + cell.setSclass(null); } } currentRow = row; - Div div = (Div) currentRow.getFirstChild(); - if (div != null) { - Label label = (Label) div.getFirstChild(); - label.getChildren().clear(); - label.appendChild(new Text(">>")); - label.setStyle("color: darkblue; font-weight: bold; text-align: center"); + Cell cell = (Cell) currentRow.getFirstChild(); + if (cell != null) { + cell.setSclass("current-row-indicator"); } currentRowIndex = gridTab.getCurrentRow(); 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 f15e0c224e..58921c2b04 100644 --- a/org.adempiere.ui.zk/theme/default/css/theme.css.dsp +++ b/org.adempiere.ui.zk/theme/default/css/theme.css.dsp @@ -349,6 +349,11 @@ div.wc-modal, div.wc-modal-none, div.wc-highlighted, div.wc-highlighted-none { border-right: 2px solid #9CBDFF; } +.current-row-indicator { + background-color: #FA962F !important; + background-image: none !important; +} + <%-- status bar --%> .status { width: 100%;