From af8d2525b9e6b18233b955cc033974cde2d23a8c Mon Sep 17 00:00:00 2001 From: "francesco.mangiacrapa" Date: Fri, 10 Jul 2020 15:07:03 +0200 Subject: [PATCH] on going on #19600 --- .../view/windows/DialogGetInfoBootstrap.java | 30 ++++++++++-- .../windows/DialogGetInfoBootstrap.ui.xml | 47 +++---------------- .../user/workspace/public/workspacetree.css | 43 +++++++++++------ 3 files changed, 61 insertions(+), 59 deletions(-) diff --git a/src/main/java/org/gcube/portlets/user/workspace/client/view/windows/DialogGetInfoBootstrap.java b/src/main/java/org/gcube/portlets/user/workspace/client/view/windows/DialogGetInfoBootstrap.java index 20b62c0..f87e9b3 100644 --- a/src/main/java/org/gcube/portlets/user/workspace/client/view/windows/DialogGetInfoBootstrap.java +++ b/src/main/java/org/gcube/portlets/user/workspace/client/view/windows/DialogGetInfoBootstrap.java @@ -3,14 +3,15 @@ package org.gcube.portlets.user.workspace.client.view.windows; import java.util.List; import org.gcube.portlets.user.workspace.client.AppControllerExplorer; +import org.gcube.portlets.user.workspace.client.interfaces.GXTFolderItemTypeEnum; import org.gcube.portlets.user.workspace.client.model.FileModel; -import com.extjs.gxt.ui.client.widget.form.TextField; import com.github.gwtbootstrap.client.ui.ControlGroup; +import com.github.gwtbootstrap.client.ui.Label; import com.github.gwtbootstrap.client.ui.TextArea; -import com.github.gwtbootstrap.client.ui.TextBox; +import com.github.gwtbootstrap.client.ui.constants.LabelType; import com.google.gwt.core.client.GWT; -import com.google.gwt.dom.client.Text; +import com.google.gwt.dom.client.Style.Unit; import com.google.gwt.event.dom.client.ClickEvent; import com.google.gwt.event.dom.client.ClickHandler; import com.google.gwt.uibinder.client.UiBinder; @@ -18,6 +19,7 @@ import com.google.gwt.uibinder.client.UiField; import com.google.gwt.user.client.rpc.AsyncCallback; import com.google.gwt.user.client.ui.Composite; import com.google.gwt.user.client.ui.HTML; +import com.google.gwt.user.client.ui.HorizontalPanel; import com.google.gwt.user.client.ui.Widget; public class DialogGetInfoBootstrap extends Composite { @@ -33,8 +35,9 @@ public class DialogGetInfoBootstrap extends Composite { public static final String UNKNOWN = "unknown"; - //@UiField - //TextBox txtName; + @UiField + HorizontalPanel hpItemType; + @UiField HTML txtName; @@ -74,6 +77,23 @@ public class DialogGetInfoBootstrap extends Composite { public DialogGetInfoBootstrap(final FileModel fileModel) { initWidget(uiBinder.createAndBindUi(this)); + hpItemType.add(fileModel.getIcon()); + Label labelItemType = new Label(); + labelItemType.setType(LabelType.INFO); + labelItemType.getElement().getStyle().setMarginLeft(10, Unit.PX); + String label = null; + + GXTFolderItemTypeEnum typeEnum = fileModel.getGXTFolderItemType(); + if(typeEnum!=null) { + label = typeEnum.getLabel(); + label = label.replace("External ", ""); + }else { + label = fileModel.getType(); + } + + labelItemType.setText(label); + + hpItemType.add(labelItemType); // Setting name htmlSetValue(txtName, fileModel.getName()); diff --git a/src/main/java/org/gcube/portlets/user/workspace/client/view/windows/DialogGetInfoBootstrap.ui.xml b/src/main/java/org/gcube/portlets/user/workspace/client/view/windows/DialogGetInfoBootstrap.ui.xml index 2089d73..177373d 100644 --- a/src/main/java/org/gcube/portlets/user/workspace/client/view/windows/DialogGetInfoBootstrap.ui.xml +++ b/src/main/java/org/gcube/portlets/user/workspace/client/view/windows/DialogGetInfoBootstrap.ui.xml @@ -3,42 +3,6 @@ xmlns:g="urn:import:com.google.gwt.user.client.ui" xmlns:b="urn:import:com.github.gwtbootstrap.client.ui"> - .back-color-info { - background-color: #fafaff !important; - } - - .margin-bottom-20 { - margin-bottom: 20px; - } - - .padding-left-10 { - padding-left: 10px; - } - - .margin-left-5 { - margin-left: 5px; - } - - .text-bold { - font-weight: bold; - } - - .not-active { - pointer-events: none; - cursor: default; - opacity: .5; - padding-left: 10px; - } - - .font-size-14 { - font-size: 14px; - } - - .to-top-alignment { - vertical-align: top; - padding-top: 0px !important; - } - .no-border { border: 0px; } @@ -47,12 +11,11 @@ padding-top: 5px; font-family: Arial, Helvetica, sans-serif; } - - .label-style { - color: gray; - } + + @@ -100,6 +63,10 @@ + + + diff --git a/src/main/java/org/gcube/portlets/user/workspace/public/workspacetree.css b/src/main/java/org/gcube/portlets/user/workspace/public/workspacetree.css index 3bb54fa..b3ce1cd 100644 --- a/src/main/java/org/gcube/portlets/user/workspace/public/workspacetree.css +++ b/src/main/java/org/gcube/portlets/user/workspace/public/workspacetree.css @@ -273,18 +273,18 @@ table.userssuggest th { top: 2% !important; } -.my-control-group .controls{ +.my-control-group .controls { margin-left: 70px !important; } .my-control-group .control-label { - width: 80px !important; - text-align: center !important; - padding-right: 10px !important; + width: 80px !important; + text-align: center !important; + padding-right: 10px !important; } -.my-control-group .add-on{ - width: 20px !important; +.my-control-group .add-on { + width: 20px !important; } .my-control-group .gwt-TextBox { @@ -302,25 +302,25 @@ table.userssuggest th { text-decoration: none; } - -.my-control-group-get-info{ - margin-bottom: 10px !important; +.my-control-group-get-info { + margin-bottom: 10px !important; font-size: 14px !important; font-family: Arial, serif; } -.my-control-group-get-info .controls{ + +.my-control-group-get-info .controls { margin-left: 70px !important; } .my-control-group-get-info .control-label { - width: 80px !important; - text-align: center !important; + width: 80px !important; + text-align: center !important; padding-right: 10px !important; color: #5f6368; } -.my-control-group-get-info .add-on{ - width: 20px !important; +.my-control-group-get-info .add-on { + width: 20px !important; } .my-control-group-get-info .gwt-HTML { @@ -332,3 +332,18 @@ table.userssuggest th { cursor: text !important; } +.my-control-group-get-info .gwt-TextArea { + width: 350px; + height: 60px; +} + +.item-type-style { + margin-bottom: 10px; + background-color: #fcfcfc !important; + padding-top: 5px; + padding-bottom: 5px; +} + +.item-type-style td { + vertical-align: middle !important; +} \ No newline at end of file