IDEMPIERE-649 Zk: Grid should highlight current Row.
This commit is contained in:
parent
066a7bc612
commit
6d6f5d871a
|
@ -38,6 +38,7 @@ import org.compiere.util.Env;
|
||||||
import org.compiere.util.Msg;
|
import org.compiere.util.Msg;
|
||||||
import org.compiere.util.Util;
|
import org.compiere.util.Util;
|
||||||
import org.zkoss.zk.au.out.AuFocus;
|
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.Component;
|
||||||
import org.zkoss.zk.ui.HtmlBasedComponent;
|
import org.zkoss.zk.ui.HtmlBasedComponent;
|
||||||
import org.zkoss.zk.ui.event.Event;
|
import org.zkoss.zk.ui.event.Event;
|
||||||
|
@ -354,7 +355,7 @@ public class GridTabRowRenderer implements RowRenderer<Object[]>, RowRendererExt
|
||||||
}
|
}
|
||||||
|
|
||||||
Cell cell = new Cell();
|
Cell cell = new Cell();
|
||||||
cell.setWidth("15px");
|
cell.setWidth("18px");
|
||||||
cell.addEventListener(Events.ON_CLICK, this);
|
cell.addEventListener(Events.ON_CLICK, this);
|
||||||
cell.setTooltiptext(Util.cleanAmp(Msg.getMsg(Env.getCtx(), "EditRecord")));
|
cell.setTooltiptext(Util.cleanAmp(Msg.getMsg(Env.getCtx(), "EditRecord")));
|
||||||
|
|
||||||
|
@ -443,6 +444,9 @@ public class GridTabRowRenderer implements RowRenderer<Object[]>, RowRendererExt
|
||||||
stopEditing(false);
|
stopEditing(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
String script = "jq('#"+row.getUuid()+"').addClass('highlight').siblings().removeClass('highlight')";
|
||||||
|
Clients.response(new AuScript(script));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -378,7 +378,7 @@ public class GridView extends Vbox implements EventListener<Event>, IdSpace
|
||||||
frozen.setColumns(1);
|
frozen.setColumns(1);
|
||||||
listbox.appendChild(frozen);
|
listbox.appendChild(frozen);
|
||||||
org.zkoss.zul.Column indicator = new Column();
|
org.zkoss.zul.Column indicator = new Column();
|
||||||
indicator.setWidth("15px");
|
indicator.setWidth("18px");
|
||||||
try {
|
try {
|
||||||
indicator.setSort("none");
|
indicator.setSort("none");
|
||||||
} catch (Exception e) {}
|
} catch (Exception e) {}
|
||||||
|
|
|
@ -652,12 +652,20 @@ div.wc-modal, div.wc-modal-none, div.wc-highlighted, div.wc-highlighted-none {
|
||||||
background-color: #F9F9F9;
|
background-color: #F9F9F9;
|
||||||
}
|
}
|
||||||
|
|
||||||
.row-indicator-seld {
|
.z-grid tbody tr.highlight td.z-cell {
|
||||||
background-color: #666 !important;
|
background-color: #FFFFCC !important;
|
||||||
background-image: none !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-color: transparent !important;
|
||||||
background-image: none !important;
|
background-image: none !important;
|
||||||
}
|
}
|
||||||
|
@ -1211,3 +1219,5 @@ tbody.z-grid-empty-body td {
|
||||||
font-size: 11px;
|
font-size: 11px;
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.
|
Loading…
Reference in New Issue