You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by ah...@apache.org on 2022/03/21 17:03:21 UTC
[isis] branch master updated: ISIS-2877: bootstrap: fieldset property spacing fix
This is an automated email from the ASF dual-hosted git repository.
ahuber pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/isis.git
The following commit(s) were added to refs/heads/master by this push:
new a8ef178 ISIS-2877: bootstrap: fieldset property spacing fix
a8ef178 is described below
commit a8ef1789af0b4b8f6c870349b87c6cb2b4c16c20
Author: Andi Huber <ah...@apache.org>
AuthorDate: Mon Mar 21 18:03:10 2022 +0100
ISIS-2877: bootstrap: fieldset property spacing fix
---
.../components/entity/fieldset/PropertyGroup.html | 4 +-
.../ui/components/scalars/ScalarPanelAbstract.java | 54 ++++++++++++----------
2 files changed, 32 insertions(+), 26 deletions(-)
diff --git a/viewers/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/fieldset/PropertyGroup.html b/viewers/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/fieldset/PropertyGroup.html
index 4a306be..6ce3731 100644
--- a/viewers/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/fieldset/PropertyGroup.html
+++ b/viewers/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/fieldset/PropertyGroup.html
@@ -31,7 +31,9 @@
</div>
<div class="properties card-body">
<div wicket:id="properties">
- <div wicket:id="property" class="property">[property]</div>
+ <div class="row mb-3">
+ <div wicket:id="property" class="property">[property]</div>
+ </div>
</div>
</div>
</div>
diff --git a/viewers/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/ScalarPanelAbstract.java b/viewers/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/ScalarPanelAbstract.java
index 8197099..268cba9 100644
--- a/viewers/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/ScalarPanelAbstract.java
+++ b/viewers/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/scalars/ScalarPanelAbstract.java
@@ -72,6 +72,7 @@ import org.apache.isis.viewer.wicket.ui.util.Wkt.EventTopic;
import org.apache.isis.viewer.wicket.ui.util.WktComponents;
import org.apache.isis.viewer.wicket.ui.util.WktTooltips;
+import lombok.AccessLevel;
import lombok.Getter;
import lombok.NonNull;
import lombok.RequiredArgsConstructor;
@@ -96,8 +97,9 @@ implements ScalarModelSubscriber {
READONLY,
MARKUP,
MULITLINE,
+ COMPOSITE,
TRISTATE,
- FLEX, COMPOSITE
+ FLEX,
}
public enum Repaint {
@@ -142,8 +144,9 @@ implements ScalarModelSubscriber {
// -- COMPACT FRAME
- private Component frameIfCompact;
- protected final Component getCompactFrame() { return frameIfCompact; }
+ @Getter(AccessLevel.PROTECTED)
+ private Component compactFrame;
+
/**
* Builds the component to render the model when in COMPACT form.
* <p>Is added to {@link #getScalarFrameContainer()}.
@@ -152,8 +155,9 @@ implements ScalarModelSubscriber {
// -- REGULAR FRAME
- private MarkupContainer frameIfRegular;
- protected final MarkupContainer getRegularFrame() { return frameIfRegular; }
+ @Getter(AccessLevel.PROTECTED)
+ private MarkupContainer regularFrame;
+
/**
* Builds the component to render the model when in REGULAR format.
* <p>Is added to {@link #getScalarFrameContainer()}.
@@ -162,13 +166,13 @@ implements ScalarModelSubscriber {
// -- INLINE EDIT FRAME
- private WebMarkupContainer frameIfForm;
/**
* Used by most subclasses
* ({@link ScalarPanelAbstract}, {@link ReferencePanel}, {@link ValueChoicesSelect2Panel})
* but not all ({@link IsisBlobOrClobPanelAbstract}, {@link BooleanPanel})
*/
- protected final WebMarkupContainer getFormFrame() { return frameIfForm; }
+ @Getter(AccessLevel.PROTECTED)
+ private WebMarkupContainer formFrame;
// -- FRAME CONTAINER
@@ -219,32 +223,32 @@ implements ScalarModelSubscriber {
switch(scalarModel.getRenderingHint()) {
case REGULAR:
- frameIfRegular = createRegularFrame();
- frameIfCompact = createShallowCompactFrame();
- frameIfRegular.setVisible(true);
- frameIfCompact.setVisible(false);
- frameIfRegular.setOutputMarkupId(true); // enable as AJAX target
+ regularFrame = createRegularFrame();
+ compactFrame = createShallowCompactFrame();
+ regularFrame.setVisible(true);
+ compactFrame.setVisible(false);
+ regularFrame.setOutputMarkupId(true); // enable as AJAX target
- scalarFrameContainer.addOrReplace(frameIfCompact, frameIfRegular,
- frameIfForm = createFormFrame());
+ scalarFrameContainer.addOrReplace(compactFrame, regularFrame,
+ formFrame = createFormFrame());
val associatedLinksAndLabels = associatedLinksAndLabels();
- addPositioningCssTo(frameIfRegular, associatedLinksAndLabels);
- addActionLinksBelowAndRight(frameIfRegular, associatedLinksAndLabels);
+ addPositioningCssTo(regularFrame, associatedLinksAndLabels);
+ addActionLinksBelowAndRight(regularFrame, associatedLinksAndLabels);
- addFeedbackOnlyTo(frameIfRegular, getValidationFeedbackReceiver());
+ addFeedbackOnlyTo(regularFrame, getValidationFeedbackReceiver());
setupInlinePrompt();
break;
default:
- frameIfRegular = createShallowRegularFrame();
- frameIfCompact = createCompactFrame();
- frameIfRegular.setVisible(false);
- frameIfCompact.setVisible(true);
+ regularFrame = createShallowRegularFrame();
+ compactFrame = createCompactFrame();
+ regularFrame.setVisible(false);
+ compactFrame.setVisible(true);
- scalarFrameContainer.addOrReplace(frameIfCompact, frameIfRegular,
- frameIfForm = createFormFrame());
+ scalarFrameContainer.addOrReplace(compactFrame, regularFrame,
+ formFrame = createFormFrame());
break;
}
@@ -506,12 +510,12 @@ implements ScalarModelSubscriber {
protected WebMarkupContainer addEditPropertyIf(final boolean condition) {
val editLinkId = RegularFrame.EDIT_PROPERTY.getContainerId();
if(condition) {
- val editProperty = Wkt.containerAdd(frameIfRegular, editLinkId);
+ val editProperty = Wkt.containerAdd(regularFrame, editLinkId);
Wkt.behaviorAddOnClick(editProperty, this::onPropertyEditClick);
WktTooltips.addTooltip(editProperty, "Click to edit");
return editProperty;
} else {
- WktComponents.permanentlyHide(frameIfRegular, editLinkId);
+ WktComponents.permanentlyHide(regularFrame, editLinkId);
return null;
}
}