SEBSERV-163 filter
This commit is contained in:
parent
5703f1cb43
commit
ee0034c367
7 changed files with 51 additions and 4 deletions
|
@ -233,14 +233,42 @@ public class ActionPane implements TemplateComposer {
|
||||||
|
|
||||||
// title
|
// title
|
||||||
if (this.pageService.getI18nSupport().hasText(category.title)) {
|
if (this.pageService.getI18nSupport().hasText(category.title)) {
|
||||||
|
final String titleText = this.pageService.getI18nSupport().getText(category.title);
|
||||||
|
|
||||||
final Label actionsTitle = this.widgetFactory.labelLocalized(
|
final Label actionsTitle = this.widgetFactory.labelLocalized(
|
||||||
composite,
|
composite,
|
||||||
CustomVariant.TEXT_H3,
|
CustomVariant.TEXT_H3,
|
||||||
category.title);
|
category.title);
|
||||||
|
|
||||||
final GridData titleLayout = new GridData(SWT.FILL, SWT.TOP, true, false);
|
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;
|
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);
|
actionsTitle.setLayoutData(titleLayout);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -88,7 +88,6 @@ public class ActivitiesPane implements TemplateComposer {
|
||||||
pageContext.getParent(),
|
pageContext.getParent(),
|
||||||
SWT.SINGLE | SWT.FULL_SELECTION);
|
SWT.SINGLE | SWT.FULL_SELECTION);
|
||||||
final GridData navigationGridData = new GridData(SWT.FILL, SWT.FILL, true, true);
|
final GridData navigationGridData = new GridData(SWT.FILL, SWT.FILL, true, true);
|
||||||
//navigationGridData.horizontalIndent = 10;
|
|
||||||
navigation.setLayoutData(navigationGridData);
|
navigation.setLayoutData(navigationGridData);
|
||||||
|
|
||||||
final PageActionBuilder actionBuilder = this.pageService.pageActionBuilder(pageContext);
|
final PageActionBuilder actionBuilder = this.pageService.pageActionBuilder(pageContext);
|
||||||
|
|
|
@ -112,7 +112,7 @@ public class ExamClientGroupList implements TemplateComposer {
|
||||||
.withColumn(new ColumnDefinition<ClientGroup>(
|
.withColumn(new ColumnDefinition<ClientGroup>(
|
||||||
Domain.CLIENT_GROUP.ATTR_COLOR,
|
Domain.CLIENT_GROUP.ATTR_COLOR,
|
||||||
CLIENT_GROUP_COLOR_COLUMN_KEY,
|
CLIENT_GROUP_COLOR_COLUMN_KEY,
|
||||||
cgt -> this.widgetFactory.getColorValueHTML(cgt))
|
cgt -> WidgetFactory.getColorValueHTML(cgt))
|
||||||
.asMarkup()
|
.asMarkup()
|
||||||
.widthProportion(1))
|
.widthProportion(1))
|
||||||
|
|
||||||
|
|
|
@ -358,7 +358,7 @@ public class ExamTemplateForm implements TemplateComposer {
|
||||||
.withColumn(new ColumnDefinition<ClientGroupTemplate>(
|
.withColumn(new ColumnDefinition<ClientGroupTemplate>(
|
||||||
Domain.CLIENT_GROUP.ATTR_COLOR,
|
Domain.CLIENT_GROUP.ATTR_COLOR,
|
||||||
CLIENT_GROUP_COLOR_COLUMN_KEY,
|
CLIENT_GROUP_COLOR_COLUMN_KEY,
|
||||||
cgt -> this.widgetFactory.getColorValueHTML(cgt))
|
cgt -> WidgetFactory.getColorValueHTML(cgt))
|
||||||
.asMarkup()
|
.asMarkup()
|
||||||
.widthProportion(1))
|
.widthProportion(1))
|
||||||
.withColumn(new ColumnDefinition<ClientGroupTemplate>(
|
.withColumn(new ColumnDefinition<ClientGroupTemplate>(
|
||||||
|
|
|
@ -141,6 +141,26 @@ Label.colorlight {
|
||||||
padding: 2px 5px 2px 5px;
|
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 {
|
Composite {
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
border: none;
|
border: none;
|
||||||
|
|
BIN
src/main/resources/static/images/close.png
Normal file
BIN
src/main/resources/static/images/close.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 150 B |
BIN
src/main/resources/static/images/open.png
Normal file
BIN
src/main/resources/static/images/open.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 159 B |
Loading…
Reference in a new issue