IDEMPIERE-649 Zk: Grid should highlight current Row.

This commit is contained in:
Heng Sin Low 2013-02-20 17:55:01 +08:00
parent 066a7bc612
commit 6d6f5d871a
3 changed files with 20 additions and 6 deletions

View File

@ -38,6 +38,7 @@ import org.compiere.util.Env;
import org.compiere.util.Msg;
import org.compiere.util.Util;
import org.zkoss.zk.au.out.AuFocus;
import org.zkoss.zk.au.out.AuScript;
import org.zkoss.zk.ui.Component;
import org.zkoss.zk.ui.HtmlBasedComponent;
import org.zkoss.zk.ui.event.Event;
@ -354,7 +355,7 @@ public class GridTabRowRenderer implements RowRenderer<Object[]>, RowRendererExt
}
Cell cell = new Cell();
cell.setWidth("15px");
cell.setWidth("18px");
cell.addEventListener(Events.ON_CLICK, this);
cell.setTooltiptext(Util.cleanAmp(Msg.getMsg(Env.getCtx(), "EditRecord")));
@ -443,6 +444,9 @@ public class GridTabRowRenderer implements RowRenderer<Object[]>, RowRendererExt
stopEditing(false);
}
}
String script = "jq('#"+row.getUuid()+"').addClass('highlight').siblings().removeClass('highlight')";
Clients.response(new AuScript(script));
}
/**

View File

@ -378,7 +378,7 @@ public class GridView extends Vbox implements EventListener<Event>, IdSpace
frozen.setColumns(1);
listbox.appendChild(frozen);
org.zkoss.zul.Column indicator = new Column();
indicator.setWidth("15px");
indicator.setWidth("18px");
try {
indicator.setSort("none");
} catch (Exception e) {}

View File

@ -652,12 +652,20 @@ div.wc-modal, div.wc-modal-none, div.wc-highlighted, div.wc-highlighted-none {
background-color: #F9F9F9;
}
.row-indicator-seld {
background-color: #666 !important;
.z-grid tbody tr.highlight td.z-cell {
background-color: #FFFFCC !important;
background-image: none !important;
}
.row-indicator {
.z-grid tbody tr.highlight td.row-indicator-seld {
background-color: transparent !important;
background-image: url(${c:encodeURL('/images/EditRecord16.png')}) !important;
background-position: center;
background-repeat: no-repeat;
background-size: 16px 16px;
}
.z-grid tbody tr.highlight td.row-indicator {
background-color: transparent !important;
background-image: none !important;
}
@ -1211,3 +1219,5 @@ tbody.z-grid-empty-body td {
font-size: 11px;
font-weight: normal;
}
.