From d3134b9b4b627711c08641c251b8ee8691233d16 Mon Sep 17 00:00:00 2001 From: anhefti Date: Mon, 27 Mar 2023 10:20:08 +0200 Subject: [PATCH] SEBSERV-403 --- .../examconfig/impl/CellFieldBuilderAdapter.java | 8 ++++++++ .../gui/service/examconfig/impl/CheckBoxBuilder.java | 1 + .../examconfig/impl/RadioSelectionFieldBuilder.java | 3 ++- ...s_v1_5.sql => V22__sebSettingsSecurityGUI_v1_5.sql} | 10 +++++----- 4 files changed, 16 insertions(+), 6 deletions(-) rename src/main/resources/config/sql/base/{V22__sebClientVersionSettings_v1_5.sql => V22__sebSettingsSecurityGUI_v1_5.sql} (81%) diff --git a/src/main/java/ch/ethz/seb/sebserver/gui/service/examconfig/impl/CellFieldBuilderAdapter.java b/src/main/java/ch/ethz/seb/sebserver/gui/service/examconfig/impl/CellFieldBuilderAdapter.java index 4355428b..5e1f312e 100644 --- a/src/main/java/ch/ethz/seb/sebserver/gui/service/examconfig/impl/CellFieldBuilderAdapter.java +++ b/src/main/java/ch/ethz/seb/sebserver/gui/service/examconfig/impl/CellFieldBuilderAdapter.java @@ -107,6 +107,14 @@ interface CellFieldBuilderAdapter { xpos--; } } + if (orientation.title == TitleOrientation.RIGHT_SPAN) { + int xpos = x + orientation.width; + while (xpos < grid[y].length && grid[y][xpos] == null) { + grid[y][xpos] = DUMMY_BUILDER_ADAPTER; + this.span++; + xpos++; + } + } } @Override diff --git a/src/main/java/ch/ethz/seb/sebserver/gui/service/examconfig/impl/CheckBoxBuilder.java b/src/main/java/ch/ethz/seb/sebserver/gui/service/examconfig/impl/CheckBoxBuilder.java index eec1bed8..e999fba7 100644 --- a/src/main/java/ch/ethz/seb/sebserver/gui/service/examconfig/impl/CheckBoxBuilder.java +++ b/src/main/java/ch/ethz/seb/sebserver/gui/service/examconfig/impl/CheckBoxBuilder.java @@ -80,6 +80,7 @@ public class CheckBoxBuilder implements InputFieldBuilder { final GridData gridData = new GridData(SWT.FILL, SWT.FILL, true, false); gridData.verticalIndent = 0; + gridData.heightHint = 26; checkbox.setLayoutData(gridData); final CheckboxField checkboxField = new CheckboxField( diff --git a/src/main/java/ch/ethz/seb/sebserver/gui/service/examconfig/impl/RadioSelectionFieldBuilder.java b/src/main/java/ch/ethz/seb/sebserver/gui/service/examconfig/impl/RadioSelectionFieldBuilder.java index f51a2179..12093323 100644 --- a/src/main/java/ch/ethz/seb/sebserver/gui/service/examconfig/impl/RadioSelectionFieldBuilder.java +++ b/src/main/java/ch/ethz/seb/sebserver/gui/service/examconfig/impl/RadioSelectionFieldBuilder.java @@ -70,7 +70,8 @@ public class RadioSelectionFieldBuilder extends SelectionFieldBuilder implements i18nSupport.getText(attributeNameKey)) .getTypeInstance(); - selection.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false)); + final GridData gridData = new GridData(SWT.FILL, SWT.FILL, true, false); + selection.setLayoutData(gridData); final RadioSelectionInputField radioSelectionInputField = new RadioSelectionInputField( attribute, orientation, diff --git a/src/main/resources/config/sql/base/V22__sebClientVersionSettings_v1_5.sql b/src/main/resources/config/sql/base/V22__sebSettingsSecurityGUI_v1_5.sql similarity index 81% rename from src/main/resources/config/sql/base/V22__sebClientVersionSettings_v1_5.sql rename to src/main/resources/config/sql/base/V22__sebSettingsSecurityGUI_v1_5.sql index 57fba6e9..97c9cc0f 100644 --- a/src/main/resources/config/sql/base/V22__sebClientVersionSettings_v1_5.sql +++ b/src/main/resources/config/sql/base/V22__sebSettingsSecurityGUI_v1_5.sql @@ -4,8 +4,8 @@ UPDATE orientation SET y_position=10 WHERE config_attribute_id=301 AND template_id=0; UPDATE orientation SET y_position=14 WHERE config_attribute_id=305 AND template_id=0; -UPDATE orientation SET y_position=17 WHERE config_attribute_id=306 AND template_id=0; -UPDATE orientation SET y_position=16 WHERE config_attribute_id=307 AND template_id=0; +UPDATE orientation SET y_position=18 WHERE config_attribute_id=306 AND template_id=0; +UPDATE orientation SET y_position=17 WHERE config_attribute_id=307 AND template_id=0; UPDATE orientation SET y_position=2 WHERE config_attribute_id=309 AND template_id=0; UPDATE orientation SET y_position=3 WHERE config_attribute_id=310 AND template_id=0; UPDATE orientation SET y_position=4 WHERE config_attribute_id=311 AND template_id=0; @@ -13,13 +13,13 @@ UPDATE orientation SET y_position=5 WHERE config_attribute_id=312 AND template_i UPDATE orientation SET y_position=6 WHERE config_attribute_id=313 AND template_id=0; UPDATE orientation SET y_position=7 WHERE config_attribute_id=314 AND template_id=0; -UPDATE orientation SET y_position=11, group_id=NULL WHERE config_attribute_id=315 AND template_id=0; +UPDATE orientation SET y_position=10, group_id=NULL, width=1, title='RIGHT_SPAN' WHERE config_attribute_id=315 AND template_id=0; UPDATE orientation SET y_position=8 WHERE config_attribute_id=316 AND template_id=0; UPDATE orientation SET y_position=19 WHERE config_attribute_id=317 AND template_id=0; UPDATE orientation SET y_position=15 WHERE config_attribute_id=319 AND template_id=0; UPDATE orientation SET y_position=16 WHERE config_attribute_id=320 AND template_id=0; -UPDATE orientation SET y_position=13 WHERE config_attribute_id=947 AND template_id=0; +UPDATE orientation SET y_position=12 WHERE config_attribute_id=947 AND template_id=0; INSERT IGNORE INTO orientation (config_attribute_id, template_id, view_id, group_id, x_position, y_position, width, height, title) VALUES - (1551, 0, 9, null, 7, 12, 5, 1, 'NONE'); \ No newline at end of file + (1551, 0, 9, null, 7, 11, 5, 1, 'NONE'); \ No newline at end of file