Skip to content

Commit

Permalink
Feature/ivyportal 16201 remove ajax loader (#1349)
Browse files Browse the repository at this point in the history
* feature/IVYPORTAL-16201-Remove-ajax-loader

- Set global false for commandLink change dark/light mode

* feature/IVYPORTAL-16201-Remove-ajax-loader

- add global false for delegate task and workflow events

* feature/IVYPORTAL-16201-Remove-ajax-loader

- Add global false for edit dashboard

* feature/IVYPORTAL-16201-Remove-ajax-loader

- Add global false for add new dashboard button

* Revert "feature/IVYPORTAL-16201-Remove-ajax-loader"

This reverts commit 29c50d5.

* feature/IVYPORTAL-16201-Remove-ajax-loader

- Remove ajax loader in add/edit/delete external link

* feature/IVYPORTAL-16201-Remove-ajax-loader

- Remove ajax loader status when delete

* feature/IVYPORTAL-16201-Remove-ajax-loader

- Add validateClient true

* feature/IVYPORTAL-16201-Remove-ajax-loader

- Add global false on delete dashboard

* feature/IVYPORTAL-16201-Remove-ajax-loader

- Remove ajax loader on case details page

* feature/IVYPORTAL-16201-Remove-ajax-loader

- Remove ajax loader in task details page

* feature/IVYPORTAL-16201-Remove-ajax-loader

- remove ajax loader in process list

* feature/IVYPORTAL-16201-Remove-ajax-loader

- remove ajax loader on delete saved filter btn

* feature/IVYPORTAL-16201-Remove-ajax-loader

- Remove ajax loader in Admin settings page

* feature/IVYPORTAL-16201-Remove-ajax-loader

- Remove ajax loader in Absence page

* feature/IVYPORTAL-16201-Remove-ajax-loader

- Update jenkinsfile

* feature/IVYPORTAL-16201-Remove-ajax-loader

- Update GUI test

* feature/IVYPORTAL-16201-Remove-ajax-loader

- Remove ajax loader on Admin settings page

* feature/IVYPORTAL-16201-Remove-ajax-loader

- Handle feedback

* Revert "feature/IVYPORTAL-16201-Remove-ajax-loader"

This reverts commit 990b5d5.

* feature/IVYPORTAL-16201-Remove-ajax-loader

- Update add language button

* Revert "feature/IVYPORTAL-16201-Remove-ajax-loader"

This reverts commit 918155e.
  • Loading branch information
lmluat-axonivy authored Jan 2, 2025
1 parent 1b242da commit d3ecc75
Show file tree
Hide file tree
Showing 16 changed files with 30 additions and 35 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ public boolean isElementDisplayedById(String id) {
public MainMenuPage openMainMenu() {
if (!isMainMenuOpen()) {
waitForElementDisplayed(By.id("left-menu"), true);
$(By.id("left-menu")).shouldBe(appear, DEFAULT_TIMEOUT).hover();
$("div[id*='left-menu']").shouldBe(appear, DEFAULT_TIMEOUT).$("div.sidebar-logo").shouldBe(appear, DEFAULT_TIMEOUT).hover();
waitForElementClickableThenClick($(By.id("user-menu-required-login:toggle-menu")));
}
return new MainMenuPage();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
<p:commandButton id="create-dashboard-action" actionListener="#{dashboardConfigurationBean.addNewDashboard(isPublicDashboard)}"
value="#{ivy.cms.co('/Dialogs/ch/ivy/addon/portal/generic/dashboard/PortalDashboardConfiguration/NewDashboard')}"
styleClass="dashboard-action-container-icon #{selectedDashboardTypeStyleClass} w-full primary-color-light-button"
partialSubmit="true"
partialSubmit="true" global="false"
oncomplete="PF('create-new-dashboard-dialog').show();"
title="#{ivy.cms.co('/Dialogs/ch/ivy/addon/portal/generic/dashboard/PortalDashboardConfiguration/NewDashboard')}" />
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
my="right top" at="right bottom">
<p:menuitem id="edit" process="@this" actionListener="#{dashboardModificationBean.openDashboardDetailDialog(dashboard)}"
icon="si si-graphic-tablet-drawing-pen" styleClass="dashboard-configuration-action-menu-icon"
update="#{cc.clientId}:configuration-dashboard-detail-component:dashboard-detail-form"
update="#{cc.clientId}:configuration-dashboard-detail-component:dashboard-detail-form" global="false"
value="#{ivy.cms.co('/ch.ivy.addon.portalkit.ui.jsf/common/edit')}" oncomplete="PF('configuration-dashboard-detail-dialog').show()"
target="_blank" resetValues="true" title="#{ivy.cms.co('/ch.ivy.addon.portalkit.ui.jsf/common/edit')}" rendered="true" />
<p:menuitem id="configure-dashboard" process="@this"
Expand All @@ -80,7 +80,7 @@
update="#{cc.clientId}:share-dashboard-component:share-dashboard-dialog"
value="#{ivy.cms.co('/Dialogs/ch/ivy/addon/portal/generic/dashboard/component/DashboardModification/Share')}" global="false" />
<p:menuitem id="delete-dashboard" process="@this" styleClass="rounded-button ui-button-outlined ui-button-danger color-destroy"
icon="si si-bin-1" actionListener="#{dashboardModificationBean.onSelectedDeleteDashboard(dashboard)}"
icon="si si-bin-1" actionListener="#{dashboardModificationBean.onSelectedDeleteDashboard(dashboard)}" global="false"
update="dashboard-modification-component:remove-dashboard-dialog" oncomplete="PF('remove-dashboard-dialog').show()"
title="#{ivy.cms.co('/ch.ivy.addon.portalkit.ui.jsf/common/delete')}"
value="#{ivy.cms.co('/ch.ivy.addon.portalkit.ui.jsf/common/delete')}" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
</h:panelGroup>
<p:toggleSwitch id="show-absence-in-the-past" value="#{data.absenceInThePastShown}"
styleClass="show-absence-in-the-past-panel">
<p:ajax event="change" listener="#{logic.findAbsencesAndSubstitutes()}"
<p:ajax event="change" listener="#{logic.findAbsencesAndSubstitutes()}" global="false"
update="@(.absence-table)" partialSubmit="true" />
</p:toggleSwitch>
</div>
Expand Down Expand Up @@ -112,7 +112,7 @@
<p:commandButton id="add-absence"
styleClass="Fright ui-sm-hidden primary-color-light-button"
value="#{ivy.cms.co('/ch.ivy.addon.portalkit.ui.jsf/AbsenceAndDeputy/addAbsence')}"
process="@this"
process="@this" global="false"
oncomplete="PF('absence-dialog').show()"
actionListener="#{logic.add}"
update="absence-dialog absence-form"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
<p:tab id="application-tab" title="#{ivy.cms.co('/ch.ivy.addon.portalkit.ui.jsf/adminSettings/applications')}">
<h:form prependId="false" id="applicationForm">
<h:panelGroup layout="block" styleClass="application-tab-action-buttons">
<p:commandButton id="add-application-btn" actionListener="#{logic.addNewApp}" oncomplete="PF('appDialog').show()" resetValues="true"
<p:commandButton id="add-application-btn" actionListener="#{logic.addNewApp}" oncomplete="PF('appDialog').show()" resetValues="true" global="false"
styleClass="new-app-btn primary-color-light-button" value="#{ivy.cms.co('/ch.ivy.addon.portalkit.ui.jsf/adminSettings/applicationList/addNewApplication')}"
update=":#{p:resolveFirstComponentWithId('appDialog', view).clientId}" />
</h:panelGroup>
Expand Down Expand Up @@ -72,7 +72,7 @@
my="right top" at="right bottom"
styleClass="applications-action-menu">
<p:menuitem id="edit-application"
styleClass=""
global="false"
value="#{ivy.cms.co('/ch.ivy.addon.portalkit.ui.jsf/common/edit')}"
icon="si si-graphic-tablet-drawing-pen"
oncomplete="PF('appDialog').show()"
Expand Down Expand Up @@ -139,7 +139,7 @@
my="right top" at="right bottom"
styleClass="settings-action-menu">
<p:menuitem id="edit-application"
styleClass=""
global="false"
value="#{ivy.cms.co('/ch.ivy.addon.portalkit.ui.jsf/common/edit')}"
icon="si si-graphic-tablet-drawing-pen"
oncomplete="PF('settingDialog').show()"
Expand Down Expand Up @@ -249,7 +249,7 @@
</div>
<div class="flex flex-none">
<p:commandButton value="#{ivy.cms.co('/ch.ivy.addon.portalkit.ui.jsf/adminSettings/addLanguages')}" process="appDisplayName3rd"
styleClass="app-setting-button"
styleClass="app-setting-button" global="false"
update=":#{p:resolveFirstComponentWithId('appDisplayName3rd', view).clientId} :#{p:resolveFirstComponentWithId('applicationName', view).clientId} messages"
actionListener="#{logic.getLanguageList}" oncomplete="if (!args.validationFailed)PF('applicationName').show();">
<f:param name="skipDisplayNameInputValidation" value="true" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<div class="ui-g case-details-description-title">
<div class="case-detail-title #{cc.attrs.labelStyleClasses} text-ellipsis">
#{ivy.cms.co('/ch.ivy.addon.portalkit.ui.jsf/common/description')}
<p:commandLink onclick="showWidgetDescriptionInplaceEditor();" ariaLabel="#{ivy.cms.co('/Labels/EditDescription')}"
<p:commandLink onclick="showWidgetDescriptionInplaceEditor();" ariaLabel="#{ivy.cms.co('/Labels/EditDescription')}" global="false"
rendered="#{caseActionBean.canChangeDescription(case) and !cc.attrs.readOnly}" id="edit-description-link">
<i class="si si-graphic-tablet-drawing-pen" />
</p:commandLink>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<cc:implementation>
<c:set var="dataModel" value="#{cc.attrs.dataModel}" />
<h:panelGroup id="config-columns-container" layout="block" styleClass="config-columns-button u-hidden-md-down">
<p:commandLink id="#{cc.attrs.configButtonId}" styleClass="config-columns">
<p:commandLink id="#{cc.attrs.configButtonId}" styleClass="config-columns" global="false">
<i class="si si-layers-grid-settings u-mar-right-5" />
<span class="link-text">
<h:outputText value="#{ivy.cms.co('/ch.ivy.addon.portalkit.ui.jsf/taskList/manageColumns')}" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,11 +129,6 @@

<ui:include src="ProcessWidgetDialogs.xhtml" />

<h:form>
<p:remoteCommand name="updateProcessListOnSaveSuccessful" update="#{cc.clientId}:process-list #{cc.clientId}"
oncomplete="processWidget.setup();processWidget.hideLoadingText();"/>
</h:form>

<script>
var processWidget = new ProcessWidget();
$(function() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
closeOnEscape="true" modal="true" appendTo="@(body)"
responsive="true" resizable="false" fitViewport="true" positionType="absolute"
styleClass="edit-process-dialog" header="#{ivy.cms.co('/ch.ivy.addon.portalkit.ui.jsf/processwidget/editDialog/dialogHeaderTitle', [processWidgetBean.editedProcess.getName()])}">
<p:ajax event="close" update="edit-process-dialog" resetValues="true" />
<p:ajax event="close" update="edit-process-dialog" resetValues="true" global="false"/>
<h:form id="edit-process-form" styleClass="ui-g edit-process-form">
<c:set var="process" value="#{processWidgetBean.editedProcess}" />
<c:set var="processIcon" value="#{process.getIcon()}" />
Expand Down Expand Up @@ -193,9 +193,9 @@

<f:facet name="footer">
<p:commandButton id="save-process-command" value="#{ivy.cms.co('/ch.ivy.addon.portalkit.ui.jsf/common/save')}"
process="#{cc.clientId}:edit-process-form" actionListener="#{processWidgetBean.updateProcessData()}" styleClass="w-full"
update="#{cc.clientId}:edit-process-form:edit-external-link-error-message"
oncomplete="if(!args.validationFailed){PF('edit-process-dialog').hide(); updateProcessListOnSaveSuccessful();}" form="#{cc.clientId}:edit-process-form"/>
process="#{cc.clientId}:edit-process-form" actionListener="#{processWidgetBean.updateProcessData()}" styleClass="w-full" validateClient="true"
update="#{cc.clientId}:edit-process-form:edit-external-link-error-message #{cc.clientId}:process-list #{cc.clientId}"
oncomplete="if(!args.validationFailed){PF('edit-process-dialog').hide(); processWidget.setup(); processWidget.hideLoadingText();}" form="#{cc.clientId}:edit-process-form"/>
</f:facet>
</p:dialog>
<!-- End Edit Process -->
Expand All @@ -220,10 +220,10 @@

<ui:define name="dialogFooter">
<h:form id="delete-process-workflow-form" styleClass="flex flex-column">
<p:commandButton id="remove-process-command" global="false" process="@this" update="#{cc.clientId}:process-list"
<p:commandButton id="remove-process-command" process="@this" update="#{cc.clientId}:process-list #{cc.clientId}"
styleClass="w-full portal-remove-button"
actionListener="#{processWidgetBean.deleteProcessWorkflow()}" value="#{ivy.cms.co('/ch.ivy.addon.portalkit.ui.jsf/common/remove')}"
oncomplete="PF('remove-process-workflow-dialog').hide(); updateProcessListOnSaveSuccessful();" />
oncomplete="PF('remove-process-workflow-dialog').hide(); processWidget.setup(); processWidget.hideLoadingText();" />
<p:link onclick="PF('remove-process-workflow-dialog').hide()" styleClass="pt-3 flex justify-content-center"
value="#{ivy.cms.co('/ch.ivy.addon.portalkit.ui.jsf/common/cancel')}"
href="#" />
Expand All @@ -236,7 +236,7 @@
<p:dialog id="add-external-link-dialog" widgetVar="add-external-link-dialog"
header="#{ivy.cms.co('/ch.ivy.addon.portalkit.ui.jsf/processwidget/addNewExternalLinkHeader')}" closeOnEscape="true" modal="true"
appendTo="@(body)" resizable="false" responsive="true" positionType="absolute" fitViewport="true" styleClass="add-external-link-dialog">
<p:ajax event="close" update="add-external-link-dialog" resetValues="true" />
<p:ajax event="close" update="add-external-link-dialog" resetValues="true" global="false"/>
<div style="display: none;" id="error-message" />
<h:form id="add-external-link-form" styleClass="add-external-link-form ui-g">
<p:defaultCommand target="external-link-name"/>
Expand Down Expand Up @@ -389,8 +389,8 @@
<p:commandButton id="adding-new-external-link-command" value="#{ivy.cms.co('/ch.ivy.addon.portalkit.ui.jsf/common/addLink')}"
process="#{cc.clientId}:add-external-link-form"
form="#{cc.clientId}:add-external-link-form" actionListener="#{processWidgetBean.createNewExternalLink()}"
update="#{cc.clientId}:add-external-link-form" styleClass="w-full"
oncomplete="if(!args.validationFailed){PF('add-external-link-dialog').hide(); updateProcessListOnSaveSuccessful();}" />
update="#{cc.clientId}:add-external-link-form #{cc.clientId}:process-list #{cc.clientId}" styleClass="w-full" validateClient="true"
oncomplete="if(!args.validationFailed){PF('add-external-link-dialog').hide(); processWidget.setup(); processWidget.hideLoadingText();}" />
</f:facet>
</p:dialog>
<!-- End External Link Dialogs -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
actionListener="#{roleManagementBean.prepareAddingNewRole()}"
oncomplete="PF('role-details-dialog').show()"
update="@(.manage-role-details-form) #{cc.clientId}:role-details-dialog"
process="@this"
process="@this" global="false"
resetValues="true"
title="#{ivy.cms.co('/ch.ivy.addon.portalkit.ui.jsf/components/RoleManagement/CreateRole')}"
rendered="#{roleManagementBean.canCreateRole}"/>
Expand Down Expand Up @@ -109,7 +109,7 @@
</h:panelGroup>

<h:panelGroup id="assign-users-to-role-action">
<p:commandLink id="assign-users-to-role-link"
<p:commandLink id="assign-users-to-role-link" global="false"
title="#{ivy.cms.co('/ch.ivy.addon.portalkit.ui.jsf/components/RoleManagement/AssignUsersToRole')}"
actionListener="#{roleManagementBean.setDataForAssignUserToRole(role)}"
styleClass="action-column-icon-button"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<h:panelGroup layout="block" styleClass="ui-g task-details-description-title">
<div class="task-detail-title #{cc.attrs.labelStyleClasses} text-ellipsis task-description-title">
#{ivy.cms.co('/ch.ivy.addon.portalkit.ui.jsf/common/description')}
<p:commandLink onclick="showWidgetDescriptionInplaceEditor();" ariaLabel="#{ivy.cms.co('/Labels/EditDescription')}"
<p:commandLink onclick="showWidgetDescriptionInplaceEditor();" ariaLabel="#{ivy.cms.co('/Labels/EditDescription')}" global="false"
rendered="#{canChangeDescription and !cc.attrs.readOnly}" id="edit-description-link">
<i class="si si-graphic-tablet-drawing-pen" />
</p:commandLink>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
<span class="display-full-text">#{ivy.cms.co('/ch.ivy.addon.portalkit.ui.jsf/noteHistory/showMoreBtn')}</span>
<span class="display-short-text">#{ivy.cms.co('/ch.ivy.addon.portalkit.ui.jsf/common/more')}</span>
</p:link>
<p:commandLink id="add-document-command"
<p:commandLink id="add-document-command" global="false"
rendered="#{caseTaskDocumentBean.canWriteDocument(task)}"
styleClass="task-details-document-add-link u-mar-right-10"
oncomplete="PF('document-upload-dialog').show()">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<span class="display-full-text">#{ivy.cms.co('/ch.ivy.addon.portalkit.ui.jsf/noteHistory/showMoreBtn')}</span>
<span class="display-short-text">#{ivy.cms.co('/ch.ivy.addon.portalkit.ui.jsf/common/more')}</span>
</p:link>
<p:commandLink id="add-note-command" styleClass="task-details-document-add-link" rendered="#{caseTaskNoteHistoryBean.showAddNote}"
<p:commandLink id="add-note-command" styleClass="task-details-document-add-link" rendered="#{caseTaskNoteHistoryBean.showAddNote}" global="false"
oncomplete="PF('#{cc.clientId}:addNewNoteDialog').show()" actionListener="#{data.setTask(task)}">
<span class="si si-notes-add" />
<span class="display-full-text">#{ivy.cms.co('/ch.ivy.addon.portalkit.ui.jsf/common/addNote')}</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
oncomplete="#{cc.attrs.onCompleteEditProcess}"
actionListener="#{cc.attrs.actionListenerOnEditProcess}"
update="#{cc.attrs.componentToUpdateOnEditProcess}"
rendered="#{canModify}" />
rendered="#{canModify}"/>
<p:menuitem id="more-information"
icon="si si-information-circle"
url="#{processWidgetBean.getProcessInformationPageUrl(process)}"
Expand All @@ -59,7 +59,7 @@
rendered="#{processWidgetBean.isShowInformationLink(process) and !isExternalLink and !isCaseMap}"/>
<p:menuitem id="delete-process"
value="#{ivy.cms.co('/ch.ivy.addon.portalkit.ui.jsf/common/delete')}"
icon="si si-bin-1" styleClass="color-destroy"
icon="si si-bin-1" styleClass="color-destroy" global="false"
oncomplete="#{cc.attrs.onCompleteDeleteProcess}"
actionListener="#{cc.attrs.actionListenerOnDeleteProcess}"
update="#{cc.attrs.componentToUpdateOnDeleteProcess}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
isWorkingOnATask="#{isWorkingOnATask}" case="#{case}" task="#{task}" />
</li>
<li class="topbar-item themeswitch-item">
<p:commandLink id="theme-switcher" disabled="#{!themeBean.enableSwitchThemeButton}" ariaLabel="#{ivy.cms.co('/ch.ivy.addon.portalkit.ui.jsf/applicationMenuHeader/ThemeSwitcher')}"
<p:commandLink id="theme-switcher" disabled="#{!themeBean.enableSwitchThemeButton}" ariaLabel="#{ivy.cms.co('/ch.ivy.addon.portalkit.ui.jsf/applicationMenuHeader/ThemeSwitcher')}" global="false"
onclick="PrimeFaces.FreyaConfigurator.changeLayout('ivy', '#{ivyFreyaTheme.mode == 'light' ? 'dark' : 'light'}');Portal.changePortalVariableTheme('#{ivyFreyaTheme.mode == 'light' ? 'dark' : 'light'}');">
<i class="topbar-icon pi pi-#{ivyFreyaTheme.mode == 'light' ? 'moon' : 'sun'}" />
<p:ajax onstart="PrimeFaces.FreyaConfigurator.beforeResourceChange();" oncomplete="reloadIframes();"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@
</div>
<h:panelGroup id="manage-filter-action" layout="block" styleClass="ui-g-12 u-text-align-right">
<p:commandButton id="delete-widget-filter-btn" value="#{ivy.cms.co('/ch.ivy.addon.portalkit.ui.jsf/common/removeSelection')}"
process="delete-saved-filter-form" update="delete-saved-filter-form:quick-filter-table"
process="delete-saved-filter-form" update="delete-saved-filter-form:quick-filter-table" global="false"
actionListener="#{dashboardBean.deleteSavedFilter()}"
oncomplete="PF('quick-filter-table').clearFilters()" />
</h:panelGroup>
Expand Down

0 comments on commit d3ecc75

Please sign in to comment.