mirror of
https://gitee.com/jmix/cuba.git
synced 2024-12-03 19:57:36 +08:00
PL-8730 Buttons of the wizard screen are displayed incorrectly
This commit is contained in:
parent
bda2b35add
commit
1ef4fc0155
@ -42,7 +42,6 @@ import java.util.*;
|
||||
|
||||
/**
|
||||
* Window for generic filter edit
|
||||
*
|
||||
*/
|
||||
public class FilterEditor extends AbstractWindow {
|
||||
|
||||
@ -55,6 +54,9 @@ public class FilterEditor extends AbstractWindow {
|
||||
@Inject
|
||||
protected ConditionsDs conditionsDs;
|
||||
|
||||
@Inject
|
||||
protected GridLayout filterPropertiesGrid;
|
||||
|
||||
@Inject
|
||||
protected TextField filterName;
|
||||
|
||||
@ -117,8 +119,7 @@ public class FilterEditor extends AbstractWindow {
|
||||
protected Boolean useShortConditionForm;
|
||||
|
||||
protected final List<String> componentsToHideInShortForm = Arrays.asList("hiddenLabel", "hidden",
|
||||
"requiredLabel", "required", "widthLabel", "width", //"defaultValueLayoutLabel", "defaultValueLayout",
|
||||
"captionLabel", "caption");
|
||||
"requiredLabel", "required", "widthLabel", "width", "captionLabel", "caption");
|
||||
|
||||
public interface Companion {
|
||||
void showComponentName(WindowManager windowManager, String title, String message);
|
||||
@ -142,6 +143,7 @@ public class FilterEditor extends AbstractWindow {
|
||||
throw new RuntimeException("Filter entity was not passed to filter editor");
|
||||
}
|
||||
filter = (Filter) params.get("filter");
|
||||
|
||||
ConditionsTree paramConditions = (ConditionsTree) params.get("conditions");
|
||||
conditions = paramConditions.createCopy();
|
||||
refreshConditionsDs();
|
||||
@ -234,34 +236,26 @@ public class FilterEditor extends AbstractWindow {
|
||||
}
|
||||
});
|
||||
|
||||
addConditionHelper = new AddConditionHelper(filter, new AddConditionHelper.Handler() {
|
||||
@Override
|
||||
public void handle(AbstractCondition condition) {
|
||||
AbstractCondition item = conditionsDs.getItem();
|
||||
if (item != null && item instanceof GroupCondition) {
|
||||
Node<AbstractCondition> newNode = new Node<>(condition);
|
||||
Node<AbstractCondition> selectedNode = conditions.getNode(item);
|
||||
selectedNode.addChild(newNode);
|
||||
refreshConditionsDs();
|
||||
conditionsTree.expand(item.getId());
|
||||
} else {
|
||||
conditions.getRootNodes().add(new Node<>(condition));
|
||||
refreshConditionsDs();
|
||||
}
|
||||
conditionsTree.setSelected(condition);
|
||||
addConditionHelper = new AddConditionHelper(filter, condition -> {
|
||||
AbstractCondition item = conditionsDs.getItem();
|
||||
if (item != null && item instanceof GroupCondition) {
|
||||
Node<AbstractCondition> newNode = new Node<>(condition);
|
||||
Node<AbstractCondition> selectedNode = conditions.getNode(item);
|
||||
selectedNode.addChild(newNode);
|
||||
refreshConditionsDs();
|
||||
conditionsTree.expand(item.getId());
|
||||
} else {
|
||||
conditions.getRootNodes().add(new Node<>(condition));
|
||||
refreshConditionsDs();
|
||||
}
|
||||
conditionsTree.setSelected(condition);
|
||||
});
|
||||
|
||||
FilterHelper filterHelper = AppBeans.get(FilterHelper.class);
|
||||
filterHelper.initConditionsDragAndDrop(conditionsTree, conditions);
|
||||
|
||||
if (Boolean.TRUE.equals(useShortConditionForm)) {
|
||||
filterName.setVisible(false);
|
||||
filterNameLabel.setVisible(false);
|
||||
availableForAllCb.setVisible(false);
|
||||
availableForAllLabel.setVisible(false);
|
||||
defaultCb.setVisible(false);
|
||||
defaultLabel.setVisible(false);
|
||||
filterPropertiesGrid.setVisible(false);
|
||||
}
|
||||
}
|
||||
|
||||
@ -398,4 +392,4 @@ public class FilterEditor extends AbstractWindow {
|
||||
public Filter getFilter() {
|
||||
return filter;
|
||||
}
|
||||
}
|
||||
}
|
@ -38,7 +38,7 @@
|
||||
<layout spacing="true" expand="mainLayout">
|
||||
<hbox id="mainLayout" spacing="true" expand="leftPanel" width="100%">
|
||||
<vbox id="leftPanel" height="100%" spacing="true" expand="conditionsTree">
|
||||
<grid spacing="true" width="100%">
|
||||
<grid id="filterPropertiesGrid" spacing="true" width="100%">
|
||||
<columns>
|
||||
<column/>
|
||||
<column flex="1"/>
|
||||
|
@ -387,8 +387,6 @@ public class WebFieldGroup extends WebAbstractComponent<CubaFieldGroupLayout> im
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public void setDatasource(final Datasource datasource) {
|
||||
Preconditions.checkNotNullArgument(datasource, "datasource is null");
|
||||
|
||||
if (this.datasource != null) {
|
||||
throw new UnsupportedOperationException("Changing datasource is not supported by the FieldGroup component");
|
||||
}
|
||||
|
@ -16,9 +16,11 @@
|
||||
*/
|
||||
|
||||
@mixin cuba-report-wizard {
|
||||
.report-wizard-top-separator {
|
||||
.report-wizard-tip-label {
|
||||
padding-top: $v-layout-spacing-vertical;
|
||||
padding-bottom: $v-layout-spacing-vertical;
|
||||
border-top: valo-border();
|
||||
line-height: 0;
|
||||
border-bottom: valo-border();
|
||||
}
|
||||
|
||||
.v-textfield-hidden-field{
|
||||
|
@ -16,8 +16,10 @@
|
||||
*/
|
||||
|
||||
@mixin cuba-report-wizard {
|
||||
|
||||
.report-wizard-top-separator {
|
||||
.report-wizard-tip-label {
|
||||
padding-top: 5px;
|
||||
padding-bottom: 5px;
|
||||
border-bottom: #A5C4E0 1px solid;
|
||||
border-top: #A5C4E0 1px solid;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user