From 0f331bdfed66dc532f90c3ddea0b1f70418ad4ba Mon Sep 17 00:00:00 2001 From: Alexandre Flores Date: Wed, 27 Nov 2024 10:29:25 +0000 Subject: [PATCH] missing styling and messages --- .../client/common/search/SearchAllButtonWrapper.java | 9 +++++++-- .../com/databasepreservation/common/public/main.css | 10 ++++++++++ 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/databasepreservation/common/client/common/search/SearchAllButtonWrapper.java b/src/main/java/com/databasepreservation/common/client/common/search/SearchAllButtonWrapper.java index bbd6f646..416d74f2 100644 --- a/src/main/java/com/databasepreservation/common/client/common/search/SearchAllButtonWrapper.java +++ b/src/main/java/com/databasepreservation/common/client/common/search/SearchAllButtonWrapper.java @@ -2,6 +2,7 @@ import com.databasepreservation.common.client.common.dialogs.DatabaseSelectDialog; import com.databasepreservation.common.client.index.filter.Filter; +import com.databasepreservation.common.client.tools.FontAwesomeIconManager; import com.google.gwt.event.logical.shared.HasValueChangeHandlers; import com.google.gwt.event.logical.shared.ValueChangeEvent; import com.google.gwt.event.logical.shared.ValueChangeHandler; @@ -16,6 +17,7 @@ * @author Alexandre Flores */ public class SearchAllButtonWrapper extends SimplePanel implements HasValueChangeHandlers { + private ClientMessages messages; public Long totalSelectedDatabases; private Button button; @@ -23,8 +25,9 @@ public class SearchAllButtonWrapper extends SimplePanel implements HasValueChang public void init(Filter defaultFilter, String allFilter, ClientMessages messages, SearchPanelWithSearchAll parentSearchPanel) { + this.messages = messages; this.button = new Button(); - this.button.addStyleName("btn-link-info btn"); + this.button.addStyleName("btn-link-info btn btn-searchall-dialog"); this.databaseSelectDialog = new DatabaseSelectDialog(defaultFilter, allFilter, messages, parentSearchPanel); this.button.addClickHandler(event -> { this.databaseSelectDialog.center(); @@ -44,7 +47,9 @@ public HandlerRegistration addValueChangeHandler(ValueChangeHandler handle public void setTotalSelectedDatabases(Long totalSelectedDatabases) { this.totalSelectedDatabases = totalSelectedDatabases; - this.button.setHTML(SafeHtmlUtils.fromSafeConstant("Searching on " + this.totalSelectedDatabases + " databases")); + this.button + .setHTML(SafeHtmlUtils.fromSafeConstant(messages.manageDatabaseSearchAllSearchingOn(this.totalSelectedDatabases) + + FontAwesomeIconManager.getTag("edit"))); ValueChangeEvent.fire(this, totalSelectedDatabases); } diff --git a/src/main/resources/com/databasepreservation/common/public/main.css b/src/main/resources/com/databasepreservation/common/public/main.css index 05768926..b6ac03fd 100644 --- a/src/main/resources/com/databasepreservation/common/public/main.css +++ b/src/main/resources/com/databasepreservation/common/public/main.css @@ -1416,6 +1416,16 @@ html, body { text-decoration: none; } +.btn-searchall-dialog { + display: flex; + gap: 10px; + align-items: center; +} + +.btn-searchall-dialog i { + font-size: 20px +} + .label-field { display: inline-block; text-align: left;