From c847845a6fadbe8e4ae4042d44035519bc1659ce Mon Sep 17 00:00:00 2001 From: Le Ngoc Danh <127722015+lndanh-axonivy@users.noreply.github.com> Date: Thu, 10 Oct 2024 17:12:49 +0700 Subject: [PATCH 1/3] =?UTF-8?q?IVYPORTAL-17533=20create=20accessibility=20?= =?UTF-8?q?mode=20dashboard=20template=20for=20LE:=20=E2=80=A6=20(#1117)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * IVYPORTAL-17533 create accessibility mode dashboard template for LE: implement * IVYPORTAL-17533 create accessibility mode dashboard template for LE: implement * IVYPORTAL-17533 create accessibility mode dashboard template for LE: implement * IVYPORTAL-17533 create accessibility mode dashboard template for LE: implement * IVYPORTAL-17533 create accessibility mode dashboard template for LE: update dashboard json file --------- Co-authored-by: lndanh-axonivy --- .../resources/css/document-screenshot.css | 14 +- .../resources/js/document-screenshot.js | 14 +- ...dashboard-case-widget-has-quicksearch.json | 4 +- ...dashboard-task-widget-has-quicksearch.json | 4 +- .../selenium/common/ScreenshotUtils.java | 1 + .../DashboardConfigurationScreenshotTest.java | 5 + .../screenshot/DashboardScreenshotTest.java | 66 +++++ .../portal/selenium/page/AbstractPage.java | 5 + .../page/NewDashboardDetailsEditPage.java | 5 + .../selenium/page/NewDashboardPage.java | 30 +- .../dashboard/DashboardConfigurationTest.java | 21 ++ AxonIvyPortal/portal/cms/cms_de.yaml | 12 + AxonIvyPortal/portal/cms/cms_en.yaml | 44 +++ AxonIvyPortal/portal/cms/cms_es.yaml | 11 + AxonIvyPortal/portal/cms/cms_fr.yaml | 44 +++ .../variables/Portal/DashboardTemplates.json | 279 ++++++++++++++++++ .../AccessibilityShortcutCustomWidget.p.json | 48 +++ .../portal/generic/bean/DashboardBean.java | 7 + .../portalkit/dto/dashboard/Dashboard.java | 10 + .../AccessibilityShortcut.xhtml | 20 ++ .../AccessibilityShortcutData.d.json | 6 + .../AccessibilityShortcutProcess.p.json | 50 ++++ .../portal/webContent/layouts/frame-10.xhtml | 60 ++++ .../layouts/includes/progress-loader.xhtml | 15 + .../webContent/layouts/includes/topbar.xhtml | 4 + .../resources/css/accessibility.css | 36 +++ .../resources/css/portal-variables-dark.css | 4 + .../resources/css/portal-variables-light.css | 3 + .../webContent/resources/css/portal.css | 11 + 29 files changed, 826 insertions(+), 7 deletions(-) create mode 100644 AxonIvyPortal/portal/processes/Functional Processes/AccessibilityShortcutCustomWidget.p.json create mode 100644 AxonIvyPortal/portal/src_hd/ch/ivy/addon/portalkit/component/AccessibilityShortcut/AccessibilityShortcut.xhtml create mode 100644 AxonIvyPortal/portal/src_hd/ch/ivy/addon/portalkit/component/AccessibilityShortcut/AccessibilityShortcutData.d.json create mode 100644 AxonIvyPortal/portal/src_hd/ch/ivy/addon/portalkit/component/AccessibilityShortcut/AccessibilityShortcutProcess.p.json create mode 100644 AxonIvyPortal/portal/webContent/layouts/frame-10.xhtml create mode 100644 AxonIvyPortal/portal/webContent/layouts/includes/progress-loader.xhtml create mode 100644 AxonIvyPortal/portal/webContent/resources/css/accessibility.css diff --git a/AxonIvyPortal/portal-selenium-test/resources/css/document-screenshot.css b/AxonIvyPortal/portal-selenium-test/resources/css/document-screenshot.css index 1489a463490..a6e51bbe0a8 100644 --- a/AxonIvyPortal/portal-selenium-test/resources/css/document-screenshot.css +++ b/AxonIvyPortal/portal-selenium-test/resources/css/document-screenshot.css @@ -58,4 +58,16 @@ .red-topbottomright-medium-border { border-left: 0; -} \ No newline at end of file +} + +.black-medium-outline { + outline-style: solid !important; + outline-color: black !important; + outline-width: medium !important; +} + +.black-thin-outline { + outline-style: solid; + outline-color: black; + outline-width: thin; +} diff --git a/AxonIvyPortal/portal-selenium-test/resources/js/document-screenshot.js b/AxonIvyPortal/portal-selenium-test/resources/js/document-screenshot.js index 900b8a17cec..21a68240535 100644 --- a/AxonIvyPortal/portal-selenium-test/resources/js/document-screenshot.js +++ b/AxonIvyPortal/portal-selenium-test/resources/js/document-screenshot.js @@ -542,4 +542,16 @@ function removeHighlightShowFilterButton() { function highlightQuickSearchTextbox() { createRedMediumOutline($(".widget__header .widget-header-quick-search > form")); -} \ No newline at end of file +} + +function createBlackThinOutline($element) { + $element.addClass("black-thin-outline"); +} + +function createBlackMediumOutline($element) { + $element.addClass("black-medium-outline"); +} + +function highlightElement(elementSelector) { + createRedMediumOutline($(elementSelector)); +} diff --git a/AxonIvyPortal/portal-selenium-test/resources/testFile/dashboard-case-widget-has-quicksearch.json b/AxonIvyPortal/portal-selenium-test/resources/testFile/dashboard-case-widget-has-quicksearch.json index 9429227adba..d7600a2319d 100644 --- a/AxonIvyPortal/portal-selenium-test/resources/testFile/dashboard-case-widget-has-quicksearch.json +++ b/AxonIvyPortal/portal-selenium-test/resources/testFile/dashboard-case-widget-has-quicksearch.json @@ -31,8 +31,8 @@ } ], "layout": { - "w": 9, - "h": 4, + "w": 10, + "h": 6, "x": 0, "y": 4 }, diff --git a/AxonIvyPortal/portal-selenium-test/resources/testFile/dashboard-task-widget-has-quicksearch.json b/AxonIvyPortal/portal-selenium-test/resources/testFile/dashboard-task-widget-has-quicksearch.json index cff115cfcc8..a69122ef3f4 100644 --- a/AxonIvyPortal/portal-selenium-test/resources/testFile/dashboard-task-widget-has-quicksearch.json +++ b/AxonIvyPortal/portal-selenium-test/resources/testFile/dashboard-task-widget-has-quicksearch.json @@ -31,8 +31,8 @@ } ], "layout": { - "w": 9, - "h": 4, + "w": 10, + "h": 6, "x": 0, "y": 4 }, diff --git a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/common/ScreenshotUtils.java b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/common/ScreenshotUtils.java index 2520f3a7052..671e9eb378e 100644 --- a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/common/ScreenshotUtils.java +++ b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/common/ScreenshotUtils.java @@ -48,6 +48,7 @@ public class ScreenshotUtils { public static final String DASHBOARD_CONFIGURATION_FOLDER = "/dashboard-configuration/"; public static final String NOTIFICATION_FOLDER = "/notification/"; public static final String MOBILE_FOLDER = "/mobile/"; + public static final String ACCESSIBILITY_DASHBOARD_FOLDER = "/accessibility/"; @PostConstruct public void initFolder() { diff --git a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/document/screenshot/DashboardConfigurationScreenshotTest.java b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/document/screenshot/DashboardConfigurationScreenshotTest.java index cf7d081807e..086860653da 100644 --- a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/document/screenshot/DashboardConfigurationScreenshotTest.java +++ b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/document/screenshot/DashboardConfigurationScreenshotTest.java @@ -68,6 +68,11 @@ public void screenshotDashboardConfigurationUserGuide() throws IOException { dashboardConfigurationPage.openCreatePublicDashboardMenu(); ScreenshotUtils.captureElementWithMarginOptionScreenshot(dashboardConfigurationPage.getDashboardTemplates(), ScreenshotUtils.DASHBOARD_CONFIGURATION_FOLDER + "dashboard-templates", new ScreenshotMargin(10)); + // screenshot highlight for accessibility template + ScreenshotUtils.resizeBrowser(new Dimension(1920, 1080)); + ScreenshotUtils.executeDecorateJs("createBlackMediumOutline($($('.dashboard-action-container')[4]));"); + ScreenshotUtils.captureElementWithMarginOptionScreenshot(dashboardConfigurationPage.getDashboardTemplates(), + ScreenshotUtils.ACCESSIBILITY_DASHBOARD_FOLDER + "accessibility-dashboard-creation", new ScreenshotMargin(10)); dashboardConfigurationPage.openImportPublicDashboards(); ScreenshotUtils.captureElementWithMarginOptionScreenshot(dashboardConfigurationPage.getImportDialog(), ScreenshotUtils.DASHBOARD_CONFIGURATION_FOLDER + "import-public-dashboard-dialog", new ScreenshotMargin(10)); diff --git a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/document/screenshot/DashboardScreenshotTest.java b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/document/screenshot/DashboardScreenshotTest.java index 9e10fd3f15e..b668dfc7083 100644 --- a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/document/screenshot/DashboardScreenshotTest.java +++ b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/document/screenshot/DashboardScreenshotTest.java @@ -33,11 +33,15 @@ import com.axonivy.portal.selenium.page.ProcessEditWidgetNewDashBoardPage; import com.axonivy.portal.selenium.page.ProcessViewerWidgetNewDashBoardPage; import com.axonivy.portal.selenium.page.TaskEditWidgetNewDashBoardPage; +import com.axonivy.portal.selenium.page.TaskTemplatePage; import com.axonivy.portal.selenium.page.TaskWidgetNewDashBoardPage; import com.axonivy.portal.selenium.page.WelcomeEditWidgetNewDashboardPage; import com.axonivy.portal.selenium.util.ConfigurationJsonUtils; import com.codeborne.selenide.CollectionCondition; +import com.codeborne.selenide.Condition; import com.codeborne.selenide.SelenideElement; +import static com.codeborne.selenide.CollectionCondition.sizeGreaterThanOrEqual; +import static com.codeborne.selenide.Selenide.$; import ch.ivy.addon.portalkit.enums.PortalVariable; @@ -523,6 +527,68 @@ public void screenshotFilterExample() throws IOException { ScreenshotUtils.captureElementWithMarginOptionScreenshot(caseWidget.getConfigurationFilter(), ScreenshotUtils.NEW_DASHBOARD_FOLDER + "complex-filter-example", new ScreenshotMargin(10)); } + + @Test + public void screenshotForQuickSearchConfigurationOnTaskWidget() throws IOException { + ConfigurationJsonUtils.updateJSONSetting("dashboard-task-widget-has-quicksearch.json", Variable.DASHBOARD); + login(TestAccount.ADMIN_USER); + redirectToNewDashBoard(); + NewDashboardPage newDashboardPage = new NewDashboardPage(); + newDashboardPage.waitForTaskWidgetLoaded(); + newDashboardPage.clickOnFirstTaskAction(); + ScreenshotUtils.executeDecorateJs("createBlackMediumOutline($($('.task-action-item-label')[0]));"); + ScreenshotUtils.captureElementWithMarginOptionScreenshot($(".dashboard__widget").shouldBe(Condition.appear, DEFAULT_TIMEOUT), + ScreenshotUtils.ACCESSIBILITY_DASHBOARD_FOLDER + "task-actions-popup", + new ScreenshotMargin(20, 20, 20, 120)); + } + + @Test + public void screenshotForQuickSearchConfigurationOnCasaWidget() throws IOException { + ConfigurationJsonUtils.updateJSONSetting("dashboard-case-widget-has-quicksearch.json", Variable.DASHBOARD); + login(TestAccount.ADMIN_USER); + redirectToNewDashBoard(); + NewDashboardPage newDashboardPage = new NewDashboardPage(); + newDashboardPage.waitForCaseWidgetLoaded(); + newDashboardPage.clickOnFirstCaseAction(); + ScreenshotUtils.executeDecorateJs("createBlackMediumOutline($($('.task-action-item-label')[0]));"); + ScreenshotUtils.captureElementWithMarginOptionScreenshot($(".dashboard__widget").shouldBe(Condition.appear, DEFAULT_TIMEOUT), + ScreenshotUtils.ACCESSIBILITY_DASHBOARD_FOLDER + "case-actions-popup", + new ScreenshotMargin(20, 20, 20, 120)); + } + + @Test + public void screenshotActionWarningDialogWhenStartTask() throws IOException { + ConfigurationJsonUtils.updateJSONSetting("dashboard-task-widget-has-quicksearch.json", Variable.DASHBOARD); + login(TestAccount.ADMIN_USER); + redirectToNewDashBoard(); + NewDashboardPage newDashboardPage = new NewDashboardPage(); + newDashboardPage.waitForTaskWidgetLoaded(); + String taskName = "Sick Leave Request"; + TaskWidgetNewDashBoardPage taskWidget = new TaskWidgetNewDashBoardPage(); + taskWidget.expand().shouldHave(sizeGreaterThanOrEqual(1)); + taskWidget.openFilterWidget(); + taskWidget.resetFilter(); + taskWidget.openFilterWidget(); + taskWidget.filterTaskName(taskName, FilterOperator.IS); + taskWidget.applyFilter(); + + newDashboardPage = new NewDashboardPage(); + newDashboardPage.startTask(0); + TaskTemplatePage taskIframePage = new TaskTemplatePage(); + taskIframePage.switchToIFrameOfTask(); + taskIframePage.clickCancelAndLeftButton(); + taskIframePage.switchBackToParent(); + + newDashboardPage = new NewDashboardPage(); + newDashboardPage.waitForTaskWidgetLoaded(); + newDashboardPage.startTask(0); + newDashboardPage.focusOnWarningResetTaskDialog(); + ScreenshotUtils.executeDecorateJs("createBlackThinOutline($(\"[id$=':reset-task-confirmation-dialog']\").find('a'));"); + ScreenshotUtils.captureElementWithMarginOptionScreenshot($("[id$='reset-task-confirmation-dialog']").shouldBe(Condition.appear, DEFAULT_TIMEOUT), + ScreenshotUtils.ACCESSIBILITY_DASHBOARD_FOLDER + "reset-task-dialog", + new ScreenshotMargin(20, 20, 20, 20)); + } + private void redirectToDashboardConfiguration() { redirectToRelativeLink("portal/1549F58C18A6C562/PortalDashboardConfiguration.ivp"); diff --git a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/AbstractPage.java b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/AbstractPage.java index 420f7642a9e..675d7e6a4dc 100644 --- a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/AbstractPage.java +++ b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/AbstractPage.java @@ -63,4 +63,9 @@ public void waitDocumentReady() { .until((ExpectedCondition) wd -> ((JavascriptExecutor) wd).executeScript("return document.readyState") .equals("complete")); } + + public void focusByJavascript(SelenideElement element) { + ((JavascriptExecutor) WebDriverRunner.getWebDriver()).executeScript("arguments[0].focus();", element); + } + } diff --git a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/NewDashboardDetailsEditPage.java b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/NewDashboardDetailsEditPage.java index a7ed76f4dc6..4dc31e055c1 100644 --- a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/NewDashboardDetailsEditPage.java +++ b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/NewDashboardDetailsEditPage.java @@ -236,4 +236,9 @@ public void editWidgetById(int id) { public void scrollToStatistic() { $(byText("Statistic Widgets")).shouldBe(Condition.appear, DEFAULT_TIMEOUT).scrollIntoView("{block: \"start\", inline: \"start\"}"); } + + public SelenideElement getAccessibilityWidget() { + return $("[id^='id-custom-widget-iframe']"); + } + } diff --git a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/NewDashboardPage.java b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/NewDashboardPage.java index eaba5c775fb..5bb3215e45b 100644 --- a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/NewDashboardPage.java +++ b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/NewDashboardPage.java @@ -9,7 +9,6 @@ import java.util.List; import org.openqa.selenium.By; -import org.openqa.selenium.By.ByCssSelector; import org.openqa.selenium.JavascriptExecutor; import org.openqa.selenium.Keys; import org.openqa.selenium.WebDriver; @@ -1109,4 +1108,33 @@ public void waitForProcessWidgetLoaded() { checkDisplayedCompactModeProcessContainer(); getProcessWidgetTable().shouldBe(Condition.appear, DEFAULT_TIMEOUT); } + + public void clickOnFirstTaskAction() { + $$("[id$='dashboard-task-side-steps-menu']") + .get(0).shouldBe(getClickableCondition(), DEFAULT_TIMEOUT) + .click(); + + $("[id$='dashboard-actions-task-task_1:side-steps-panel']") + .shouldBe(appear, DEFAULT_TIMEOUT); + focusByJavascript($("[id$=':task-open-detail-command']")); + $("[id$=':task-open-detail-command']").sendKeys(Keys.TAB); + } + + public void clickOnFirstCaseAction() { + $$("[id$='dashboard-case-side-steps-menu']") + .get(0).shouldBe(getClickableCondition(), DEFAULT_TIMEOUT) + .click(); + + $("[id$=':action-steps-panel']") + .shouldBe(appear, DEFAULT_TIMEOUT); + focusByJavascript($("[id$=':case-item-open-detail-link']")); + $("[id$=':case-item-open-detail-link']").sendKeys(Keys.TAB); + } + + public void focusOnWarningResetTaskDialog() { + $("[id$=':reset-task-confirmation-dialog']").shouldBe(appear, DEFAULT_TIMEOUT); + SelenideElement element = $("[id$=':reset-task-confirmation-dialog']").$("a"); + focusByJavascript(element); + element.pressTab(); + } } diff --git a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/test/dashboard/DashboardConfigurationTest.java b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/test/dashboard/DashboardConfigurationTest.java index ac4ed756f41..bb50e4bae9b 100644 --- a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/test/dashboard/DashboardConfigurationTest.java +++ b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/test/dashboard/DashboardConfigurationTest.java @@ -466,4 +466,25 @@ public void testImportPublicDashboard() { configurationPage.saveImportDashboard(name, newGermanName, description, icon); } + + @Test + public void testAddNewAcccessibilityDashboard() { + String name = "Accessibility shortcuts dashboard"; + String icon = "fa-coffee"; + String description = "Accessibility shortcuts dashboard description"; + List permissions = Arrays.asList("Cost Object (CostObject)"); + LinkNavigator.redirectToPortalDashboardConfiguration(); + var configurationPage = new DashboardConfigurationPage(); + configurationPage.openCreatePublicDashboardMenu(); + configurationPage.createPublicDashboardFromTemplate(name, icon, description, permissions, 2); + + NewDashboardDetailsEditPage newDashboardDetailsEditPage = new NewDashboardDetailsEditPage(); + newDashboardDetailsEditPage.getTitleByIndex(0).shouldBe(Condition.exactText(name)); + newDashboardDetailsEditPage.getIconByIndex(0, icon).shouldBe(Condition.appear); + assertEquals( newDashboardDetailsEditPage.getWidgets().size(), 4); + + SelenideElement element = newDashboardDetailsEditPage.getAccessibilityWidget(); + assertEquals(element.getAttribute("title"), "Accessibility Shortcuts frame"); + } + } diff --git a/AxonIvyPortal/portal/cms/cms_de.yaml b/AxonIvyPortal/portal/cms/cms_de.yaml index 104b1bf7133..7dce2166b85 100644 --- a/AxonIvyPortal/portal/cms/cms_de.yaml +++ b/AxonIvyPortal/portal/cms/cms_de.yaml @@ -48,6 +48,8 @@ ch.ivy.addon.portalkit.ui.jsf: nextAbsence: Bevorstehende Abwesenheit selectedDeputyFor: Ausgewählter Benutzer ist Stellvertreter für selectedUser: Ausgewählter Benutzer + AccessibilityShortcuts: + processName: Barrierefreiheit Kürzel Widgets AllTasks: caseDescription: Beschreibung des Vorgangs taskDescription: Aufgabenbeschreibung @@ -1332,6 +1334,16 @@ Dialogs: LinkCopied: Link kopiert dashboard: component: + AccessibilityShortcuts: + content: "
\n
\n Alt + 1Fokus auf die Dashboards\n
\n
\n Alt + 4Fokus auf die Fälle\n
\n\ + \
\n Alt + AFokus auf den ersten Prozess\n
\n
\n TabSequentielles Durchlaufen von Elementen\n
\n \n Alt + 2Fokus auf die Prozesse\n
\n
\n Alt + 5Fokus auf die Suche\n
\n
\n Alt + WFokus auf die erste Aufgabe\n
\n
\n EscErweiterte Widgets schließen/Kontext Menüs schließen\n
\n
\n Alt + 3Fokus auf die Aufgaben\n
\n
\n Alt + 6Fokus auf die User Einstellungen\n
\n
\n Alt + QFokus auf den ersten Fall\n
\n
\n EnterAuswahl bestätigen \n
\n" + title: 'Barrierefreiheitskürzel. Alt + 1: Se focaliser sur l’onglet du Dashboard. Alt + 2: Se focaliser sur l’onglet des processus. Alt + 3: Se focaliser sur l’onglet des tâches. Alt + 4: Se focaliser sur l’onglet des cas. Alt + 5: Se focaliser sur la recherche. Alt + 6: Se focaliser sur + les paramètres utilisateur. Alt + A: Se focaliser sur le premier processus. Alt + W: Se focaliser sur la première tâche. Alt + Q: Se focaliser sur le premier cas. Tab: Navigation séquentielle entre les éléments. Esc: Fermer les widgets agrandis/Fermer les menus contextuels. Enter: Confirmer + la sélection' CaseWidgetConfiguration: AddFilter: Filter hinzufügen ClientStatisticWidget: diff --git a/AxonIvyPortal/portal/cms/cms_en.yaml b/AxonIvyPortal/portal/cms/cms_en.yaml index abe85f3c95f..d55bb0e0727 100644 --- a/AxonIvyPortal/portal/cms/cms_en.yaml +++ b/AxonIvyPortal/portal/cms/cms_en.yaml @@ -48,6 +48,8 @@ ch.ivy.addon.portalkit.ui.jsf: nextAbsence: Upcoming absence selectedDeputyFor: Selected user is substitute for selectedUser: Selected user + AccessibilityShortcuts: + processName: Accessibility shortcuts process AllTasks: caseDescription: Case description taskDescription: Task description @@ -1333,6 +1335,48 @@ Dialogs: LinkCopied: Link copied dashboard: component: + AccessibilityShortcuts: + content: |- +
+
+ Alt + 1Focus on to the Dashboard Tab +
+
+ Alt + 4Focus on to the Case Tab +
+
+ Alt + AFocus on to the first Process +
+
+ TabSequential tabbing through elements +
+
+ Alt + 2Focus on to the Process Tab +
+
+ Alt + 5Focus on to the Search +
+
+ Alt + WFocus on to the first Task +
+
+ EscClose expanded Widgets +
+
+ Alt + 3Focus on to the Tasks Tab +
+
+ Alt + 6Focus on to the User Settings +
+
+ Alt + QFocus on to the first Case +
+
+ EnterConfirm selection +
+
+ title: 'Accessibility Shortcuts. Alt + 1: Focus on to the Dashboard tab. Alt + 2: Focus on to the Process tab. Alt + 3: Focus on to the Tasks tab. Alt + 4: Focus on to the Case tab. Alt + 5: Focus on to the search. Alt + 6: Focus on to the User settings. Alt + A: Focus on to the first Process. + Alt + W: Focus on to the first task. Alt + Q: Focus on to the first case. Tab: Sequential tabbing through elements. Esc: Close expanded widgets. Enter: Confirm selection.' CaseWidgetConfiguration: AddFilter: Add filter ClientStatisticWidget: diff --git a/AxonIvyPortal/portal/cms/cms_es.yaml b/AxonIvyPortal/portal/cms/cms_es.yaml index 8e336e0e173..38e56cf1c46 100644 --- a/AxonIvyPortal/portal/cms/cms_es.yaml +++ b/AxonIvyPortal/portal/cms/cms_es.yaml @@ -48,6 +48,8 @@ ch.ivy.addon.portalkit.ui.jsf: nextAbsence: Siguiente ausencia selectedDeputyFor: El usuario seleccionado es el sustituto de selectedUser: Usuario seleccionado + AccessibilityShortcuts: + processName: Atajos de accesibilidad de widgets AllTasks: caseDescription: Descripción de caso taskDescription: Descripción de tarea @@ -1331,6 +1333,15 @@ Dialogs: LinkCopied: ¡Enlace copiado dashboard: component: + AccessibilityShortcuts: + content: "
\n
\n Alt + 1Enfocar en la pestaña del Panel de Control\n
\n
\n Alt + 4Enfocar en la\ + \ pestaña de Casos\n
\n
\n Alt + AEnfocar en el primer proceso\n
\n
\n TabTabbing secuencial a través de\ + \ elementos\n
\n
\n Alt + 2Enfocar en la pestaña de Procesos\n
\n
\n Alt + 5Enfocar en la búsqueda\n
\n\ + \
\n Alt + WEnfocar en la primera tarea\n
\n
\n EscCerrar widgets expandidos/Cerrar menús contextuales\n
\n\ + \
\n Alt + 3Enfocar en la pestaña de Tareas\n
\n
\n Alt + 6Enfocar en la pestaña del Panel de Control\n
\n\ + \
\n Alt + QEnfocar en el primer caso\n
\n
\n EnterConfirmar selección\n
\n \n
" + title: 'Atajos de accesibilidad. Alt + 1: Enfocar en la pestaña del Panel de Control. Alt + 2: Enfocar en la pestaña de Procesos. Alt + 3: Enfocar en la pestaña de Tareas. Alt + 4: Enfocar en la pestaña de Casos. Alt + 5: Enfocar en la búsqueda. Alt + 6: Enfocar en la pestaña del Panel de + Control. Alt + A: Enfocar en el primer proceso. Alt + W: Enfocar en la primera tarea. Alt + Q: Enfocar en el primer caso. Tab: Tabbing secuencial a través de elementos. Esc: Cerrar widgets expandidos/Cerrar menús contextuales. Enter: Confirmar selección' CaseWidgetConfiguration: AddFilter: Añadir filtro ClientStatisticWidget: diff --git a/AxonIvyPortal/portal/cms/cms_fr.yaml b/AxonIvyPortal/portal/cms/cms_fr.yaml index 1298149d76d..12593affa2c 100644 --- a/AxonIvyPortal/portal/cms/cms_fr.yaml +++ b/AxonIvyPortal/portal/cms/cms_fr.yaml @@ -48,6 +48,8 @@ ch.ivy.addon.portalkit.ui.jsf: nextAbsence: Absence à venir selectedDeputyFor: L'utilisateur sélectionné est un substitut de selectedUser: Utilisateur sélectionné + AccessibilityShortcuts: + processName: Raccourcis d'accessibilité Widgets AllTasks: caseDescription: Description du dossier taskDescription: Description de la tâche @@ -1328,6 +1330,48 @@ Dialogs: LinkCopied: Lien copié dashboard: component: + AccessibilityShortcuts: + content: |- +
+
+ Alt + 1Se focaliser sur l’onglet du Dashboard +
+
+ Alt + 4Se focaliser sur l’onglet des cas +
+
+ Alt + ASe focaliser sur le premier processus +
+
+ TabNavigation séquentielle entre les éléments +
+
+ Alt + 2Se focaliser sur l’onglet des processus +
+
+ Alt + 5Se focaliser sur la recherche +
+
+ Alt + WSe focaliser sur la première tâche +
+
+ EscFermer les widgets agrandis/Fermer les menus contextuels +
+
+ Alt + 3Se focaliser sur l’onglet des tâches +
+
+ Alt + 6Se focaliser sur les paramètres utilisateur +
+
+ Alt + QSe focaliser sur le premier cas +
+
+ EnterConfirmer la sélection +
+
+ title: 'Raccourcis d’accessibilité. Alt + 1: Fokus auf die Dashboards. Alt + 2: Fokus auf die Prozesse. Alt + 3: Fokus auf die Aufgaben. Alt + 4: Fokus auf die Fälle. Alt + 5: Fokus auf die Suche. Alt + 6: Fokus auf die User Einstellungen. Alt + A: Fokus auf den ersten Prozess. Alt + W: + Fokus auf die erste Aufgabe. Alt + Q: Fokus auf den ersten Fall. Tab: Sequentielles Durchlaufen von Elementen. Esc: Erweiterte Widgets schließen/Kontext Menüs schließen. Enter: Auswahl bestätigen' CaseWidgetConfiguration: AddFilter: Ajouter un filtre ClientStatisticWidget: diff --git a/AxonIvyPortal/portal/config/variables/Portal/DashboardTemplates.json b/AxonIvyPortal/portal/config/variables/Portal/DashboardTemplates.json index bfd0e1d4b14..378470f81cd 100644 --- a/AxonIvyPortal/portal/config/variables/Portal/DashboardTemplates.json +++ b/AxonIvyPortal/portal/config/variables/Portal/DashboardTemplates.json @@ -543,5 +543,284 @@ "Everybody" ] } + }, + { + "version": "11.4.0", + "id": "accessibility-dashboard-template", + "titles": [ + { + "locale": "en", + "value": "Accessibility dashboard" + }, + { + "locale": "fr", + "value": "Tableau de bord d'accessibilité " + }, + { + "locale": "de", + "value": "Dashboard für Barrierefreiheit" + }, + { + "locale": "es", + "value": "Panel de accesibilidad" + } + ], + "descriptions": [ + { + "locale": "en", + "value": "Optimized reduced Dashboard for Accessibility Use" + }, + { + "locale": "fr", + "value": "Tableau de bord réduit optimisé pour une utilisation en accessibilité" + }, + { + "locale": "de", + "value": "Optimiertes, reduziertes Dashboard für die barrierefreie Nutzung" + }, + { + "locale": "es", + "value": "Panel de control reducido optimizado para uso de accesibilidad" + } + ], + "icon": "si-layout-dashboard", + "dashboard": { + "id": "", + "templateId": "accessibility-dashboard-template", + "title": "Accessibility dashboard", + "widgets": [ + { + "type": "task", + "id": "task_d898829cd7a745a0812f44923e3596d1", + "names": [ + { + "locale": "en", + "value": "Your Tasks" + }, + { + "locale": "de", + "value": "Ihre Aufgaben" + }, + { + "locale": "fr", + "value": "Vos tâches" + }, + { + "locale": "es", + "value": "Sus tareas" + } + ], + "layout": { + "w": 9, + "h": 4, + "x": 3, + "y": 3 + }, + "rowsPerPage": 5, + "enableQuickSearch": false, + "showWidgetInfo": true, + "showFullscreenMode": false, + "columns": [ + { + "field": "start" + }, + { + "field": "actions" + }, + { + "field": "name", + "quickSearch": false + }, + { + "field": "priority" + }, + { + "field": "activator", + "quickSearch": false + }, + { + "field": "state" + }, + { + "field": "startTimestamp" + }, + { + "field": "expiryTimestamp" + }, + { + "field": "start", + "visible": false + }, + { + "field": "id", + "visible": false, + "quickSearch": false + }, + { + "field": "description", + "visible": false, + "quickSearch": false + }, + { + "field": "category", + "visible": false, + "quickSearch": false + } + ], + "sortField": "id", + "sortDescending": true, + "canWorkOn": true + }, + { + "type": "compact-process", + "id": "process_de6d9dc244334aeeafeef353d5f70488", + "names": [ + { + "locale": "en", + "value": "Your Processes" + }, + { + "locale": "de", + "value": "Ihre Prozesse" + }, + { + "locale": "fr", + "value": "Vos processus" + }, + { + "locale": "es", + "value": "Sus procesos" + } + ], + "layout": { + "w": 3, + "h": 9, + "x": 0, + "y": 3 + }, + "showFullscreenMode": false, + "showWidgetInfo": true, + "sorting": "BY_ALPHABETICALLY", + "enableQuickSearch": false + }, + { + "type": "custom", + "id": "custom_e736fea7d4044b21b17a21a5b694e6a9", + "names": [ + { + "locale": "en", + "value": "Accessibility Shortcuts" + }, + { + "locale": "fr", + "value": "Raccourcis d’accessibilité" + }, + { + "locale": "de", + "value": "Barrierefreiheitskürzel" + }, + { + "locale": "es", + "value": "Atajos de accesibilidad" + } + ], + "layout": { + "w": 12, + "h": 3, + "x": 0, + "y": 0 + }, + "data": { + "processPath": "designer/portal/Functional Processes/AccessibilityShortcutCustomWidget/accessibilityShortcut.ivp" + }, + "showFullscreenMode": false + }, + { + "type": "case", + "id": "case_46a4814004424383872bf5c19098d657", + "names": [ + { + "locale": "en", + "value": "Your Cases" + }, + { + "locale": "de", + "value": "Ihre Vorgänge" + }, + { + "locale": "fr", + "value": "Vos affaires" + }, + { + "locale": "es", + "value": "Sus casos" + } + ], + "layout": { + "w": 9, + "h": 5, + "x": 3, + "y": 7 + }, + "rowsPerPage": 5, + "enableQuickSearch": false, + "showWidgetInfo": true, + "showFullscreenMode": false, + "columns": [ + { + "field": "id", + "visible": false, + "quickSearch": false + }, + { + "field": "name", + "quickSearch": false + }, + { + "field": "description", + "visible": false, + "quickSearch": false + }, + { + "field": "state" + }, + { + "field": "creator", + "quickSearch": false + }, + { + "field": "startTimestamp" + }, + { + "field": "endTimestamp" + }, + { + "field": "owner" + }, + { + "field": "category", + "visible": false, + "quickSearch": false + }, + { + "field": "application", + "styleClass": "dashboard-tasks__priority u-text-align-center", + "style": "width: 80px", + "visible": false, + "quickSearch": false + }, + { + "field": "actions" + } + ], + "sortField": "id", + "sortDescending": true + } + ], + "accessibility": true, + "permissions": [ + "Everybody" + ] + } } ] \ No newline at end of file diff --git a/AxonIvyPortal/portal/processes/Functional Processes/AccessibilityShortcutCustomWidget.p.json b/AxonIvyPortal/portal/processes/Functional Processes/AccessibilityShortcutCustomWidget.p.json new file mode 100644 index 00000000000..aa30d8aa0e7 --- /dev/null +++ b/AxonIvyPortal/portal/processes/Functional Processes/AccessibilityShortcutCustomWidget.p.json @@ -0,0 +1,48 @@ +{ + "$schema" : "https://json-schema.axonivy.com/process/12.0.0/process.json", + "id" : "19265F23781A41B1", + "config" : { + "data" : "ch.ivy.add.portalkit.Data" + }, + "elements" : [ { + "id" : "f0", + "type" : "RequestStart", + "name" : "accessibilityShortcut.ivp", + "config" : { + "signature" : "accessibilityShortcut", + "request" : { + "name" : "<%=ivy.cms.co(\"/ch.ivy.addon.portalkit.ui.jsf/AccessibilityShortcuts/processName\")%>", + "customFields" : [ + { "name" : "isDashboardProcess", "value" : "true" } + ], + "isVisibleOnStartList" : false + } + }, + "visual" : { + "at" : { "x" : 96, "y" : 64 } + }, + "connect" : [ + { "id" : "f2", "to" : "f3" } + ] + }, { + "id" : "f1", + "type" : "TaskEnd", + "visual" : { + "at" : { "x" : 384, "y" : 64 }, + "labelOffset" : { "x" : 13, "y" : 33 } + } + }, { + "id" : "f3", + "type" : "DialogCall", + "name" : "AccessibilityShortcut", + "config" : { + "dialog" : "ch.ivy.addon.portalkit.component.AccessibilityShortcut:start()" + }, + "visual" : { + "at" : { "x" : 256, "y" : 64 } + }, + "connect" : [ + { "id" : "f4", "to" : "f1", "color" : "default" } + ] + } ] +} \ No newline at end of file diff --git a/AxonIvyPortal/portal/src/ch/ivy/addon/portal/generic/bean/DashboardBean.java b/AxonIvyPortal/portal/src/ch/ivy/addon/portal/generic/bean/DashboardBean.java index b1f54a68f14..b46abaa180d 100644 --- a/AxonIvyPortal/portal/src/ch/ivy/addon/portal/generic/bean/DashboardBean.java +++ b/AxonIvyPortal/portal/src/ch/ivy/addon/portal/generic/bean/DashboardBean.java @@ -503,4 +503,11 @@ public String getSelectedDashboardName() { public boolean isHideCaseCreator() { return GlobalSettingService.getInstance().isHideCaseCreator(); } + + public String getScreenReaderNotificationContent() { + if (this.selectedDashboard.isAccessibility()) { + return Ivy.cms().co("/Dialogs/com/axonivy/portal/dashboard/component/AccessibilityShortcuts/title"); + } + return StringUtils.EMPTY; + } } diff --git a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/dto/dashboard/Dashboard.java b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/dto/dashboard/Dashboard.java index 38961a8b822..518cdb8b486 100644 --- a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/dto/dashboard/Dashboard.java +++ b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/dto/dashboard/Dashboard.java @@ -33,6 +33,8 @@ public class Dashboard extends AbstractConfiguration implements Serializable { private List permissionDTOs; @JsonIgnore private String displayedPermission; + @JsonIgnore + private boolean isAccessibility; public Dashboard() {} @@ -50,6 +52,14 @@ public Dashboard(Dashboard dashboard) { permissionDTOs = dashboard.permissionDTOs; displayedPermission = dashboard.displayedPermission; } + + public boolean isAccessibility() { + return isAccessibility; + } + + public void setAccessibility(boolean isAccessibility) { + this.isAccessibility = isAccessibility; + } public String getTitle() { return LanguageUtils.getLocalizedName(titles, title); diff --git a/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portalkit/component/AccessibilityShortcut/AccessibilityShortcut.xhtml b/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portalkit/component/AccessibilityShortcut/AccessibilityShortcut.xhtml new file mode 100644 index 00000000000..bff9e22821c --- /dev/null +++ b/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portalkit/component/AccessibilityShortcut/AccessibilityShortcut.xhtml @@ -0,0 +1,20 @@ + + + + #{ivy.cms.co('/Dialogs/com/axonivy/portal/dashboard/component/AccessibilityShortcuts/title')} + + +
+ +
+
+
+
+ + diff --git a/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portalkit/component/AccessibilityShortcut/AccessibilityShortcutData.d.json b/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portalkit/component/AccessibilityShortcut/AccessibilityShortcutData.d.json new file mode 100644 index 00000000000..b90a2b686e9 --- /dev/null +++ b/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portalkit/component/AccessibilityShortcut/AccessibilityShortcutData.d.json @@ -0,0 +1,6 @@ +{ + "$schema" : "https://json-schema.axonivy.com/data-class/11.4.0/data-class.json", + "simpleName" : "AccessibilityShortcutData", + "namespace" : "ch.ivy.addon.portalkit.component.AccessibilityShortcut", + "isBusinessCaseData" : false +} \ No newline at end of file diff --git a/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portalkit/component/AccessibilityShortcut/AccessibilityShortcutProcess.p.json b/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portalkit/component/AccessibilityShortcut/AccessibilityShortcutProcess.p.json new file mode 100644 index 00000000000..18f21f4b547 --- /dev/null +++ b/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portalkit/component/AccessibilityShortcut/AccessibilityShortcutProcess.p.json @@ -0,0 +1,50 @@ +{ + "$schema" : "https://json-schema.axonivy.com/process/11.3.0/process.json", + "id" : "19265E3ADA5829FF", + "kind" : "HTML_DIALOG", + "config" : { + "data" : "ch.ivy.addon.portalkit.component.AccessibilityShortcut.AccessibilityShortcutData" + }, + "elements" : [ { + "id" : "f0", + "type" : "HtmlDialogStart", + "name" : "start()", + "config" : { + "signature" : "start", + "guid" : "19265E3ADAA2B902" + }, + "visual" : { + "at" : { "x" : 96, "y" : 64 } + }, + "connect" : [ + { "id" : "f2", "to" : "f1" } + ] + }, { + "id" : "f1", + "type" : "HtmlDialogEnd", + "visual" : { + "at" : { "x" : 224, "y" : 64 }, + "labelOffset" : { "x" : 10, "y" : 30 } + } + }, { + "id" : "f3", + "type" : "HtmlDialogEventStart", + "name" : "close", + "config" : { + "guid" : "19265E3ADB2C6DEB" + }, + "visual" : { + "at" : { "x" : 96, "y" : 160 } + }, + "connect" : [ + { "id" : "f5", "to" : "f4" } + ] + }, { + "id" : "f4", + "type" : "HtmlDialogExit", + "visual" : { + "at" : { "x" : 224, "y" : 160 }, + "labelOffset" : { "x" : 10, "y" : 30 } + } + } ] +} \ No newline at end of file diff --git a/AxonIvyPortal/portal/webContent/layouts/frame-10.xhtml b/AxonIvyPortal/portal/webContent/layouts/frame-10.xhtml new file mode 100644 index 00000000000..4f33eb13ed2 --- /dev/null +++ b/AxonIvyPortal/portal/webContent/layouts/frame-10.xhtml @@ -0,0 +1,60 @@ + + + + + + + + + + <ui:insert name="title">Ivy Html Dialog</ui:insert> + + + + + + + + + +
+ + default content + +
+ + + + + + + +
+ diff --git a/AxonIvyPortal/portal/webContent/layouts/includes/progress-loader.xhtml b/AxonIvyPortal/portal/webContent/layouts/includes/progress-loader.xhtml new file mode 100644 index 00000000000..63e5c30d98f --- /dev/null +++ b/AxonIvyPortal/portal/webContent/layouts/includes/progress-loader.xhtml @@ -0,0 +1,15 @@ + + + + +
+
+
Loading...
+
+
+ + + +
+
diff --git a/AxonIvyPortal/portal/webContent/layouts/includes/topbar.xhtml b/AxonIvyPortal/portal/webContent/layouts/includes/topbar.xhtml index 55c852021f2..ecabdd214a9 100644 --- a/AxonIvyPortal/portal/webContent/layouts/includes/topbar.xhtml +++ b/AxonIvyPortal/portal/webContent/layouts/includes/topbar.xhtml @@ -18,6 +18,10 @@ + +
diff --git a/AxonIvyPortal/portal/webContent/resources/css/accessibility.css b/AxonIvyPortal/portal/webContent/resources/css/accessibility.css new file mode 100644 index 00000000000..54a9bf573a8 --- /dev/null +++ b/AxonIvyPortal/portal/webContent/resources/css/accessibility.css @@ -0,0 +1,36 @@ +/* Accessibility shortcuts */ +.shortcuts-container { + width: 100%; + margin: 0 auto; +} +.shortcut-key { + padding: 5px 15px; + font-weight: bold; + border-radius: 5px; + display: inline-block; + margin-right: 10px; + margin-left: 10px; +} +.shortcut { + background-color: var(--accessibility-bg-color); + padding: 10px 15px; + align-items: center; +} + +.shortcut-content { + font-size: 16px; + white-space: nowrap; + display: inline; +} + +.shortcut-key { + background-color : var(--surface-b); +} + +body.dark .shortcut-key { + background-color : var(--accessibility-shortcut-bg-color-dark); +} + +:root { + --accessibility-shortcut-bg-color-dark: var(--surface-d); +} diff --git a/AxonIvyPortal/portal/webContent/resources/css/portal-variables-dark.css b/AxonIvyPortal/portal/webContent/resources/css/portal-variables-dark.css index 05ea72fca87..60653041cba 100644 --- a/AxonIvyPortal/portal/webContent/resources/css/portal-variables-dark.css +++ b/AxonIvyPortal/portal/webContent/resources/css/portal-variables-dark.css @@ -337,4 +337,8 @@ /* Dashboard widgets empty message*/ --dashboard-widget-empty-message: var(--ivy-primary-color-grey-pale); + + --accessibility-shortcut-bg-color: var(--ivy-primary-color-grey-dark); + --accessibility-bg-color: var(--task-state-system-color); + --accessibility-shortcut-text-color: var(--ivy-primary-color-black); } \ No newline at end of file diff --git a/AxonIvyPortal/portal/webContent/resources/css/portal-variables-light.css b/AxonIvyPortal/portal/webContent/resources/css/portal-variables-light.css index 244489046b4..621f0a15840 100644 --- a/AxonIvyPortal/portal/webContent/resources/css/portal-variables-light.css +++ b/AxonIvyPortal/portal/webContent/resources/css/portal-variables-light.css @@ -347,4 +347,7 @@ /* Dashboard widgets empty message*/ --dashboard-widget-empty-message: var(--ivy-primary-color-grey-dark); + --accessibility-shortcut-bg-color: var(--ivy-primary-color-grey-pale); + --accessibility-bg-color: var(--ivy-primary-color-white); + --accessibility-shortcut-text-color: var(--ivy-primary-color-black); } \ No newline at end of file diff --git a/AxonIvyPortal/portal/webContent/resources/css/portal.css b/AxonIvyPortal/portal/webContent/resources/css/portal.css index d10753741d1..16682952aaa 100644 --- a/AxonIvyPortal/portal/webContent/resources/css/portal.css +++ b/AxonIvyPortal/portal/webContent/resources/css/portal.css @@ -1769,3 +1769,14 @@ body.light .focused { body.dark .focused { outline: 2px solid white; } + +.screenreader-only { + position: absolute; + width: 1px; + height: 1px; + padding: 0; + margin: -1px; + overflow: hidden; + clip: rect(0, 0, 0, 0); + border: 0; +} From 80288a09637d21b8752c534ef2f04967c84be5e1 Mon Sep 17 00:00:00 2001 From: Le Ngoc Danh <127722015+lndanh-axonivy@users.noreply.github.com> Date: Tue, 15 Oct 2024 11:58:23 +0700 Subject: [PATCH 2/3] Feature/ivyportal 17533 create accessibility mode dashboard template le (#1131) * IVYPORTAL-17533 create accessibility mode dashboard template for LE: implement * IVYPORTAL-17533 create accessibility mode dashboard template for LE: implement * IVYPORTAL-17533 create accessibility mode dashboard template for LE: implement * IVYPORTAL-17533 create accessibility mode dashboard template for LE: implement * IVYPORTAL-17533 create accessibility mode dashboard template for LE: update dashboard json file * IVYPORTAL-17533 create accessibility mode dashboard template for LE: fix failed test * IVYPORTAL-17533 create accessibility mode dashboard template for LE: fix failed test * IVYPORTAL-17533 create accessibility mode dashboard template for LE: fix failed test --------- Co-authored-by: lndanh-axonivy --- .../portal/selenium/page/NewDashboardDetailsEditPage.java | 2 +- .../portal/config/variables/Portal/DashboardTemplates.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/NewDashboardDetailsEditPage.java b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/NewDashboardDetailsEditPage.java index 4dc31e055c1..d41db093dc0 100644 --- a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/NewDashboardDetailsEditPage.java +++ b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/NewDashboardDetailsEditPage.java @@ -238,7 +238,7 @@ public void scrollToStatistic() { } public SelenideElement getAccessibilityWidget() { - return $("[id^='id-custom-widget-iframe']"); + return $("[id^='id-custom-widget-iframe']").shouldBe(Condition.appear, DEFAULT_TIMEOUT); } } diff --git a/AxonIvyPortal/portal/config/variables/Portal/DashboardTemplates.json b/AxonIvyPortal/portal/config/variables/Portal/DashboardTemplates.json index 378470f81cd..32b01d244b0 100644 --- a/AxonIvyPortal/portal/config/variables/Portal/DashboardTemplates.json +++ b/AxonIvyPortal/portal/config/variables/Portal/DashboardTemplates.json @@ -731,7 +731,7 @@ "y": 0 }, "data": { - "processPath": "designer/portal/Functional Processes/AccessibilityShortcutCustomWidget/accessibilityShortcut.ivp" + "processPath": "Functional Processes/AccessibilityShortcutCustomWidget/accessibilityShortcut.ivp" }, "showFullscreenMode": false }, From 18aaa4360d2f7df33b70942f2d90602d2a12d7a0 Mon Sep 17 00:00:00 2001 From: Phan Van Thai Date: Tue, 15 Oct 2024 17:00:31 +0700 Subject: [PATCH 3/3] IVYPORTAL-17815: Add custom field column style --- .../ch/ivy/addon/portalkit/dto/dashboard/AbstractColumn.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/dto/dashboard/AbstractColumn.java b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/dto/dashboard/AbstractColumn.java index 574afbc3686..e55d4f0aa4d 100644 --- a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/dto/dashboard/AbstractColumn.java +++ b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/dto/dashboard/AbstractColumn.java @@ -100,6 +100,9 @@ public void initDefaultValue() { if (isNull(this.userFilterList)) { this.userFilterList = new ArrayList<>(); } + if (isNull(this.style)) { + this.style = getDefaultStyle(); + } } @JsonIgnore