From 2f9653ed30f97137e4972f9b4d20fabb7617ec75 Mon Sep 17 00:00:00 2001 From: Carlos Afonso Date: Mon, 11 Nov 2024 17:24:46 +0000 Subject: [PATCH] Wip --- .../columns/helpers/ClobColumnOptionsPanel.java | 2 +- .../configuration/columns/helpers/ColumnOptionUtils.java | 7 ++++--- .../com/databasepreservation/common/utils/StatusUtils.java | 6 +++++- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/databasepreservation/common/client/common/visualization/browse/configuration/columns/helpers/ClobColumnOptionsPanel.java b/src/main/java/com/databasepreservation/common/client/common/visualization/browse/configuration/columns/helpers/ClobColumnOptionsPanel.java index 269b1b2e..c7f91f24 100644 --- a/src/main/java/com/databasepreservation/common/client/common/visualization/browse/configuration/columns/helpers/ClobColumnOptionsPanel.java +++ b/src/main/java/com/databasepreservation/common/client/common/visualization/browse/configuration/columns/helpers/ClobColumnOptionsPanel.java @@ -121,7 +121,7 @@ public String getApplicationType() { private void buildDetailedViewTemplatePanel(ColumnStatus columnConfiguration) { templateToDetailedView = new ColumnTemplateOptions(messages.columnManagementLabelForTemplateDetail(), - ColumnOptionUtils.getDefaultTextOrValue(columnConfiguration.getSearchStatus().getList().getTemplate()), true); + ColumnOptionUtils.getDefaultTextOrValue(columnConfiguration.getDetailsStatus().getTemplateStatus()), true); templateToDetailedView.addStyleNameToLabel("form-label"); templateToDetailedView.addStyleNameToTextBox("form-textbox"); diff --git a/src/main/java/com/databasepreservation/common/client/common/visualization/browse/configuration/columns/helpers/ColumnOptionUtils.java b/src/main/java/com/databasepreservation/common/client/common/visualization/browse/configuration/columns/helpers/ColumnOptionUtils.java index 697a6577..f7072a3a 100644 --- a/src/main/java/com/databasepreservation/common/client/common/visualization/browse/configuration/columns/helpers/ColumnOptionUtils.java +++ b/src/main/java/com/databasepreservation/common/client/common/visualization/browse/configuration/columns/helpers/ColumnOptionUtils.java @@ -7,19 +7,20 @@ */ package com.databasepreservation.common.client.common.visualization.browse.configuration.columns.helpers; +import static com.databasepreservation.common.client.ViewerConstants.DEFAULT_DETAILED_VIEWER_LABEL_TEMPLATE; +import static com.databasepreservation.common.client.ViewerConstants.DEFAULT_DOWNLOAD_LABEL_TEMPLATE; + +import com.databasepreservation.common.client.ClientConfigurationManager; import com.databasepreservation.common.client.ViewerConstants; import com.databasepreservation.common.client.models.status.collection.ColumnStatus; import com.databasepreservation.common.client.models.status.collection.TableStatus; import com.databasepreservation.common.client.models.status.collection.TemplateStatus; import com.databasepreservation.common.client.tools.ViewerStringUtils; -import com.google.gwt.core.client.GWT; import com.google.gwt.user.client.ui.Button; import com.google.gwt.user.client.ui.FlowPanel; import com.google.gwt.user.client.ui.Label; import com.google.gwt.user.client.ui.TextBox; -import static com.databasepreservation.common.client.ViewerConstants.DEFAULT_DOWNLOAD_LABEL_TEMPLATE; - /** * @author Miguel GuimarĂ£es */ diff --git a/src/main/java/com/databasepreservation/common/utils/StatusUtils.java b/src/main/java/com/databasepreservation/common/utils/StatusUtils.java index 84a25273..2c6161fa 100644 --- a/src/main/java/com/databasepreservation/common/utils/StatusUtils.java +++ b/src/main/java/com/databasepreservation/common/utils/StatusUtils.java @@ -7,6 +7,7 @@ */ package com.databasepreservation.common.utils; +import static com.databasepreservation.common.client.ViewerConstants.DEFAULT_DETAILED_VIEWER_LABEL_TEMPLATE; import static com.databasepreservation.common.client.ViewerConstants.DEFAULT_DOWNLOAD_LABEL_TEMPLATE; import static com.databasepreservation.common.client.ViewerConstants.DEFAULT_VIEWER_DOWNLOAD_LABEL_TEMPLATE; @@ -123,14 +124,17 @@ public static ColumnStatus getColumnStatus(ViewerColumn column, boolean show, in if (column.getType() != null && (column.getType().getDbType().equals(ViewerType.dbTypes.BINARY) || column.getType().getDbType().equals(ViewerType.dbTypes.CLOB))) { final TemplateStatus template = getTemplateStatus(); + final TemplateStatus detailedTemplate = getTemplateStatus(); if (ViewerConfiguration.getInstance().getViewerConfigurationAsBoolean(false, ViewerConfiguration.VIEWER_ENABLED)) { template.setTemplate(DEFAULT_VIEWER_DOWNLOAD_LABEL_TEMPLATE); + detailedTemplate.setTemplate(DEFAULT_DETAILED_VIEWER_LABEL_TEMPLATE); } else { template.setTemplate(DEFAULT_DOWNLOAD_LABEL_TEMPLATE); + detailedTemplate.setTemplate(DEFAULT_DOWNLOAD_LABEL_TEMPLATE); } status.updateSearchListTemplate(template); - status.updateDetailsTemplate(template); + status.updateDetailsTemplate(detailedTemplate); } return status;