IDEMPIERE-3535 Implement font icon theme. Fixed row edit icon not working in grid view.
This commit is contained in:
parent
c0e13c7321
commit
f16500ffe1
|
@ -480,8 +480,12 @@ public class GridTabRowRenderer implements RowRenderer<Object[]>, RowRendererExt
|
|||
cell.addEventListener(Events.ON_CLICK, this);
|
||||
cell.setStyle("border: none;");
|
||||
cell.setTooltiptext(Util.cleanAmp(Msg.getMsg(Env.getCtx(), "EditRecord")));
|
||||
if (ThemeManager.isUseFontIconForImage())
|
||||
cell.appendChild(new Label());
|
||||
if (ThemeManager.isUseFontIconForImage()) {
|
||||
Label indicatorLabel = new Label();
|
||||
cell.appendChild(indicatorLabel);
|
||||
final Cell finalCell = cell;
|
||||
indicatorLabel.addEventListener(Events.ON_CLICK, evt->Events.postEvent(Events.ON_CLICK, finalCell, indicatorLabel.getSclass()));
|
||||
}
|
||||
cell.setValign("middle");
|
||||
|
||||
row.appendChild(cell);
|
||||
|
@ -603,10 +607,9 @@ public class GridTabRowRenderer implements RowRenderer<Object[]>, RowRendererExt
|
|||
Cell cell = (Cell) currentRow.getChildren().get(1);
|
||||
if (cell != null) {
|
||||
if (ThemeManager.isUseFontIconForImage())
|
||||
// cell.setSclass("row-indicator-selected z-icon-Edit");
|
||||
{
|
||||
Label l = (Label) cell.getFirstChild();
|
||||
l.setSclass("row-indicator-selected z-icon-Edit");
|
||||
Label indicatorLabel = (Label) cell.getFirstChild();
|
||||
indicatorLabel.setSclass("row-indicator-selected z-icon-Edit");
|
||||
}
|
||||
else
|
||||
cell.setSclass("row-indicator-selected");
|
||||
|
@ -904,6 +907,8 @@ public class GridTabRowRenderer implements RowRenderer<Object[]>, RowRendererExt
|
|||
Cell cell = (Cell) event.getTarget();
|
||||
if (cell.getSclass() != null && cell.getSclass().indexOf("row-indicator-selected") >= 0)
|
||||
Events.sendEvent(gridPanel, new Event(DetailPane.ON_EDIT_EVENT, gridPanel));
|
||||
else if (event.getData() != null && event.getData().toString().indexOf("row-indicator-selected") >= 0)
|
||||
Events.sendEvent(gridPanel, new Event(DetailPane.ON_EDIT_EVENT, gridPanel));
|
||||
else
|
||||
Events.sendEvent(event.getTarget().getParent(), event);
|
||||
} else if (event.getTarget() instanceof Checkbox) {
|
||||
|
|
Loading…
Reference in New Issue