From 4c8ac5b9d8371c167a320e67f54d5c8c144878f1 Mon Sep 17 00:00:00 2001 From: Luong Minh Luat <157108501+lmluat-axonivy@users.noreply.github.com> Date: Wed, 23 Oct 2024 09:28:10 +0700 Subject: [PATCH 1/8] Feature/ivyportal 17770 UI facelift for lts 12.0.0 part 3 (#1144) Update new UI on: Dashboard: Filters widget, Manage saved filters, Widget information, Profile menu dropdown, Actions on Task/Case widget dropdown all things on Dashboard Configuration Fix GUI test --------- Co-authored-by: tphvu-axonivy --- .../page/CaseWidgetNewDashBoardPage.java | 5 +- .../page/DashboardConfigurationPage.java | 56 ++++++---- .../page/DashboardModificationPage.java | 27 +++-- .../page/NewDashboardDetailsEditPage.java | 13 ++- .../selenium/page/NewDashboardPage.java | 31 +++--- .../ProcessEditWidgetNewDashBoardPage.java | 7 +- .../selenium/page/ProcessWidgetPage.java | 7 +- .../selenium/page/ReorderDashboardPage.java | 10 +- .../page/TaskWidgetNewDashBoardPage.java | 10 +- .../dashboard/DashboardProcessWidgetTest.java | 4 +- .../DashboardSupportMultiLanguageTest.java | 4 +- .../DashboardTaskWidgetFilterTest.java | 1 + AxonIvyPortal/portal/cms/cms.yaml | 3 +- AxonIvyPortal/portal/cms/cms_de.yaml | 9 +- AxonIvyPortal/portal/cms/cms_en.yaml | 9 +- AxonIvyPortal/portal/cms/cms_es.yaml | 9 +- AxonIvyPortal/portal/cms/cms_fr.yaml | 9 +- .../portalkit/bean/AbstractProcessBean.java | 2 +- .../dashboard/process/DashboardProcess.java | 4 + .../PortalDashboardConfiguration.xhtml | 9 +- .../DashboardDetails/DashboardDetails.xhtml | 38 +++---- .../DashboardModification.xhtml | 102 +++++++++--------- .../ProcessWidget/ImageModeProcess.xhtml | 21 ++-- .../component/ActionStep/ActionStep.xhtml | 14 ++- .../ProcessWidget/ProcessWidgetDialogs.xhtml | 2 +- .../component/SideStep/SideStep.xhtml | 28 ++--- .../ProcessGridItem/ProcessGridItem.xhtml | 8 +- .../ProcessItemAction/ProcessItemAction.xhtml | 5 +- .../ShareLinkDialog/ShareLinkDialog.xhtml | 13 +-- .../DashboardImportDetails.xhtml | 23 ++-- .../decorator/portal-dialog-with-icon.xhtml | 2 +- .../webContent/layouts/includes/topbar.xhtml | 14 +-- .../restricted/DashboardTemplate.xhtml | 14 +-- .../restricted/decorator/TableWidget.xhtml | 76 +++++++------ .../restricted/includes/WidgetFilter.xhtml | 5 +- .../webContent/resources/css/dashboard.css | 53 ++++++--- .../webContent/resources/css/module.css | 94 ++++++++++++---- .../resources/css/portal-variables-dark.css | 11 ++ .../resources/css/portal-variables-light.css | 11 ++ .../webContent/resources/css/portal.css | 19 ++-- .../webContent/resources/js/dashboard.js | 5 +- .../userexamples/bean/ExampleHomeBean.java | 10 +- .../ExampleHomePage/ExampleHomePage.xhtml | 2 +- 43 files changed, 483 insertions(+), 316 deletions(-) diff --git a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/CaseWidgetNewDashBoardPage.java b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/CaseWidgetNewDashBoardPage.java index 09beccb892a..02d8b6d8ab4 100644 --- a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/CaseWidgetNewDashBoardPage.java +++ b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/CaseWidgetNewDashBoardPage.java @@ -262,11 +262,12 @@ public void removeAllFilterItems() { } public void openManageFiltersDialog() { - $("a[id*='case-case_1:filter-form-1']").shouldBe(appear, DEFAULT_TIMEOUT).click(); + $("div#manage-filter").shouldBe(appear, DEFAULT_TIMEOUT).$("button").shouldBe(getClickableCondition()).click(); } public void closeManageFilterDialog() { - $("a[id*='delete-saved-filter-form']").shouldBe(appear, DEFAULT_TIMEOUT).click(); + $("div[id$='manage-filter-dialog']").shouldBe(appear, DEFAULT_TIMEOUT).$("a.ui-dialog-titlebar-close") + .shouldBe(appear, DEFAULT_TIMEOUT).click(); } public ElementsCollection getSavedFilterItemsByFilterNameOnWidgetManagement() { diff --git a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/DashboardConfigurationPage.java b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/DashboardConfigurationPage.java index 57f40c103f9..aa0604186ed 100644 --- a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/DashboardConfigurationPage.java +++ b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/DashboardConfigurationPage.java @@ -13,6 +13,7 @@ import com.axonivy.portal.selenium.common.FileHelper; import com.codeborne.selenide.Condition; import com.codeborne.selenide.DragAndDropOptions; +import com.codeborne.selenide.ElementsCollection; import com.codeborne.selenide.SelenideElement; public class DashboardConfigurationPage extends TemplatePage { @@ -40,12 +41,11 @@ public SelenideElement getPublicDashboardConfigurationTypeSelection() { waitForDashboardConfigurationTypeSelectionAppear(); return $("a[id$='public-dashboard-type']"); } - - public DashboardModificationPage openEditPublicDashboardsPage() { - selectPublicDashboardType(); - $("button[id$='dashboard-modification-component:dashboard-table:0:edit']").shouldBe(appear, DEFAULT_TIMEOUT) - .shouldBe(getClickableCondition()); - return new DashboardModificationPage(); + + public SelenideElement getDashboardConfigurationActionMenu() { + $("button[id*='dashboard-modification-component:dashboard-table:0:dashboard-configuration-action-button']").shouldBe(appear, DEFAULT_TIMEOUT) + .shouldBe(getClickableCondition()).click(); + return $$("div[id$='dashboard-configuration-action-menu']").filter(Condition.appear).first(); } public void selectPublicDashboardType() { @@ -62,10 +62,29 @@ public void selectPrivateDashboardType() { public DashboardModificationPage openEditPrivateDashboardsPage() { selectPrivateDashboardType(); - $("button[id$='dashboard-modification-component:dashboard-table:0:edit']").shouldBe(appear, DEFAULT_TIMEOUT) - .shouldBe(getClickableCondition()).click(); return new DashboardModificationPage(); } + + public DashboardModificationPage openEditPrivateDashboardPage(String buttonName) { + selectPrivateDashboardType(); + clickButtonOnDashboardConfigurationActionMenu(buttonName); + return new DashboardModificationPage(); + } + + public DashboardModificationPage openEditPublicDashboardsPage(String buttonName) { + selectPublicDashboardType(); + clickButtonOnDashboardConfigurationActionMenu(buttonName); + return new DashboardModificationPage(); + } + + public DashboardModificationPage openEditPublicDashboardsPage() { + selectPublicDashboardType(); + return new DashboardModificationPage(); + } + + public void clickButtonOnDashboardConfigurationActionMenu(String buttonName) { + getDashboardConfigurationActionMenu().$$("span").filter(Condition.text(buttonName)).first().shouldBe(getClickableCondition(), DEFAULT_TIMEOUT).click(); + } public void openCreatePublicDashboardMenu() { selectPublicDashboardType(); @@ -236,12 +255,12 @@ private void selectDashboardIcon(String icon) { } public NewDashboardPage backToHomePage() { - $("[id$='back-to-home-button']").shouldBe(appear, DEFAULT_TIMEOUT).shouldBe(getClickableCondition()).click(); + $("span[class*='si si-house-chimney-2']").shouldBe(appear, DEFAULT_TIMEOUT).shouldBe(getClickableCondition()).click(); return new NewDashboardPage(); } public NewDashboardPage backToHomePageBottom() { - $("[id$='back-to-home-button']").shouldBe(appear, DEFAULT_TIMEOUT).shouldBe(getClickableCondition()).click(); + $("span[class*='si si-house-chimney-2']").shouldBe(appear, DEFAULT_TIMEOUT).shouldBe(getClickableCondition()).click(); return new NewDashboardPage(); } @@ -317,8 +336,8 @@ private SelenideElement findPrivateDashboardRowByName(String dashboardName) { } public void reorderPrivateDashboard(String fromDashboardName, String toDashboardName) { - var toRow = findPrivateDashboardRowByName(toDashboardName).$("i.si-move-expand-vertical"); - var fromRow = findPrivateDashboardRowByName(fromDashboardName).$("i.si-move-expand-vertical"); + var toRow = findPrivateDashboardRowByName(toDashboardName).$("i.si-navigation-menu"); + var fromRow = findPrivateDashboardRowByName(fromDashboardName).$("i.si-navigation-menu"); dragAndDropTo(toRow, fromRow); } @@ -328,8 +347,8 @@ private void dragAndDropTo(SelenideElement toRow, SelenideElement fromRow) { } public void reorderPublicDashboard(String fromDashboardName, String toDashboardName) { - var toRow = findPublicDashboardRowByName(toDashboardName).$("i.si-move-expand-vertical"); - var fromRow = findPublicDashboardRowByName(fromDashboardName).$("i.si-move-expand-vertical"); + var toRow = findPublicDashboardRowByName(toDashboardName).$("i.si-navigation-menu"); + var fromRow = findPublicDashboardRowByName(fromDashboardName).$("i.si-navigation-menu"); dragAndDropTo(toRow, fromRow); } @@ -367,7 +386,8 @@ public void cancelMultiLanguageDialog() { } public void cancelCreateDashboard() { - $("a[id$='dashboard-creation-component:dashboard-detail-close-button']").shouldBe(getClickableCondition()).click(); + $("div[id$='dashboard-creation-details-dialog']").shouldBe(appear, DEFAULT_TIMEOUT). + $("div[class*='ui-corner-top']").shouldBe(appear, DEFAULT_TIMEOUT).$$("a").filter(Condition.attribute("aria-label", "Close")).first().click(); closeAddDashboardDialog(); } @@ -398,13 +418,13 @@ public void openImportPrivateDashboards() { } public SelenideElement getShareDashboardDialog() { - $("button[id$=':share-dashboard']").click(); - $("div[id$=':share-dashboard-dialog']").shouldBe(appear, DEFAULT_TIMEOUT); + clickButtonOnDashboardConfigurationActionMenu("Share"); return $("div[id$=':share-dashboard-dialog']"); } public void cancelImportDashboard() { - $("a[id$=':dashboard-import-close-button']").shouldBe(getClickableCondition()).click(); + $("div[id$='dashboard-import-dialog']").shouldBe(appear, DEFAULT_TIMEOUT). + $("div[class*='ui-corner-top']").shouldBe(appear, DEFAULT_TIMEOUT).$$("a").filter(Condition.attribute("aria-label", "Close")).first().click(); closeAddDashboardDialog(); } diff --git a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/DashboardModificationPage.java b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/DashboardModificationPage.java index caccef3f032..1add57078c6 100644 --- a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/DashboardModificationPage.java +++ b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/DashboardModificationPage.java @@ -8,6 +8,7 @@ import com.codeborne.selenide.CollectionCondition; import com.codeborne.selenide.Condition; import com.codeborne.selenide.ElementsCollection; +import com.codeborne.selenide.ElementsCollection.SelenideElementIterable; import com.codeborne.selenide.SelenideElement; public class DashboardModificationPage extends TemplatePage { @@ -39,23 +40,32 @@ private SelenideElement getEditDashboardDialog() { public NewDashboardDetailsEditPage navigateToEditDashboardDetailsByName(String dashboardName) { SelenideElement dashboardRow = getDashboardRowByName(dashboardName); if (dashboardRow != null) { - dashboardRow.$("button[id$='dashboard-modification-component:dashboard-table:0:configure-dashboard']") - .shouldBe(Condition.appear, DEFAULT_TIMEOUT).click(); + clickButtonOnDashboardConfigurationActionMenu("Configuration", dashboardRow); NewDashboardDetailsEditPage newDashboardDetailsEditPage = new NewDashboardDetailsEditPage(); return newDashboardDetailsEditPage; } return null; } + + private SelenideElement getDashboardConfigurationActionMenu(SelenideElement dashboardRow) { + dashboardRow.$("div#dashboard-configuration-action-group").shouldBe(Condition.appear, DEFAULT_TIMEOUT) + .$("button[id$='dashboard-configuration-action-button']").shouldBe(getClickableCondition(), DEFAULT_TIMEOUT).click(); + return $$("div[id$='dashboard-configuration-action-menu']").filter(Condition.appear).first(); + } + + private void clickButtonOnDashboardConfigurationActionMenu(String buttonName, SelenideElement dashboardRow) { + getDashboardConfigurationActionMenu(dashboardRow).$$("span").filter(Condition.text(buttonName)).first().shouldBe(getClickableCondition(), DEFAULT_TIMEOUT).click(); + } public void clickEditDashboardByName(String dashboardName) { SelenideElement dashboardRow = getDashboardRowByName(dashboardName); - dashboardRow.$("[id$=':edit']").click(); + clickButtonOnDashboardConfigurationActionMenu("Edit", dashboardRow); getEditDashboardDialog().shouldBe(Condition.appear, DEFAULT_TIMEOUT); } public void clickDeleteDashboardByName(String dashboardName) { SelenideElement dashboardRow = getDashboardRowByName(dashboardName); - dashboardRow.$("[id$=':delete-dashboard']").click(); + clickButtonOnDashboardConfigurationActionMenu("Delete", dashboardRow); SelenideElement deleteConfirmDialog = $("[id$=':remove-dashboard-dialog']").shouldBe(Condition.appear, DEFAULT_TIMEOUT); deleteConfirmDialog.$("button[id$=':remove-dashboard-button']").shouldBe(Condition.appear, DEFAULT_TIMEOUT) @@ -124,15 +134,18 @@ public SelenideElement getDashboardCellByNameAndPosition(String dashboardName, i public SelenideElement getDashboardExportButtonOfDashboard(String dashboardName) { SelenideElement dashboard = getDashboardRowByName(dashboardName); dashboard.shouldBe(Condition.appear); - return dashboard.$("td:last-child button[id $=':export-dashboard']"); + return getDashboardConfigurationActionMenu(dashboard) + .$$("ul > li > a").filter(Condition.attribute("title", "Export dashboard")).first(); } public SelenideElement getDashboardShareLinkButton() { - return $("button[id$='share-dashboard']"); + SelenideElement dashboardRow = getDashboardRowByName("Dashboard"); + return getDashboardConfigurationActionMenu(dashboardRow).$$("span").filter(Condition.text("Share")).first(); } public void getDashboardShareLinkDialog() { - getDashboardShareLinkButton().shouldBe(Condition.appear, DEFAULT_TIMEOUT).shouldBe(getClickableCondition()).click(); + SelenideElement dashboard = getDashboardRowByName("Dashboard"); + clickButtonOnDashboardConfigurationActionMenu("Share", dashboard); $("div[id$=':share-dashboard-dialog']").shouldBe(Condition.appear, DEFAULT_TIMEOUT); } } 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 d41db093dc0..6da0e31fa8d 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 @@ -102,13 +102,20 @@ public void deleteCompactModeProcess() { } public void deleteImageModeProcess() { - $("button[id$=':process-action-button']").shouldBe(Condition.appear, DEFAULT_TIMEOUT).click(); - $("[id$=':process-action-menu']").shouldBe(Condition.appear, DEFAULT_TIMEOUT).$("span.si-bin-1") + getProcessActionMenu().shouldBe(Condition.appear, DEFAULT_TIMEOUT).$("span.si-bin-1") .shouldBe(Condition.appear, DEFAULT_TIMEOUT).click(); getRemoveWidgetDialog().shouldBe(Condition.appear, DEFAULT_TIMEOUT).click(); getRemoveWidgetButton().click(); getRemoveWidgetDialog().shouldBe(Condition.disappear, DEFAULT_TIMEOUT); } + + private SelenideElement getProcessActionMenu() { + if (!$("[id$=':process-action-menu']").isDisplayed()) { + $("button[id$=':process-action-button']").shouldBe(Condition.appear, DEFAULT_TIMEOUT) + .click(); + } + return $("div[id$='process-action-menu']").shouldBe(Condition.appear, DEFAULT_TIMEOUT); + } public void deleteFullModeProcess() { $("button[id$=':process-action-button']").shouldBe(Condition.appear).click(); @@ -140,7 +147,7 @@ private void openDeleteCombinedModeProcessDialog() { } public ProcessEditWidgetNewDashBoardPage editFullModeProcess() { - $("button[id$=':process-action-button']").shouldBe(Condition.appear).click(); + getProcessActionMenu(); $("[id$=':process-item:grid-process-action-component:edit-process']").shouldBe(Condition.appear, DEFAULT_TIMEOUT) .$("span.si-graphic-tablet-drawing-pen").shouldBe(Condition.appear, DEFAULT_TIMEOUT).click(); $("div[id='new-widget-configuration-dialog']").shouldBe(Condition.appear, DEFAULT_TIMEOUT); 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 5bb3215e45b..805881e49db 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 @@ -183,8 +183,10 @@ public SelenideElement getProcessImage() { } public ProcessEditWidgetNewDashBoardPage editImageModeProcess() { - $("button[id$='image-process-action-component:process-action-button']").shouldBe(Condition.appear, DEFAULT_TIMEOUT) - .click(); + if (!$("[id$=':image-process-action-component:process-action-menu']").isDisplayed()) { + $("button[id$='image-process-action-component:process-action-button']").shouldBe(Condition.appear, DEFAULT_TIMEOUT) + .click(); + } $("[id$=':image-process-action-component:process-action-menu']").shouldBe(Condition.appear, DEFAULT_TIMEOUT) .$("span.si-graphic-tablet-drawing-pen").shouldBe(Condition.appear, DEFAULT_TIMEOUT).click(); $("div[id='new-widget-configuration-dialog']").shouldBe(Condition.appear, DEFAULT_TIMEOUT); @@ -212,20 +214,24 @@ public void startProcess() { } public void startMoreInfoLink() { - getMoreInformationLink().click(); + $("div[id$='process-action-menu']").shouldBe(Condition.appear, DEFAULT_TIMEOUT) + .$$("span[class$='ui-menuitem-text']").filter(Condition.text("More Information")).first().click(); } public SelenideElement getDisabledMoreInformationLink() { - return $("span[id$=':more-information']"); + return getProcessActionMenu().$$("span[class$='ui-menuitem-text']").filter(Condition.text("More Information")).first(); } private SelenideElement getProcessActionMenu() { - $("div#process-action-group").shouldBe(getClickableCondition(), DEFAULT_TIMEOUT).click(); + if (!$("[id$=':process-action-menu']").isDisplayed()) { + $("button[id$=':process-action-button']").shouldBe(Condition.appear, DEFAULT_TIMEOUT) + .click(); + } return $("div[id$='process-action-menu']").shouldBe(Condition.appear, DEFAULT_TIMEOUT); } public SelenideElement getMoreInformationLink() { - return $("a[id$=':more-information']"); + return getProcessActionMenu().$$("span[class$='ui-menuitem-text']").filter(Condition.text("More Information")).first(); } public SelenideElement getFullModeProcessName() { @@ -653,8 +659,8 @@ public void openCompactModeProcessManageFilters() { } public void closeCompactModeProcessManagerFilters() { - getManageWidgetFilterDialogCloseLink().shouldBe(Condition.appear).click(); - getManageWidgetFilterDialog().shouldBe(disappear, DEFAULT_TIMEOUT); + $("div[id$='manage-filter-dialog']").shouldBe(appear, DEFAULT_TIMEOUT).$("a.ui-dialog-titlebar-close") + .shouldBe(appear, DEFAULT_TIMEOUT).click(); } public void removeCompactModeProcessFilter() { @@ -874,7 +880,7 @@ public SelenideElement getWidgetFilter(int index) { public void closeWidgetFilter(int index) { var widgetFilterPanel = $("div[id$=':filter-overlay-panel-" + index + "']").shouldBe(appear, DEFAULT_TIMEOUT); - widgetFilterPanel.$(".ui-overlaypanel-footer__cancel").shouldBe(getClickableCondition(), DEFAULT_TIMEOUT).click(); + widgetFilterPanel.$("div[id*='widget-filter-content']").shouldBe(appear, DEFAULT_TIMEOUT).$("div[class*='filter-overlay-panel__header']").shouldBe(appear, DEFAULT_TIMEOUT).$("button[id*='filter-form-" + index + "']").should(getClickableCondition(), DEFAULT_TIMEOUT).click(); widgetFilterPanel.shouldBe(disappear, DEFAULT_TIMEOUT); } @@ -1029,8 +1035,7 @@ public NotificationCompactPage openNotificationPanel() { } public void clickOnManageFilterLink() { - var savedFilterContainer = $("[id$=':saved-filters-container']").shouldBe(appear, DEFAULT_TIMEOUT); - savedFilterContainer.$(".ui-commandlink.saved-filter__manage-filter").shouldBe(getClickableCondition()).click(); + $("div[class*='filter-overlay-panel__footer']").shouldBe(appear, DEFAULT_TIMEOUT).$("div#manage-filter").shouldBe(appear, DEFAULT_TIMEOUT).$("button[class*='saved-filter__manage-filter']").shouldBe(getClickableCondition(), DEFAULT_TIMEOUT).click(); $("[id$='manage-filter-dialog']").shouldBe(appear, DEFAULT_TIMEOUT); } @@ -1045,7 +1050,9 @@ public ElementsCollection getTotalSavedFilterInManageFilterDialog() { } public void closeManageFilterDialog() { - $("[id$=':manage-filter-action']").$("a").shouldBe(getClickableCondition()).click(); + $("div[id*='manage-filter-dialog']").shouldBe(Condition.appear, DEFAULT_TIMEOUT) + .$("div[class*='ui-widget-header']").shouldBe(Condition.appear, DEFAULT_TIMEOUT) + .$("a[class*='ui-dialog-titlebar-close']").shouldBe(getClickableCondition()).click(); $("[id$='manage-filter-dialog']").shouldBe(disappear, DEFAULT_TIMEOUT); } diff --git a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/ProcessEditWidgetNewDashBoardPage.java b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/ProcessEditWidgetNewDashBoardPage.java index f9e0229a8e5..bb62e2f8b61 100644 --- a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/ProcessEditWidgetNewDashBoardPage.java +++ b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/ProcessEditWidgetNewDashBoardPage.java @@ -132,7 +132,12 @@ public SelenideElement getFullModeProcessPreview() { } public SelenideElement getDisabledMoreInformationLink() { - return $("span[id$=':more-information']"); + return getProcessActionMenu().$$("span[class$='ui-menuitem-text']").filter(Condition.text("More Information")).first(); + } + + private SelenideElement getProcessActionMenu() { + $("div[class*='image-process-item-container']").shouldBe(Condition.appear, DEFAULT_TIMEOUT).$("button[id$='process-action-button']").shouldBe(getClickableCondition(), DEFAULT_TIMEOUT).click(); + return $("div[id$='process-action-menu']").shouldBe(Condition.appear, DEFAULT_TIMEOUT); } public void selectFullModeProcessAndSaveWidget(String processName) { diff --git a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/ProcessWidgetPage.java b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/ProcessWidgetPage.java index 67a4fa771ac..c916f51310e 100644 --- a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/ProcessWidgetPage.java +++ b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/ProcessWidgetPage.java @@ -351,8 +351,9 @@ public void deleteGridProcess(int index) { } public void clickMoreInformationLinkImage(String processName) { - SelenideElement processItem = getProcessItem(processName); - processItem.$(By.cssSelector(".more-information-wrapper")).click(); + getProcessActionMenu(processName) + .$("ul[class*='ui-helper-reset']").shouldBe(Condition.appear, DEFAULT_TIMEOUT) + .$$("li > a > span").filter(Condition.exactText("More Information")).first().click();; } public void clickMoreInformationLink(String processName) { @@ -363,7 +364,7 @@ public void clickMoreInformationLink(String processName) { private SelenideElement getProcessActionMenu(String processName) { SelenideElement processItem = getProcessItem(processName); processItem.$("button[id*=':process-action-button']").shouldBe(getClickableCondition(), DEFAULT_TIMEOUT).click(); - return $$("div[id$='process-action-menu']").filter(Condition.appear).first(); + return $$("div[id$='process-action-menu']").filter(Condition.appear).first(); } public SelenideElement getProcessItem(String processName) { diff --git a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/ReorderDashboardPage.java b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/ReorderDashboardPage.java index 457fe157697..cf3328c8774 100644 --- a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/ReorderDashboardPage.java +++ b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/ReorderDashboardPage.java @@ -12,7 +12,7 @@ public class ReorderDashboardPage extends TemplatePage { @Override protected String getLoadedLocator() { - return "i.si-move-expand-vertical"; + return "i.dashboard-icon-drag-drop"; } public void toggleVisibility(String dashboardName) { @@ -22,8 +22,8 @@ public void toggleVisibility(String dashboardName) { } public void reorderPrivateDashboard(String fromDashboardName, String toDashboardName) { - var toRow = findPrivateDashboardRowByName(toDashboardName).$("i.si-move-expand-vertical"); - var fromRow = findPrivateDashboardRowByName(fromDashboardName).$("i.si-move-expand-vertical"); + var toRow = findPrivateDashboardRowByName(toDashboardName).$("i.si-navigation-menu"); + var fromRow = findPrivateDashboardRowByName(fromDashboardName).$("i.si-navigation-menu"); dragAndDropTo(toRow, fromRow); } @@ -33,8 +33,8 @@ private void dragAndDropTo(SelenideElement toRow, SelenideElement fromRow) { } public void reorderPublicDashboard(String fromDashboardName, String toDashboardName) { - var toRow = findPublicDashboardRowByName(toDashboardName).$("i.si-move-expand-vertical"); - var fromRow = findPublicDashboardRowByName(fromDashboardName).$("i.si-move-expand-vertical"); + var toRow = findPublicDashboardRowByName(toDashboardName).$("i.si-navigation-menu"); + var fromRow = findPublicDashboardRowByName(fromDashboardName).$("i.si-navigation-menu"); dragAndDropTo(toRow, fromRow); } diff --git a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/TaskWidgetNewDashBoardPage.java b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/TaskWidgetNewDashBoardPage.java index 7f486759b4e..3b05a310903 100644 --- a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/TaskWidgetNewDashBoardPage.java +++ b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/page/TaskWidgetNewDashBoardPage.java @@ -183,8 +183,7 @@ public boolean hasSavedFilterItem(String filterName) { } public void clickOnManageFilterLink() { - var savedFilterContainer = getSavedFilterContainer(); - savedFilterContainer.$(".ui-commandlink.saved-filter__manage-filter").shouldBe(getClickableCondition()).click(); + $("div#manage-filter").shouldBe(appear, DEFAULT_TIMEOUT).$("button").shouldBe(getClickableCondition()).click(); $("[id$='manage-filter-dialog']").shouldBe(appear, DEFAULT_TIMEOUT); } @@ -531,8 +530,7 @@ public void saveFilter(String widgetFilterName) { } public void openManageFiltersDialog() { - $("div.saved-filter-content").shouldBe(appear, DEFAULT_TIMEOUT) - .$("a[class*='saved-filter__manage-filter']").shouldBe(appear, DEFAULT_TIMEOUT).click(); + $("div#manage-filter").shouldBe(appear, DEFAULT_TIMEOUT).$("button").shouldBe(getClickableCondition()).click(); } public void removeAllFilterItems() { @@ -651,4 +649,8 @@ public boolean isExpandButtonAppear() { public boolean isWidgetInfomationIconAppear() { return getTaskWidgetHeader().$(".widget__info-sidebar-link").isDisplayed(); } + + public void clickOnWidgetFilterHeader() { + $$("strong").filter(Condition.text("Filter options")).first().click(); + } } diff --git a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/test/dashboard/DashboardProcessWidgetTest.java b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/test/dashboard/DashboardProcessWidgetTest.java index 4ca462b702d..0a73303a87c 100644 --- a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/test/dashboard/DashboardProcessWidgetTest.java +++ b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/test/dashboard/DashboardProcessWidgetTest.java @@ -68,6 +68,7 @@ public void testPreviewButtonImageProcess() { newDashboardPage.editProcessWidgetConfiguration(); editProcessWidgetConfiguration.previewImageModeProcess(CATEGORIED_LEAVE_REQUEST); editProcessWidgetConfiguration.getStartButton().shouldBe(Condition.disabled); + editProcessWidgetConfiguration.save(); editProcessWidgetConfiguration.getDisabledMoreInformationLink().shouldBe(Condition.appear); editProcessWidgetConfiguration.getImageModeProcessImage() .shouldHave(Condition.attributeMatching(NewDashboardPage.SRC_ATTRIBUTE, NewDashboardPage.IMAGE_URI_PATTERN)); @@ -129,7 +130,8 @@ public void testPreviewFullModeProcess() { newDashboardPage.editProcessWidgetConfiguration(); editProcessWidgetConfiguration.previewFullModeProcess(CATEGORIED_LEAVE_REQUEST); editProcessWidgetConfiguration.getStartButton().shouldBe(Condition.disabled); - editProcessWidgetConfiguration.getDisabledMoreInformationLink().shouldBe(Condition.appear); + editProcessWidgetConfiguration.save(); + newDashboardPage.getDisabledMoreInformationLink().shouldBe(Condition.appear); } @Test diff --git a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/test/dashboard/DashboardSupportMultiLanguageTest.java b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/test/dashboard/DashboardSupportMultiLanguageTest.java index e940ec715c7..cb1de13e0f2 100644 --- a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/test/dashboard/DashboardSupportMultiLanguageTest.java +++ b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/test/dashboard/DashboardSupportMultiLanguageTest.java @@ -78,7 +78,7 @@ public void testAddPublicDashboard() { LinkNavigator.redirectToPortalDashboardConfiguration(); var configurationPage2 = new DashboardConfigurationPage(); - DashboardModificationPage modificationPage = configurationPage2.openEditPublicDashboardsPage(); + DashboardModificationPage modificationPage = configurationPage2.openEditPublicDashboardsPage("Bearbeiten"); SelenideElement dashboard = modificationPage.getDashboardRowByName(updatedName); dashboard.shouldBe(Condition.appear); } @@ -118,7 +118,7 @@ public void testAddPrivateDashboard() { LinkNavigator.redirectToPortalDashboardConfiguration(); var configurationPage2 = new DashboardConfigurationPage(); - DashboardModificationPage modificationPage = configurationPage2.openEditPrivateDashboardsPage(); + DashboardModificationPage modificationPage = configurationPage2.openEditPrivateDashboardPage("Bearbeiten"); SelenideElement dashboard = modificationPage.getDashboardRowByName(updatedName); dashboard.shouldBe(Condition.appear); } diff --git a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/test/dashboard/DashboardTaskWidgetFilterTest.java b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/test/dashboard/DashboardTaskWidgetFilterTest.java index 84f005ef33f..538c14dcddc 100644 --- a/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/test/dashboard/DashboardTaskWidgetFilterTest.java +++ b/AxonIvyPortal/portal-selenium-test/src_test/com/axonivy/portal/selenium/test/dashboard/DashboardTaskWidgetFilterTest.java @@ -193,6 +193,7 @@ public void testFilterDateOnCustomFields() { taskWidget.openFilterWidget(); taskWidget.addFilter("Shipment date", FilterOperator.BETWEEN); taskWidget.inputValueOnLatestFilter(FilterValueType.DATE_BETWEEN, "01/01/2024","12/12/2024"); + taskWidget.clickOnWidgetFilterHeader(); taskWidget.applyFilter(); taskWidget.countAllTasks().shouldHave(CollectionCondition.size(2)); } diff --git a/AxonIvyPortal/portal/cms/cms.yaml b/AxonIvyPortal/portal/cms/cms.yaml index edb4596d15f..b729a8d7ebd 100644 --- a/AxonIvyPortal/portal/cms/cms.yaml +++ b/AxonIvyPortal/portal/cms/cms.yaml @@ -460,6 +460,7 @@ ch.ivy.addon.portalkit.ui.jsf: processes: Processes public: Public remove: Remove + removeSelection: Remove selection reorder: Reorder requiredFieldMessage: This field is required reserve: Reserve @@ -1060,7 +1061,7 @@ Dialogs: noResultsText: There are no results. dashboard: PortalDashboardConfiguration: - NewDashboard: New Dashboard + NewDashboard: Add new dashboard component: CustomDashboardWidget: CouldNotFindLinkedProcess: Could not find the linked process! diff --git a/AxonIvyPortal/portal/cms/cms_de.yaml b/AxonIvyPortal/portal/cms/cms_de.yaml index 7dce2166b85..dd91de781d5 100644 --- a/AxonIvyPortal/portal/cms/cms_de.yaml +++ b/AxonIvyPortal/portal/cms/cms_de.yaml @@ -462,7 +462,8 @@ ch.ivy.addon.portalkit.ui.jsf: detail: Details display: Anzeigen displayName: Name anzeigen - dragAndDrop: 'Ziehen und Ablegen eines Bildes oder ' + dragAndDropFile: 'Ziehen und Ablegen einer Datei oder ' + dragAndDropImage: 'Ziehen und Ablegen eines Bildes oder ' edit: Bearbeiten errorAjaxMessage: Es gibt einen allgemeinen Fehler! errorFileUploadSize: Die Dateigrösse muss kleiner als {0} sein. @@ -529,10 +530,12 @@ ch.ivy.addon.portalkit.ui.jsf: processes: Prozesse public: Öffentlich remove: Entfernen + removeSelection: Selektion entfernen reorder: Neu anordnen requiredFieldMessage: Dies ist ein Pflichtfeld reserve: Reservieren reset: Zurücksetzen + resetFilters: Filter zurücksetzen resetSettingHeaderText: Einstellung zurücksetzen? resetTaskHeaderText: Diese Aufgabe zurücksetzen? resetToDefaultMessage: Dieser Vorgang kann nicht rückgängig gemacht werden. Sind Sie sicher, dass Sie auf die Standard-Einstellungen zurücksetzen möchten? @@ -791,6 +794,7 @@ ch.ivy.addon.portalkit.ui.jsf: dashboardIcon: Dashboard-Symbol dashboardPermission: Dashboard Berechtigung dashboardTitle: Dashboard Titel + deleteDashboardMessage: Sind Sie sicher, dass Sie die "{0}" dashboard? editDashboard: Dashboard editieren manageDashboard: Dashboard verwalten removeDashboardHeader: Dashboard "{0}" entfernen @@ -1287,7 +1291,7 @@ Dialogs: noResultsText: Es liegen keine Ergebnisse vor. dashboard: PortalDashboardConfiguration: - NewDashboard: Neues Dashboard + NewDashboard: Neues Dashboard hinzufügen component: CustomDashboardWidget: CouldNotFindLinkedProcess: Der verlinkte Prozess konnte nicht gefunden werden! @@ -1331,6 +1335,7 @@ Dialogs: component: ShareLinkDialog: CopyLink: Link kopieren + Link: Link LinkCopied: Link kopiert dashboard: component: diff --git a/AxonIvyPortal/portal/cms/cms_en.yaml b/AxonIvyPortal/portal/cms/cms_en.yaml index d55bb0e0727..709c359b613 100644 --- a/AxonIvyPortal/portal/cms/cms_en.yaml +++ b/AxonIvyPortal/portal/cms/cms_en.yaml @@ -461,7 +461,8 @@ ch.ivy.addon.portalkit.ui.jsf: detail: Details display: Display displayName: Display name - dragAndDrop: 'Drag and drop an image or ' + dragAndDropFile: 'Drag and drop a file or ' + dragAndDropImage: 'Drag and drop an image or ' edit: Edit errorAjaxMessage: There is a general exception. errorFileUploadSize: The file size must be lower than {0} @@ -528,10 +529,12 @@ ch.ivy.addon.portalkit.ui.jsf: processes: Processes public: Public remove: Remove + removeSelection: Remove selection reorder: Reorder requiredFieldMessage: This field is required reserve: Reserve reset: Reset + resetFilters: Reset filters resetSettingHeaderText: Reset setting? resetTaskHeaderText: Reset this task? resetToDefaultMessage: This operation cannot be undone. Are you sure you want to reset to default settings? @@ -793,6 +796,7 @@ ch.ivy.addon.portalkit.ui.jsf: dashboardIcon: Dashboard icon dashboardPermission: Dashboard permission dashboardTitle: Dashboard title + deleteDashboardMessage: Are you sure you want to delete the "{0}" dashboard? editDashboard: Edit dashboard manageDashboard: Manage dashboard removeDashboardHeader: Remove the "{0}" dashboard @@ -1288,7 +1292,7 @@ Dialogs: noResultsText: There are no results. dashboard: PortalDashboardConfiguration: - NewDashboard: New Dashboard + NewDashboard: Add new dashboard component: CustomDashboardWidget: CouldNotFindLinkedProcess: Could not find the linked process! @@ -1332,6 +1336,7 @@ Dialogs: component: ShareLinkDialog: CopyLink: Copy link + Link: Link LinkCopied: Link copied dashboard: component: diff --git a/AxonIvyPortal/portal/cms/cms_es.yaml b/AxonIvyPortal/portal/cms/cms_es.yaml index 38e56cf1c46..55bf027627b 100644 --- a/AxonIvyPortal/portal/cms/cms_es.yaml +++ b/AxonIvyPortal/portal/cms/cms_es.yaml @@ -463,7 +463,8 @@ ch.ivy.addon.portalkit.ui.jsf: detail: Detalles display: Mostrar displayName: Nombre de pantalla - dragAndDrop: 'Arrastre y suelte una imagen o ' + dragAndDropFile: 'Arrastre y suelte un archivo o ' + dragAndDropImage: 'Arrastre y suelte una imagen o ' edit: Editar errorAjaxMessage: Error general errorFileUploadSize: El tamaño deberá ser inferior a {0} @@ -530,10 +531,12 @@ ch.ivy.addon.portalkit.ui.jsf: processes: Procesos public: Público remove: Retirar + removeSelection: Eliminar selección reorder: Reordenar requiredFieldMessage: este campo es obligatorio reserve: Reservar reset: Reiniciar + resetFilters: Restablecer filtros resetSettingHeaderText: ¿Resetear la configuración? resetTaskHeaderText: ¿Reiniciar esta tarea? resetToDefaultMessage: Esta operación no se puede deshacer. ¿Estás seguro de que quieres restablecer la configuración por defecto? @@ -790,6 +793,7 @@ ch.ivy.addon.portalkit.ui.jsf: dashboardIcon: Icono del panel de control dashboardPermission: Permiso de tablero dashboardTitle: Título del tablero + deleteDashboardMessage: ¿Está seguro de que desea eliminar el "{0}" cuadro de mandos? editDashboard: Editar tablero manageDashboard: Administrar tablero removeDashboardHeader: Borrar el tablero "{0}" @@ -1286,7 +1290,7 @@ Dialogs: noResultsText: No hay resultados. dashboard: PortalDashboardConfiguration: - NewDashboard: Nuevo panel de control + NewDashboard: Añadir un nuevo cuadro de mandos component: CustomDashboardWidget: CouldNotFindLinkedProcess: ¡No se pudo encontrar el proceso vinculado! @@ -1330,6 +1334,7 @@ Dialogs: component: ShareLinkDialog: CopyLink: Copiar enlace + Link: Enlace LinkCopied: ¡Enlace copiado dashboard: component: diff --git a/AxonIvyPortal/portal/cms/cms_fr.yaml b/AxonIvyPortal/portal/cms/cms_fr.yaml index 12593affa2c..a4f0e89cadf 100644 --- a/AxonIvyPortal/portal/cms/cms_fr.yaml +++ b/AxonIvyPortal/portal/cms/cms_fr.yaml @@ -460,7 +460,8 @@ ch.ivy.addon.portalkit.ui.jsf: detail: Détails display: Présenter displayName: Affichez le nom - dragAndDrop: 'Glisser-déposer une image ou ' + dragAndDropFile: 'Glisser-déposer un fichier ou ' + dragAndDropImage: 'Glisser-déposer une image ou ' edit: Editer errorAjaxMessage: Il y a une exception générale. errorFileUploadSize: La taille du fichier doit être inférieure à {0}. @@ -527,10 +528,12 @@ ch.ivy.addon.portalkit.ui.jsf: processes: Processus public: Publique remove: Retirer + removeSelection: Retirer la sélection reorder: Réorganiser requiredFieldMessage: Ce champ est obligatoire reserve: Enregistrer reset: Réinitialiser + resetFilters: Réinitialiser les filtres resetSettingHeaderText: Rétablir le réglage ? resetTaskHeaderText: Réinitialiser cette tâche ? resetToDefaultMessage: Cette opération ne peut pas être annulée. Êtes-vous sûr de vouloir rétablir les paramètres par défaut ? @@ -787,6 +790,7 @@ ch.ivy.addon.portalkit.ui.jsf: dashboardIcon: Icône du tableau de bord dashboardPermission: Autorisation du tableau de bord dashboardTitle: Titre du tableau de bord + deleteDashboardMessage: Êtes-vous sûr de vouloir supprimer le "{0}" tableau de bord? editDashboard: Modifier le tableau de bord manageDashboard: Gérer le tableau de bord removeDashboardHeader: Supprimez le tableau de bord "{0}". @@ -1283,7 +1287,7 @@ Dialogs: noResultsText: Il n'y a pas de résultats. dashboard: PortalDashboardConfiguration: - NewDashboard: Nouveau tableau de bord + NewDashboard: Ajouter un nouveau tableau de bord component: CustomDashboardWidget: CouldNotFindLinkedProcess: Impossible de trouver le processus lié ! @@ -1327,6 +1331,7 @@ Dialogs: component: ShareLinkDialog: CopyLink: Copier le lien + Link: Lien LinkCopied: Lien copié dashboard: component: diff --git a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/bean/AbstractProcessBean.java b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/bean/AbstractProcessBean.java index 96c5d1375e4..716c9b61865 100644 --- a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/bean/AbstractProcessBean.java +++ b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/bean/AbstractProcessBean.java @@ -51,7 +51,7 @@ public String getProcessInformationPageUrl(Process process) { if (nestedProcess instanceof IWebStartable) { processId = ((IWebStartable) nestedProcess).getId(); } - return PortalNavigator.buildProcessInfoUrl(processId); + return PortalNavigator.buildProcessInfoUrl(processId.isEmpty() ? process.getId() : processId ); } protected abstract List findProcesses(); diff --git a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/dto/dashboard/process/DashboardProcess.java b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/dto/dashboard/process/DashboardProcess.java index 3bd179fc83c..5809a8ef854 100644 --- a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/dto/dashboard/process/DashboardProcess.java +++ b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/dto/dashboard/process/DashboardProcess.java @@ -210,4 +210,8 @@ public void setProcessElementId(String processElementId) { public String getPortalProcessInformation() { return portalProcessInformation; } + + public String getDefaultImageDarkLink() { + return getContentImageUrl(DefaultImage.PROCESSMODELINGDARK.getPath()); + } } diff --git a/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portal/generic/dashboard/PortalDashboardConfiguration/PortalDashboardConfiguration.xhtml b/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portal/generic/dashboard/PortalDashboardConfiguration/PortalDashboardConfiguration.xhtml index ddd670f9851..e9e1e26332e 100644 --- a/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portal/generic/dashboard/PortalDashboardConfiguration/PortalDashboardConfiguration.xhtml +++ b/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portal/generic/dashboard/PortalDashboardConfiguration/PortalDashboardConfiguration.xhtml @@ -62,16 +62,11 @@
-
diff --git a/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portal/generic/dashboard/component/DashboardDetails/DashboardDetails.xhtml b/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portal/generic/dashboard/component/DashboardDetails/DashboardDetails.xhtml index 47a22093885..7ac2cef7b46 100644 --- a/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portal/generic/dashboard/component/DashboardDetails/DashboardDetails.xhtml +++ b/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portal/generic/dashboard/component/DashboardDetails/DashboardDetails.xhtml @@ -15,8 +15,8 @@ @@ -24,19 +24,19 @@
-
+
-
+
-
- +
-
+
- - - + -
- +
-
+
+ required="false" styleClass="manage-dashboard__input " />
@@ -93,22 +93,16 @@ componentToUpdateOnCreate="dashboard-template-selection-component:dashboard-creation-component:dashboard-detail-form:dashboard-title" /> - - - - - @@ -40,46 +40,48 @@ - - - - - - - - - - - - - - - - - - + +
+ + + + + + + + + + + + + + + + + + + +
@@ -100,21 +102,23 @@ - + + + - - + value="#{ivy.cms.co('/ch.ivy.addon.portalkit.ui.jsf/dashboard/dashboardManagement/deleteDashboardMessage',[dashboardModificationBean.selectedDashboard.title])}" /> - - + + +
diff --git a/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portal/generic/dashboard/component/ProcessWidget/ImageModeProcess.xhtml b/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portal/generic/dashboard/component/ProcessWidget/ImageModeProcess.xhtml index 8f4aa7e8c5e..cc6c424122e 100644 --- a/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portal/generic/dashboard/component/ProcessWidget/ImageModeProcess.xhtml +++ b/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portal/generic/dashboard/component/ProcessWidget/ImageModeProcess.xhtml @@ -8,7 +8,7 @@
-
+
- #{process.getName()} +
- +
@@ -53,15 +59,6 @@ id="start-button" actionListener="#{dashboardProcessBean.startProcess(process)}" icon="si si-arrow-right-1" ajax="#{!isExternalLink}" iconPos="right" disabled="#{!isReadOnlyMode or isInConfiguration}" /> -
- -
diff --git a/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portalkit/component/ActionStep/ActionStep.xhtml b/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portalkit/component/ActionStep/ActionStep.xhtml index 273cf2246f0..7601f6bf974 100644 --- a/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portalkit/component/ActionStep/ActionStep.xhtml +++ b/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portalkit/component/ActionStep/ActionStep.xhtml @@ -30,7 +30,7 @@ + styleClass="#{isPreviewMode ? '' : cc.attrs.actionLinkStyleClass} #{cc.attrs.taskId} action-link portal-icon ui-sidestep-action" disabled="#{cc.attrs.readOnly or isPreviewMode}"> @@ -39,20 +39,20 @@ for="#{cc.attrs.actionLinkId}" my="right top" at="right bottom" showCloseIcon="true" dismissable="true" appendTo="@(body)" styleClass="action-steps-panel #{cc.attrs.stepsPanelStyleClass}" dynamic="true"> - - #{ivy.cms.co('/ch.ivy.addon.portalkit.ui.jsf/caseDetails/showProcessOverview')} - @@ -60,8 +60,8 @@ - + styleClass="case-command action-step-item color-destroy ui-menu-items" process="@this" oncomplete="#{cc.attrs.onDestroyComplete}"> + @@ -73,8 +73,6 @@ - - diff --git a/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portalkit/component/ProcessWidget/ProcessWidgetDialogs.xhtml b/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portalkit/component/ProcessWidget/ProcessWidgetDialogs.xhtml index 7d72583a4b5..9d4102e3ed8 100644 --- a/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portalkit/component/ProcessWidget/ProcessWidgetDialogs.xhtml +++ b/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portalkit/component/ProcessWidget/ProcessWidgetDialogs.xhtml @@ -356,7 +356,7 @@ - + diff --git a/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portalkit/component/SideStep/SideStep.xhtml b/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portalkit/component/SideStep/SideStep.xhtml index a9531d0d0af..7a55612da93 100644 --- a/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portalkit/component/SideStep/SideStep.xhtml +++ b/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portalkit/component/SideStep/SideStep.xhtml @@ -41,63 +41,63 @@ styleClass="options-panel #{cc.attrs.sideStepsPanelStyleClass}" dynamic="true" rendered="#{!cc.attrs.isDisabled}" my="right top" at="right bottom" showCloseIcon="true" dismissable="true"> - #{ivy.cms.co('/ch.ivy.addon.portalkit.ui.jsf/common/detail')} - + styleClass="option-item ui-menu-items" actionListener="#{logic.resetTask(task)}" update="@parent #{cc.attrs.componentToUpdate}"> + #{ivy.cms.co('/ch.ivy.addon.portalkit.ui.jsf/common/reset')} - + #{ivy.cms.co('/ch.ivy.addon.portalkit.ui.jsf/taskInformation/delegate')} - + styleClass="option-item ui-menu-items" actionListener="#{logic.parkTask(task)}" update="@parent #{cc.attrs.componentToUpdate}" process="@this"> + #{ivy.cms.co('/ch.ivy.addon.portalkit.ui.jsf/common/reserve')} + styleClass="option-item ui-menu-items" actionListener="#{logic.clearDelay(task)}" update="@parent #{cc.attrs.componentToUpdate}"> #{ivy.cms.co('/ch.ivy.addon.portalkit.ui.jsf/taskInformation/clearDelay')} + styleClass="option-item ui-menu-items" actionListener="#{logic.clearExpiryTime(task)}" update="@parent #{cc.attrs.componentToUpdate}"> #{ivy.cms.co('/ch.ivy.addon.portalkit.ui.jsf/taskInformation/clearExpiry')} - + #{ivy.cms.co('/ch.ivy.addon.portalkit.ui.jsf/common/destroy')} - + #{ivy.cms.co('/ch.ivy.addon.portalkit.ui.jsf/taskInformation/triggerEscalation')} diff --git a/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portalkit/component/process/ProcessGridItem/ProcessGridItem.xhtml b/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portalkit/component/process/ProcessGridItem/ProcessGridItem.xhtml index 43b3be8bb36..32abdff1dcf 100644 --- a/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portalkit/component/process/ProcessGridItem/ProcessGridItem.xhtml +++ b/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portalkit/component/process/ProcessGridItem/ProcessGridItem.xhtml @@ -48,6 +48,8 @@ hideActionButton="#{cc.attrs.isInConfiguration}" isProcessGridMode="true" isInProcessList="false" + isReadOnlyMode="#{!cc.attrs.readOnlyMode}" + isInConfiguration="#{cc.attrs.isInConfiguration}" />
-
- -
diff --git a/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portalkit/component/process/ProcessItemAction/ProcessItemAction.xhtml b/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portalkit/component/process/ProcessItemAction/ProcessItemAction.xhtml index 8b8604aa437..bf3bdc12550 100644 --- a/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portalkit/component/process/ProcessItemAction/ProcessItemAction.xhtml +++ b/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portalkit/component/process/ProcessItemAction/ProcessItemAction.xhtml @@ -16,6 +16,8 @@ + + @@ -60,7 +62,8 @@ icon="si si-information-circle" url="#{processWidgetBean.getProcessInformationPageUrl(process)}" value="#{ivy.cms.co('/ch.ivy.addon.portalkit.ui.jsf/processwidget/MoreInformation')}" - rendered="#{processWidgetBean.isShowInformationLink(process) and !isExternalLink and !isCaseMap and cc.attrs.isInProcessList}"/> + disabled="#{!cc.attrs.isReadOnlyMode or cc.attrs.isInConfiguration}" + rendered="#{processWidgetBean.isShowInformationLink(process) and !isExternalLink and !isCaseMap}"/>
diff --git a/AxonIvyPortal/portal/src_hd/com/axonivy/portal/component/ShareLinkDialog/ShareLinkDialog.xhtml b/AxonIvyPortal/portal/src_hd/com/axonivy/portal/component/ShareLinkDialog/ShareLinkDialog.xhtml index 2611cf4060d..fb691c6d305 100644 --- a/AxonIvyPortal/portal/src_hd/com/axonivy/portal/component/ShareLinkDialog/ShareLinkDialog.xhtml +++ b/AxonIvyPortal/portal/src_hd/com/axonivy/portal/component/ShareLinkDialog/ShareLinkDialog.xhtml @@ -21,24 +21,21 @@ widgetVar="#{cc.attrs.shareDialogId}" styleClass="share-dialog" header="#{cc.attrs.title}" appendTo="@(body)" closeOnEscape="true" - draggable="false" fitViewport="true" responsive="true" modal="true" closable="false" + draggable="false" fitViewport="true" responsive="true" modal="true" closable="true" width="auto" focus="@(none)" onShow="checkCopyFeature()"> - -
+ +
- - + + actionListener="#{masterDataBean.showLinkCopiedMessage()}" global="false" styleClass="w-full"/> diff --git a/AxonIvyPortal/portal/src_hd/com/axonivy/portal/dashboard/component/DashboardImportDetails/DashboardImportDetails.xhtml b/AxonIvyPortal/portal/src_hd/com/axonivy/portal/dashboard/component/DashboardImportDetails/DashboardImportDetails.xhtml index a11490668e3..66dc0bc7663 100644 --- a/AxonIvyPortal/portal/src_hd/com/axonivy/portal/dashboard/component/DashboardImportDetails/DashboardImportDetails.xhtml +++ b/AxonIvyPortal/portal/src_hd/com/axonivy/portal/dashboard/component/DashboardImportDetails/DashboardImportDetails.xhtml @@ -34,15 +34,23 @@
+ + + + + + + +
@@ -51,10 +59,10 @@ -
+
-
+
#{managedBean.importFile.getFileName()} | #{managedBean.fileSize}
@@ -158,16 +166,11 @@ - - diff --git a/AxonIvyPortal/portal/webContent/layouts/decorator/portal-dialog-with-icon.xhtml b/AxonIvyPortal/portal/webContent/layouts/decorator/portal-dialog-with-icon.xhtml index 0545cb98fed..c0b447eaece 100644 --- a/AxonIvyPortal/portal/webContent/layouts/decorator/portal-dialog-with-icon.xhtml +++ b/AxonIvyPortal/portal/webContent/layouts/decorator/portal-dialog-with-icon.xhtml @@ -18,7 +18,7 @@
-

#{not empty headerText? headerText : ivy.cms.co('/ch.ivy.addon.portalkit.ui.jsf/common/confirmationHeaderText')}

+

#{not empty headerText? headerText : ivy.cms.co('/ch.ivy.addon.portalkit.ui.jsf/common/confirmationHeaderText')}

diff --git a/AxonIvyPortal/portal/webContent/layouts/includes/topbar.xhtml b/AxonIvyPortal/portal/webContent/layouts/includes/topbar.xhtml index 98ed7c7342a..f99ee46181f 100644 --- a/AxonIvyPortal/portal/webContent/layouts/includes/topbar.xhtml +++ b/AxonIvyPortal/portal/webContent/layouts/includes/topbar.xhtml @@ -77,30 +77,30 @@
    -
  • -
  • +
  • -
  • +
  • -
  • -
  • -
  • -
  • diff --git a/AxonIvyPortal/portal/webContent/layouts/restricted/DashboardTemplate.xhtml b/AxonIvyPortal/portal/webContent/layouts/restricted/DashboardTemplate.xhtml index b84e551c5d0..e8c21ff84c6 100644 --- a/AxonIvyPortal/portal/webContent/layouts/restricted/DashboardTemplate.xhtml +++ b/AxonIvyPortal/portal/webContent/layouts/restricted/DashboardTemplate.xhtml @@ -267,7 +267,7 @@
    @@ -275,8 +275,8 @@ widgetVar="quick-filter-table" scrollHeight="300" scrollable="true" reflow="true" selection="#{dashboardBean.deleteFilters}" rowKey="#{quickFilter.name}" emptyMessage="#{ivy.cms.co('/ch.ivy.addon.portalkit.ui.jsf/dashboard/EmptyFilterMessage')}" lazy="false"> - - + + @@ -296,14 +296,10 @@
    - - + oncomplete="PF('quick-filter-table').clearFilters()" />
    diff --git a/AxonIvyPortal/portal/webContent/layouts/restricted/decorator/TableWidget.xhtml b/AxonIvyPortal/portal/webContent/layouts/restricted/decorator/TableWidget.xhtml index 12ea6c96937..3170d726d9d 100644 --- a/AxonIvyPortal/portal/webContent/layouts/restricted/decorator/TableWidget.xhtml +++ b/AxonIvyPortal/portal/webContent/layouts/restricted/decorator/TableWidget.xhtml @@ -170,7 +170,7 @@ dynamic="true">
    - +
    -
    +
    #{ivy.cms.co('/ch.ivy.addon.portalkit.ui.jsf/dashboard/Filter/FilterOptionHeader')} +
    @@ -224,24 +231,27 @@ - - + diff --git a/Showcase/portal-developer-examples/src_hd/com/axonivy/portal/developerexamples/testdata/EmployeeSearchInFrame/EmployeeSearchInFrame.xhtml b/Showcase/portal-developer-examples/src_hd/com/axonivy/portal/developerexamples/testdata/EmployeeSearchInFrame/EmployeeSearchInFrame.xhtml index 5cedfa475ca..0215d3fa8ec 100644 --- a/Showcase/portal-developer-examples/src_hd/com/axonivy/portal/developerexamples/testdata/EmployeeSearchInFrame/EmployeeSearchInFrame.xhtml +++ b/Showcase/portal-developer-examples/src_hd/com/axonivy/portal/developerexamples/testdata/EmployeeSearchInFrame/EmployeeSearchInFrame.xhtml @@ -30,9 +30,7 @@
    - + diff --git a/Showcase/portal-developer-examples/src_hd/com/axonivy/portal/developerexamples/testdata/LeaveRequestForm/LeaveRequestForm.xhtml b/Showcase/portal-developer-examples/src_hd/com/axonivy/portal/developerexamples/testdata/LeaveRequestForm/LeaveRequestForm.xhtml index 87a1f301e8c..2269436bfbf 100644 --- a/Showcase/portal-developer-examples/src_hd/com/axonivy/portal/developerexamples/testdata/LeaveRequestForm/LeaveRequestForm.xhtml +++ b/Showcase/portal-developer-examples/src_hd/com/axonivy/portal/developerexamples/testdata/LeaveRequestForm/LeaveRequestForm.xhtml @@ -5,9 +5,7 @@ - + diff --git a/Showcase/portal-developer-examples/src_hd/com/axonivy/portal/developerexamples/testdata/NewPayment/NewPayment.xhtml b/Showcase/portal-developer-examples/src_hd/com/axonivy/portal/developerexamples/testdata/NewPayment/NewPayment.xhtml index e62be89eb3c..9ce85aef67b 100644 --- a/Showcase/portal-developer-examples/src_hd/com/axonivy/portal/developerexamples/testdata/NewPayment/NewPayment.xhtml +++ b/Showcase/portal-developer-examples/src_hd/com/axonivy/portal/developerexamples/testdata/NewPayment/NewPayment.xhtml @@ -7,9 +7,7 @@ NewPayment - + diff --git a/Showcase/portal-developer-examples/src_hd/com/axonivy/portal/developerexamples/testdata/Review/Review.xhtml b/Showcase/portal-developer-examples/src_hd/com/axonivy/portal/developerexamples/testdata/Review/Review.xhtml index 8761aca9c9c..b9999c3de3a 100644 --- a/Showcase/portal-developer-examples/src_hd/com/axonivy/portal/developerexamples/testdata/Review/Review.xhtml +++ b/Showcase/portal-developer-examples/src_hd/com/axonivy/portal/developerexamples/testdata/Review/Review.xhtml @@ -108,6 +108,10 @@ window.viewName="TASK_DETAIL"; window.taskIcon = "si si-module"; + + + + diff --git a/Showcase/portal-developer-examples/src_hd/com/axonivy/portal/developerexamples/testdata/TemplateExampleInFrame/TemplateExampleInFrame.xhtml b/Showcase/portal-developer-examples/src_hd/com/axonivy/portal/developerexamples/testdata/TemplateExampleInFrame/TemplateExampleInFrame.xhtml index 3cf99430eb2..9ff026acb0b 100644 --- a/Showcase/portal-developer-examples/src_hd/com/axonivy/portal/developerexamples/testdata/TemplateExampleInFrame/TemplateExampleInFrame.xhtml +++ b/Showcase/portal-developer-examples/src_hd/com/axonivy/portal/developerexamples/testdata/TemplateExampleInFrame/TemplateExampleInFrame.xhtml @@ -69,14 +69,17 @@ style="float: right; margin-top: 20px;" />
- + + + + + + + + + + diff --git a/Showcase/portal-user-examples/src_hd/com/axonivy/portal/userexamples/leaverequest/LeaveRequestApproval/LeaveRequestApproval.xhtml b/Showcase/portal-user-examples/src_hd/com/axonivy/portal/userexamples/leaverequest/LeaveRequestApproval/LeaveRequestApproval.xhtml index 293e0507593..85e77337a25 100644 --- a/Showcase/portal-user-examples/src_hd/com/axonivy/portal/userexamples/leaverequest/LeaveRequestApproval/LeaveRequestApproval.xhtml +++ b/Showcase/portal-user-examples/src_hd/com/axonivy/portal/userexamples/leaverequest/LeaveRequestApproval/LeaveRequestApproval.xhtml @@ -75,11 +75,7 @@ id="rejected-btn" styleClass="secondary-btn Fright MarTop10" actionListener="#{logic.rejected}" process=":leave-request" update=":leave-request" style="width: auto" /> - - + diff --git a/Showcase/portal-user-examples/src_hd/com/axonivy/portal/userexamples/leaverequest/LeaveRequestCreation/LeaveRequestCreation.xhtml b/Showcase/portal-user-examples/src_hd/com/axonivy/portal/userexamples/leaverequest/LeaveRequestCreation/LeaveRequestCreation.xhtml index d9bdb89b100..60f444c818b 100644 --- a/Showcase/portal-user-examples/src_hd/com/axonivy/portal/userexamples/leaverequest/LeaveRequestCreation/LeaveRequestCreation.xhtml +++ b/Showcase/portal-user-examples/src_hd/com/axonivy/portal/userexamples/leaverequest/LeaveRequestCreation/LeaveRequestCreation.xhtml @@ -85,11 +85,7 @@
- - + diff --git a/Showcase/portal-user-examples/src_hd/com/axonivy/portal/userexamples/leaverequest/LeaveRequestSummary/LeaveRequestSummary.xhtml b/Showcase/portal-user-examples/src_hd/com/axonivy/portal/userexamples/leaverequest/LeaveRequestSummary/LeaveRequestSummary.xhtml index 712dd88b512..59ab345aa7e 100644 --- a/Showcase/portal-user-examples/src_hd/com/axonivy/portal/userexamples/leaverequest/LeaveRequestSummary/LeaveRequestSummary.xhtml +++ b/Showcase/portal-user-examples/src_hd/com/axonivy/portal/userexamples/leaverequest/LeaveRequestSummary/LeaveRequestSummary.xhtml @@ -70,11 +70,7 @@ styleClass="Fright MarTop10" partialSubmit="true" id="finish-btn" actionListener="#{logic.close}" process=":leave-request" update=":leave-request" style="width: auto" /> - - + From 5c49adf443d452890ccfb908b58f872c553f8c9b Mon Sep 17 00:00:00 2001 From: Thai Phan <117443490+pvthai-axonivy@users.noreply.github.com> Date: Wed, 23 Oct 2024 15:54:43 +0700 Subject: [PATCH 5/8] feature/IVYPORTAL-17777-add-cancel-button-for-complex-filter-diallog (#1152) --- .../restricted/decorator/SidebarWidgetConfiguration.xhtml | 8 ++++++-- .../resources/js/sidebar-widget-configuration.js | 6 +++++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/AxonIvyPortal/portal/webContent/layouts/restricted/decorator/SidebarWidgetConfiguration.xhtml b/AxonIvyPortal/portal/webContent/layouts/restricted/decorator/SidebarWidgetConfiguration.xhtml index 31e8f7ee988..6796eefbd1b 100644 --- a/AxonIvyPortal/portal/webContent/layouts/restricted/decorator/SidebarWidgetConfiguration.xhtml +++ b/AxonIvyPortal/portal/webContent/layouts/restricted/decorator/SidebarWidgetConfiguration.xhtml @@ -130,7 +130,7 @@ actionListener="#{taskWidgetConfigurationFilterBean.updateWidgetFilterBeforeApply(widget)}" styleClass="Fright preview-button u-hidden-sm-down" icon="si si-check-1" update="predefined-filter configuration-filter-messages-panel" - oncomplete="closeFilterPanel(); if (args && !args.validationFailed) { updateComponentOnPreviewCmd(); }" /> + oncomplete="closeFilterPanelWithValidation(); if (args && !args.validationFailed) { updateComponentOnPreviewCmd(); }" /> - +
diff --git a/AxonIvyPortal/portal/webContent/resources/js/sidebar-widget-configuration.js b/AxonIvyPortal/portal/webContent/resources/js/sidebar-widget-configuration.js index a3e356c4e40..60b16e23c96 100644 --- a/AxonIvyPortal/portal/webContent/resources/js/sidebar-widget-configuration.js +++ b/AxonIvyPortal/portal/webContent/resources/js/sidebar-widget-configuration.js @@ -8,11 +8,15 @@ function openFilterPanel(event) { calculateFilterPaneltPosition(); } -function closeFilterPanel() { +function closeFilterPanelWithValidation() { if (filterHasValidationError()) { return; } + closeFilterPanel(); +} + +function closeFilterPanel() { $('#new-widget-configuration-dialog').find('#widget-configuration-save-button').show(); document.getElementById(filterPanelId).classList.remove("active"); } From 6e0e1e9383e655c99cac7ccef11dad6441e1f267 Mon Sep 17 00:00:00 2001 From: Thai Phan <117443490+pvthai-axonivy@users.noreply.github.com> Date: Wed, 23 Oct 2024 16:38:49 +0700 Subject: [PATCH 6/8] IVYPORTAL-17831: Fix upload case document error (#1157) --- .../portalkit/component/CaseItemDocument/CaseItemDocument.xhtml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portalkit/component/CaseItemDocument/CaseItemDocument.xhtml b/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portalkit/component/CaseItemDocument/CaseItemDocument.xhtml index 1a567550f5a..31c58f7120b 100644 --- a/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portalkit/component/CaseItemDocument/CaseItemDocument.xhtml +++ b/AxonIvyPortal/portal/src_hd/ch/ivy/addon/portalkit/component/CaseItemDocument/CaseItemDocument.xhtml @@ -31,7 +31,7 @@ + onclick="PF('document-upload-dialog').show()"> #{ivy.cms.co('/ch.ivy.addon.portalkit.ui.jsf/common/addDocument')} #{ivy.cms.co('/ch.ivy.addon.portalkit.ui.jsf/common/add')} From 5173788e0e28938732f27d9214f0a0aeb27efd55 Mon Sep 17 00:00:00 2001 From: Thai Phan <117443490+pvthai-axonivy@users.noreply.github.com> Date: Thu, 24 Oct 2024 17:53:12 +0700 Subject: [PATCH 7/8] IVYPORTAL-17764: Check shoutcuts keys pressed (#1127) (#1162) (cherry picked from commit d2e13279a8074e81092afdc97f4384ece127106a) --- .../portal/webContent/resources/js/portal.js | 279 +++++++++--------- 1 file changed, 141 insertions(+), 138 deletions(-) diff --git a/AxonIvyPortal/portal/webContent/resources/js/portal.js b/AxonIvyPortal/portal/webContent/resources/js/portal.js index 219c563f7ee..323b43a6d87 100644 --- a/AxonIvyPortal/portal/webContent/resources/js/portal.js +++ b/AxonIvyPortal/portal/webContent/resources/js/portal.js @@ -504,6 +504,10 @@ $(document).ready(function() { let focusedResetTaskFormEl = 0; let focusedTaskSideStepEl; + function onlyAltPressed(event) { + return event ? event.altKey && !event.ctrlKey && !event.shiftKey && !event.metaKey : false; + } + function removeFocusClass(element) { if(element) { element.removeClass('focused'); @@ -541,166 +545,165 @@ $(document).ready(function() { }); $(document).on('keydown', function(event) { - if (event.key === 'Tab') { - removeFocusedElements(); - } - var caseActionStepsPanel = $('[id*="action-steps-panel"]:visible'); - var caseActionStepsPanelVisible = caseActionStepsPanel.length > 0; - - var resetTaskConfirmForm = $('[id$="task-component:reset-task-confirmation-form"]:visible'); - var resetTaskConfirmFormVisible = resetTaskConfirmForm.length > 0; - var taskActionStepsPanel = $('[id$=":side-steps-panel"]:visible'); - var taskActionStepsPanelVisible = taskActionStepsPanel.length > 0; - - - if (event.altKey && !isNaN(event.key) && event.key >= '1' && event.key <= '9') { - var index = parseInt(event.key) - 1; - if (index >= 0 && index < focusableElements.length) { - event.preventDefault(); - var focusedElement = $(focusableElements[index]); - removeFocusedElements(); - taskIndex = 0; - taskSideStepIndex = 0; - processIndex = 0; - if(caseActionStepsPanelVisible) { - caseSideStepIndex = 0; - } else { - caseIndex = 0; + if (event.key === 'Escape') { + var collapseWidgetBtn = $('[id*="collapse-link"]:visible'); + if (collapseWidgetBtn.length > 0) { + collapseWidgetBtn.click(); + } + + var caseSideActionCloseBtn = $('[id*="action-steps-panel"]:visible').find('.ui-overlaypanel-close'); + if (caseSideActionCloseBtn.length > 0) { + caseSideActionCloseBtn.click(); + + if(focusedCaseEl) { + focusedCaseEl.addClass('focused'); + focusedCaseEl.focus(); } - addFocusClass(focusedElement); + } + + var taskSideActionCloseBtn = $('[id*="side-steps-panel"]:visible').find('.ui-overlaypanel-close'); + if (taskSideActionCloseBtn.length > 0) { + taskSideActionCloseBtn.click(); + } + return; } - } - if (event.altKey) { - //Short cuts for Task widget - var key = event.key.toLowerCase(); - if (key == 'w') { - if(resetTaskConfirmFormVisible) { - var cancelOk = [ - resetTaskConfirmForm.find('a:first'), - resetTaskConfirmForm.find('button:first') - ]; - - if(resetTaskFormIndex >= cancelOk.length) { - resetTaskFormIndex = 0; - } + if (event.key === 'Tab') { + removeFocusedElements(); + return; + } - removeFocusedElements(); - - focusedResetTaskFormEl = $(cancelOk[resetTaskFormIndex]); - addFocusClass(focusedResetTaskFormEl); - resetTaskFormIndex++; - } else if(taskActionStepsPanelVisible) { + var caseActionStepsPanel = $('[id*="action-steps-panel"]:visible'); + var caseActionStepsPanelVisible = caseActionStepsPanel.length > 0; + + var resetTaskConfirmForm = $('[id$="task-component:reset-task-confirmation-form"]:visible'); + var resetTaskConfirmFormVisible = resetTaskConfirmForm.length > 0; + + var taskActionStepsPanel = $('[id$=":side-steps-panel"]:visible'); + var taskActionStepsPanelVisible = taskActionStepsPanel.length > 0; + + + if (onlyAltPressed(event)) { + var key = event.key.toLowerCase(); + if (!isNaN(key) && key >= '1' && key <= '9') { + //Short cuts main menu item + var index = parseInt(key) - 1; + if (index >= 0 && index < focusableElements.length) { + event.preventDefault(); + var focusedElement = $(focusableElements[index]); + removeFocusedElements(); + taskIndex = 0; + taskSideStepIndex = 0; + processIndex = 0; + if(caseActionStepsPanelVisible) { + caseSideStepIndex = 0; + } else { + caseIndex = 0; + } + addFocusClass(focusedElement); + } + } else if (key == 'w') { + //Short cuts for Task widget + if(resetTaskConfirmFormVisible) { + var cancelOk = [ + resetTaskConfirmForm.find('a:first'), + resetTaskConfirmForm.find('button:first') + ]; + + if(resetTaskFormIndex >= cancelOk.length) { + resetTaskFormIndex = 0; + } - var steps = taskActionStepsPanel.find('div.ui-overlaypanel-content a'); - if(taskSideStepIndex >= steps.length) { + removeFocusedElements(); + + focusedResetTaskFormEl = $(cancelOk[resetTaskFormIndex]); + addFocusClass(focusedResetTaskFormEl); + resetTaskFormIndex++; + } else if(taskActionStepsPanelVisible) { + + var steps = taskActionStepsPanel.find('div.ui-overlaypanel-content a'); + if(taskSideStepIndex >= steps.length) { + taskSideStepIndex = 0; + } + + removeFocusedElements(); + + focusedTaskSideStepEl = $(steps[taskSideStepIndex]); + addFocusClass(focusedTaskSideStepEl); + taskSideStepIndex++; + } else { + var taskList = $('[id$=":task-component:dashboard-tasks"] table tr td:visible [id$=":start-task"]'); + if(taskIndex >= taskList.length) { + taskIndex = 0; + } + + removeFocusedElements(); + processIndex = 0; taskSideStepIndex = 0; + if(caseActionStepsPanelVisible) { + caseSideStepIndex = 0; + } else { + caseIndex = 0; + } + + focusedTaskEl = $(taskList[taskIndex]); + addFocusClass(focusedTaskEl); + taskIndex++; } - - removeFocusedElements(); - - focusedTaskSideStepEl = $(steps[taskSideStepIndex]); - addFocusClass(focusedTaskSideStepEl); - taskSideStepIndex++; - } else { - var taskList = $('[id$=":start-task"]'); - if(taskIndex >= taskList.length) { - taskIndex = 0; - } - - removeFocusedElements(); - processIndex = 0; - taskSideStepIndex = 0; + } else if (key == 'q') { + //Short cuts for Case widget if(caseActionStepsPanelVisible) { - caseSideStepIndex = 0; + var steps = caseActionStepsPanel.find('div.ui-overlaypanel-content a'); + + if(caseSideStepIndex >= steps.length) { + caseSideStepIndex = 0; + } + + removeFocusedElements(); + + focusedCaseSideStepEl = $(steps[caseSideStepIndex]); + addFocusClass(focusedCaseSideStepEl); + caseSideStepIndex++; } else { - caseIndex = 0; - } - - focusedTaskEl = $(taskList[taskIndex]); - addFocusClass(focusedTaskEl); - taskIndex++; - } - } + var caseList = $('[id$="case-component:dashboard-cases"] table tr td:visible [id$=":dashboard-case-side-steps-menu"]'); + + if(caseIndex >= caseList.length) { + caseIndex = 0; + } - //Short cuts for Case widget - if (key == 'q') { - if(caseActionStepsPanelVisible) { - var steps = caseActionStepsPanel.find('div.ui-overlaypanel-content a'); - - if(caseSideStepIndex >= steps.length) { + removeFocusedElements(); + taskIndex = 0; + taskSideStepIndex = 0; + processIndex = 0; caseSideStepIndex = 0; + + focusedCaseEl = $(caseList[caseIndex]); + addFocusClass(focusedCaseEl); + caseIndex++; } - - removeFocusedElements(); - - focusedCaseSideStepEl = $(steps[caseSideStepIndex]); - addFocusClass(focusedCaseSideStepEl); - caseSideStepIndex++; - } else { - var caseList = $('[id$="case-component:dashboard-cases"]').find('[id$=":dashboard-case-side-steps-menu"]'); + } else if (key == 'a') { + //Short cuts for Process widget + var processList = $('[id$=":process-component:process-list"]').find('a'); - if(caseIndex >= caseList.length) { - caseIndex = 0; + if(processIndex >= processList.length) { + processIndex = 0; } removeFocusedElements(); taskIndex = 0; taskSideStepIndex = 0; - processIndex = 0; - caseSideStepIndex = 0; - - focusedCaseEl = $(caseList[caseIndex]); - addFocusClass(focusedCaseEl); - caseIndex++; - } - } - - //Short cuts for Process widget - if (key == 'a') { - var processList = $('[id$=":process-component:process-list"]').find('a'); - - if(processIndex >= processList.length) { - processIndex = 0; - } - - removeFocusedElements(); - taskIndex = 0; - taskSideStepIndex = 0; - if(caseActionStepsPanelVisible) { - caseSideStepIndex = 0; - } else { - caseIndex = 0; - } - - focusedProcessEl = $(processList[processIndex]); - addFocusClass(focusedProcessEl); - processIndex++; - } - } - - if (event.key === 'Escape') { - var collapseWidgetBtn = $('[id*="collapse-link"]:visible'); - if (collapseWidgetBtn.length > 0) { - collapseWidgetBtn.click(); - } - - var caseSideActionCloseBtn = $('[id*="action-steps-panel"]:visible').find('.ui-overlaypanel-close'); - if (caseSideActionCloseBtn.length > 0) { - caseSideActionCloseBtn.click(); + if(caseActionStepsPanelVisible) { + caseSideStepIndex = 0; + } else { + caseIndex = 0; + } - if(focusedCaseEl) { - focusedCaseEl.addClass('focused'); - focusedCaseEl.focus(); + focusedProcessEl = $(processList[processIndex]); + addFocusClass(focusedProcessEl); + processIndex++; } } - - var taskSideActionCloseBtn = $('[id*="side-steps-panel"]:visible').find('.ui-overlaypanel-close'); - if (taskSideActionCloseBtn.length > 0) { - taskSideActionCloseBtn.click(); - } - } }); }); // End of accessibility for shortcuts navigation From 3931c6c60fba9bdc78c38ab9f8bf8d527ab572c9 Mon Sep 17 00:00:00 2001 From: Nam Chu <117632090+chnam-axonivy@users.noreply.github.com> Date: Mon, 28 Oct 2024 13:38:19 +0700 Subject: [PATCH 8/8] Release 12.0.0-m266 --- Documentation/maven/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/maven/pom.xml b/Documentation/maven/pom.xml index c44488c518c..7ed91a06899 100644 --- a/Documentation/maven/pom.xml +++ b/Documentation/maven/pom.xml @@ -7,7 +7,7 @@ ${revision} - 9.1.0.0-SNAPSHOT + 12.0.0-m266