SEBSERV-163 filter

This commit is contained in:
anhefti 2022-09-12 09:25:42 +02:00
parent 5703f1cb43
commit ee0034c367
7 changed files with 51 additions and 4 deletions

View file

@ -233,14 +233,42 @@ public class ActionPane implements TemplateComposer {
// title
if (this.pageService.getI18nSupport().hasText(category.title)) {
final String titleText = this.pageService.getI18nSupport().getText(category.title);
final Label actionsTitle = this.widgetFactory.labelLocalized(
composite,
CustomVariant.TEXT_H3,
category.title);
final GridData titleLayout = new GridData(SWT.FILL, SWT.TOP, true, false);
if (" ".equals(this.pageService.getI18nSupport().getText(category.title))) {
if (" ".equals(titleText)) {
titleLayout.heightHint = 6;
} else {
actionsTitle.setData(RWT.CUSTOM_VARIANT, "close");
actionsTitle.setImage(WidgetFactory.ImageIcon.ACTIVE.getImage(parent.getDisplay()));
actionsTitle.setText("    " + titleText);
actionsTitle.addListener(SWT.MouseUp, event -> {
try {
final Control contentControl = composite.getChildren()[1];
if (contentControl.isVisible()) {
actionsTitle.setData(RWT.CUSTOM_VARIANT, "open");
contentControl.setVisible(false);
final GridData l = (GridData) contentControl.getLayoutData();
l.heightHint = 0;
composite.getParent().layout(true, true);
} else {
actionsTitle.setData(RWT.CUSTOM_VARIANT, "close");
contentControl.setVisible(true);
final GridData l = (GridData) contentControl.getLayoutData();
l.heightHint = SWT.DEFAULT;
composite.getParent().layout(true, true);
}
} catch (final Exception e) {
// just ignore
}
});
}
actionsTitle.setLayoutData(titleLayout);
}

View file

@ -88,7 +88,6 @@ public class ActivitiesPane implements TemplateComposer {
pageContext.getParent(),
SWT.SINGLE | SWT.FULL_SELECTION);
final GridData navigationGridData = new GridData(SWT.FILL, SWT.FILL, true, true);
//navigationGridData.horizontalIndent = 10;
navigation.setLayoutData(navigationGridData);
final PageActionBuilder actionBuilder = this.pageService.pageActionBuilder(pageContext);

View file

@ -112,7 +112,7 @@ public class ExamClientGroupList implements TemplateComposer {
.withColumn(new ColumnDefinition<ClientGroup>(
Domain.CLIENT_GROUP.ATTR_COLOR,
CLIENT_GROUP_COLOR_COLUMN_KEY,
cgt -> this.widgetFactory.getColorValueHTML(cgt))
cgt -> WidgetFactory.getColorValueHTML(cgt))
.asMarkup()
.widthProportion(1))

View file

@ -358,7 +358,7 @@ public class ExamTemplateForm implements TemplateComposer {
.withColumn(new ColumnDefinition<ClientGroupTemplate>(
Domain.CLIENT_GROUP.ATTR_COLOR,
CLIENT_GROUP_COLOR_COLUMN_KEY,
cgt -> this.widgetFactory.getColorValueHTML(cgt))
cgt -> WidgetFactory.getColorValueHTML(cgt))
.asMarkup()
.widthProportion(1))
.withColumn(new ColumnDefinition<ClientGroupTemplate>(

View file

@ -141,6 +141,26 @@ Label.colorlight {
padding: 2px 5px 2px 5px;
}
Label.close {
font: bold 14px Arial, Helvetica, sans-serif;
height: 20px;
padding: 0;
color: #1f407a;
background-image: url( static/images/close.png );
background-position: left;
background-repeat: no-repeat;
}
Label.open {
font: bold 14px Arial, Helvetica, sans-serif;
height: 20px;
padding: 0;
color: #1f407a;
background-image: url( static/images/open.png );
background-position: left;
background-repeat: no-repeat;
}
Composite {
background-color: transparent;
border: none;

Binary file not shown.

After

Width:  |  Height:  |  Size: 150 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 159 B