diff --git a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/dto/dashboard/CaseDashboardWidget.java b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/dto/dashboard/CaseDashboardWidget.java index 10a1919b3bb..e140b7980e3 100644 --- a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/dto/dashboard/CaseDashboardWidget.java +++ b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/dto/dashboard/CaseDashboardWidget.java @@ -9,6 +9,7 @@ import java.util.stream.Collectors; import org.apache.commons.collections4.CollectionUtils; +import org.apache.commons.lang.BooleanUtils; import org.apache.commons.lang3.StringUtils; import org.primefaces.PrimeFaces; import org.primefaces.model.SortMeta; @@ -248,6 +249,11 @@ public void loadUserFilter() { @Override public void setQuickSearchKeyword() { - this.dataModel.getCriteria().setQuickSearchKeyword(this.getQuickSearchKeyword()); + if (BooleanUtils.isTrue(enableQuickSearch)) { + this.dataModel.getCriteria().setQuickSearchKeyword(this.getQuickSearchKeyword()); + } + else { + this.setQuickSearchKeyword(StringUtils.EMPTY); + } } } diff --git a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/dto/dashboard/CompactProcessDashboardWidget.java b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/dto/dashboard/CompactProcessDashboardWidget.java index c75d4515fb9..babb320597e 100644 --- a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/dto/dashboard/CompactProcessDashboardWidget.java +++ b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/dto/dashboard/CompactProcessDashboardWidget.java @@ -6,6 +6,8 @@ import java.util.List; import java.util.Map; +import org.apache.commons.lang.BooleanUtils; + import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude; @@ -176,4 +178,11 @@ public boolean isEnableQuickSearch() { public void setEnableQuickSearch(boolean enableQuickSearch) { this.enableQuickSearch = enableQuickSearch; } + + @Override + public void setQuickSearchKeyword(String quickSearchKeyword) { + if (BooleanUtils.isTrue(this.enableQuickSearch)) { + super.setQuickSearchKeyword(quickSearchKeyword); + } + } } diff --git a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/dto/dashboard/TaskDashboardWidget.java b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/dto/dashboard/TaskDashboardWidget.java index f31bbc40e42..1ffa9bfd5c1 100644 --- a/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/dto/dashboard/TaskDashboardWidget.java +++ b/AxonIvyPortal/portal/src/ch/ivy/addon/portalkit/dto/dashboard/TaskDashboardWidget.java @@ -9,6 +9,7 @@ import java.util.stream.Collectors; import org.apache.commons.collections4.CollectionUtils; +import org.apache.commons.lang.BooleanUtils; import org.apache.commons.lang3.StringUtils; import org.primefaces.PrimeFaces; import org.primefaces.model.SortMeta; @@ -209,8 +210,12 @@ public void setRowsPerPage(int rowsPerPage) { @Override public void setQuickSearchKeyword() { - this.dataModel.getCriteria().setQuickSearchKeyword(this.getQuickSearchKeyword()); - } + if (BooleanUtils.isTrue(this.enableQuickSearch)) { + this.dataModel.getCriteria().setQuickSearchKeyword(this.getQuickSearchKeyword()); + } + else { + this.setQuickSearchKeyword(StringUtils.EMPTY); + }} public List getFilters() { return this.dataModel.getCriteria().getFilters(); diff --git a/AxonIvyPortal/portal/webContent/layouts/restricted/decorator/TableWidget.xhtml b/AxonIvyPortal/portal/webContent/layouts/restricted/decorator/TableWidget.xhtml index 2e8468f1f35..21dc94c141c 100644 --- a/AxonIvyPortal/portal/webContent/layouts/restricted/decorator/TableWidget.xhtml +++ b/AxonIvyPortal/portal/webContent/layouts/restricted/decorator/TableWidget.xhtml @@ -45,7 +45,7 @@ + onkeydown="handleKeyDown(event)" disabled="#{!isReadOnlyMode}">