From 63b3aac408c4a779edaf186c5b6bf4937cc6948f Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Wed, 2 Apr 2014 11:24:43 -0500 Subject: [PATCH] IDEMPIERE-1871 Inactive records should be distinguishable from Active records in grid view / implement the same if current row is inactive --- .../webui/adwindow/GridTabRowRenderer.java | 14 ++++++++++++++ .../theme/default/css/theme.css.dsp | 9 +++++++++ 2 files changed, 23 insertions(+) diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/GridTabRowRenderer.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/GridTabRowRenderer.java index f64609644b..fabd3671d6 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/GridTabRowRenderer.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/GridTabRowRenderer.java @@ -511,6 +511,20 @@ public class GridTabRowRenderer implements RowRenderer, RowRendererExt } String script = "jq('#"+row.getUuid()+"').addClass('highlight').siblings().removeClass('highlight')"; + + Boolean isActive = null; + Object isActiveValue = gridTab.getValue(currentRowIndex, "IsActive"); + if (isActiveValue != null) { + if ("true".equalsIgnoreCase(isActiveValue.toString())) { + isActive = Boolean.TRUE; + } else { + isActive = Boolean.FALSE; + } + } + if (isActive != null && !isActive.booleanValue()) { + script = "jq('#"+row.getUuid()+"').addClass('grid-inactive-row').siblings().removeClass('highlight')"; + } + Clients.response(new AuScript(script)); } 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 6691a21999..706199e8fd 100644 --- a/org.adempiere.ui.zk/theme/default/css/theme.css.dsp +++ b/org.adempiere.ui.zk/theme/default/css/theme.css.dsp @@ -927,6 +927,15 @@ div.wc-modal, div.wc-modal-none, div.wc-highlighted, div.wc-highlighted-none { background-image: none !important; background-color: #DCDAD4 !important; } + +.z-grid tbody tr.grid-inactive-row td.row-indicator-seld { + background-color: transparent !important; + background-image: url(${c:encodeURL('/theme/default/images/EditRecord16.png')}) !important; + background-position: center; + background-repeat: no-repeat; + background-size: 16px 16px; + cursor: pointer; +} .z-grid tbody tr.highlight td.z-cell { background-color: #FFFFCC !important;