From 73f8ab23bf25bff67c2210cee36c1e82e7514835 Mon Sep 17 00:00:00 2001 From: anhefti Date: Thu, 17 Jun 2021 22:07:24 +0200 Subject: [PATCH] SEBSERV-197 removed enableTouchExit attribute from GUI --- .../service/examconfig/impl/rules/BrowserViewModeRule.java | 6 ------ src/main/resources/config/sql/base/V9__touchExit_v1_2.sql | 5 +++++ 2 files changed, 5 insertions(+), 6 deletions(-) create mode 100644 src/main/resources/config/sql/base/V9__touchExit_v1_2.sql diff --git a/src/main/java/ch/ethz/seb/sebserver/gui/service/examconfig/impl/rules/BrowserViewModeRule.java b/src/main/java/ch/ethz/seb/sebserver/gui/service/examconfig/impl/rules/BrowserViewModeRule.java index 15d4ce6b..702a9073 100644 --- a/src/main/java/ch/ethz/seb/sebserver/gui/service/examconfig/impl/rules/BrowserViewModeRule.java +++ b/src/main/java/ch/ethz/seb/sebserver/gui/service/examconfig/impl/rules/BrowserViewModeRule.java @@ -30,7 +30,6 @@ public class BrowserViewModeRule implements ValueChangeRule { private static final Logger log = LoggerFactory.getLogger(BrowserViewModeRule.class); public static final String KEY_BROWSER_VIEW_MODE = "browserViewMode"; - public static final String KEY_TOUCH_EXIT = "enableTouchExit"; public static final String KEY_MAIN_WINDOW_GROUP = "mainBrowserWindowWidth"; public static final String KEY_TOUCH_OPTIMIZED = "touchOptimized"; @@ -53,14 +52,11 @@ public class BrowserViewModeRule implements ValueChangeRule { if (KEY_TOUCH_OPTIMIZED.equals(attribute.name)) { if (BooleanUtils.toBoolean(value.value)) { context.setValue(KEY_BROWSER_VIEW_MODE, "2"); - context.enable(KEY_TOUCH_EXIT); context.disableGroup(KEY_MAIN_WINDOW_GROUP); } else { if (context.getValue(KEY_BROWSER_VIEW_MODE) == null) { context.setValue(KEY_BROWSER_VIEW_MODE, "0"); } - context.setValue(KEY_TOUCH_EXIT, Constants.FALSE_STRING); - context.disable(KEY_TOUCH_EXIT); } return; @@ -72,7 +68,6 @@ public class BrowserViewModeRule implements ValueChangeRule { if (!context.getValue(KEY_TOUCH_OPTIMIZED).equals(Constants.FALSE_STRING)) { context.setValue(KEY_TOUCH_OPTIMIZED, Constants.FALSE_STRING); } - context.disable(KEY_TOUCH_EXIT); context.enableGroup(KEY_MAIN_WINDOW_GROUP); break; } @@ -80,7 +75,6 @@ public class BrowserViewModeRule implements ValueChangeRule { if (!context.getValue(KEY_TOUCH_OPTIMIZED).equals(Constants.FALSE_STRING)) { context.setValue(KEY_TOUCH_OPTIMIZED, Constants.FALSE_STRING); } - context.disable(KEY_TOUCH_EXIT); context.disableGroup(KEY_MAIN_WINDOW_GROUP); break; } diff --git a/src/main/resources/config/sql/base/V9__touchExit_v1_2.sql b/src/main/resources/config/sql/base/V9__touchExit_v1_2.sql new file mode 100644 index 00000000..e0ca0ec0 --- /dev/null +++ b/src/main/resources/config/sql/base/V9__touchExit_v1_2.sql @@ -0,0 +1,5 @@ +-- ----------------------------------------------------- +-- Remove all enableTouchExit attributes (9) from orientation +-- ----------------------------------------------------- +DELETE FROM `orientation` WHERE `config_attribute_id`=9; +UPDATE orientation SET width=7 WHERE config_attribute_id=8; \ No newline at end of file