Skip to content

Commit

Permalink
MID-7976 fixed table row styles after migration to new adminlte
Browse files Browse the repository at this point in the history
  • Loading branch information
1azyman committed Jun 14, 2022
1 parent cab7dd7 commit 890a0c9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -274,10 +274,8 @@ protected Component createHeader(String headerId) {

@Override
protected org.apache.wicket.markup.repeater.Item<PO> customizeNewRowItem(org.apache.wicket.markup.repeater.Item<PO> item, IModel<PO> model) {
String status = GuiImplUtil.getObjectStatus(model.getObject());
if (status != null) {
item.add(AttributeModifier.append("class", () -> status));
}
item.add(AttributeModifier.append("class", () -> GuiImplUtil.getObjectStatus(model.getObject())));

customProcessNewRowItem(item, model);
return item;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,18 +46,18 @@ public static <C extends Containerable> String getObjectStatus(Object object) {
PrismContainerValueWrapper<C> containerValue = (PrismContainerValueWrapper<C>) object;
if (containerValue.getParent() instanceof ShadowWrapper) {
if (((ShadowWrapper) containerValue.getParent()).getProjectionStatus().equals(UserDtoStatus.DELETE)) {
return "danger";
return "table-danger";
}
if (((ShadowWrapper) containerValue.getParent()).getProjectionStatus().equals(UserDtoStatus.UNLINK)) {
return "warning";
return "table-warning";
}
}

switch (containerValue.getStatus()) {
case ADDED:
return "success";
return "table-success";
case DELETED:
return "danger";
return "table-danger";
case NOT_CHANGED:
default:
return null;
Expand All @@ -69,18 +69,18 @@ public static <C extends Containerable> String getObjectStatus(Object object) {

if (container.getParent() instanceof ShadowWrapper) {
if (((ShadowWrapper) container.getParent()).getProjectionStatus().equals(UserDtoStatus.DELETE)) {
return "danger";
return "table-danger";
}
if (((ShadowWrapper) container.getParent()).getProjectionStatus().equals(UserDtoStatus.UNLINK)) {
return "warning";
return "table-warning";
}
}

switch (container.getStatus()) {
case ADDED:
return "success";
return "table-success";
case DELETED:
return "danger";
return "table-danger";
case NOT_CHANGED:
default:
return null;
Expand Down

0 comments on commit 890a0c9

Please sign in to comment.