This commit is contained in:
Francesco Mangiacrapa 2020-07-13 15:35:02 +02:00
parent 2ff9cbaf35
commit b9370463b0
9 changed files with 285 additions and 59 deletions

View File

@ -6,9 +6,9 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
## [v6.31.0] [r4.25.0] - 2020-07-08 ## [v6.31.0] [r4.25.0] - 2020-07-08
#### Fixes #### Enhancements
[Task #19544] update the unsharing messages in the accounting history [#19600] revisit the "Get Info" Dialog in a modern view
## [v6.30.1] [r4.24.0] - 2020-06-25 ## [v6.30.1] [r4.24.0] - 2020-06-25

View File

@ -118,7 +118,6 @@ import org.gcube.portlets.user.workspace.client.view.tree.AsyncTreePanel;
import org.gcube.portlets.user.workspace.client.view.windows.DialogAddFolderAndSmart; import org.gcube.portlets.user.workspace.client.view.windows.DialogAddFolderAndSmart;
import org.gcube.portlets.user.workspace.client.view.windows.DialogAddFolderAndSmart.AddType; import org.gcube.portlets.user.workspace.client.view.windows.DialogAddFolderAndSmart.AddType;
import org.gcube.portlets.user.workspace.client.view.windows.DialogAddUrl; import org.gcube.portlets.user.workspace.client.view.windows.DialogAddUrl;
import org.gcube.portlets.user.workspace.client.view.windows.DialogGetInfoBootstrap;
import org.gcube.portlets.user.workspace.client.view.windows.DialogGetLink; import org.gcube.portlets.user.workspace.client.view.windows.DialogGetLink;
import org.gcube.portlets.user.workspace.client.view.windows.DialogGetLink.Link_Type; import org.gcube.portlets.user.workspace.client.view.windows.DialogGetLink.Link_Type;
import org.gcube.portlets.user.workspace.client.view.windows.DialogShareLink; import org.gcube.portlets.user.workspace.client.view.windows.DialogShareLink;
@ -171,14 +170,10 @@ import com.extjs.gxt.ui.client.event.MessageBoxEvent;
import com.extjs.gxt.ui.client.widget.Dialog; import com.extjs.gxt.ui.client.widget.Dialog;
import com.extjs.gxt.ui.client.widget.Info; import com.extjs.gxt.ui.client.widget.Info;
import com.extjs.gxt.ui.client.widget.MessageBox; import com.extjs.gxt.ui.client.widget.MessageBox;
import com.github.gwtbootstrap.client.ui.Button;
import com.github.gwtbootstrap.client.ui.Modal; import com.github.gwtbootstrap.client.ui.Modal;
import com.github.gwtbootstrap.client.ui.ModalFooter;
import com.github.gwtbootstrap.client.ui.event.HideEvent; import com.github.gwtbootstrap.client.ui.event.HideEvent;
import com.github.gwtbootstrap.client.ui.event.HideHandler; import com.github.gwtbootstrap.client.ui.event.HideHandler;
import com.google.gwt.core.client.GWT; import com.google.gwt.core.client.GWT;
import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.event.shared.EventHandler; import com.google.gwt.event.shared.EventHandler;
import com.google.gwt.event.shared.HandlerManager; import com.google.gwt.event.shared.HandlerManager;
import com.google.gwt.http.client.RequestBuilder; import com.google.gwt.http.client.RequestBuilder;
@ -696,10 +691,10 @@ public class AppControllerExplorer implements EventHandler, TreeAppControllerInt
public void onGetInfo(GetInfoEvent getInfoEvent) { public void onGetInfo(GetInfoEvent getInfoEvent) {
//new DialogGetInfo(getInfoEvent.getSourceFile()); //new DialogGetInfo(getInfoEvent.getSourceFile());
FileModel fileItem = getInfoEvent.getSourceFile(); final FileModel fileItem = getInfoEvent.getSourceFile();
if(fileItem!=null) { if(fileItem!=null) {
final Modal modal = new Modal(true); /*final Modal modal = new Modal(true);
modal.setCloseVisible(true); modal.setCloseVisible(true);
modal.setTitle(fileItem.getName() + " - Details"); modal.setTitle(fileItem.getName() + " - Details");
modal.setMaxHeigth("800px"); modal.setMaxHeigth("800px");
@ -719,7 +714,9 @@ public class AppControllerExplorer implements EventHandler, TreeAppControllerInt
DialogGetInfoBootstrap dlg = new DialogGetInfoBootstrap(fileItem); DialogGetInfoBootstrap dlg = new DialogGetInfoBootstrap(fileItem);
modal.add(dlg); modal.add(dlg);
modal.add(modalFooter); modal.add(modalFooter);
modal.show(); modal.show();*/
notifySubscriber(new GetInfoEvent(fileItem));
} }
} }
}); });
@ -2131,6 +2128,9 @@ public class AppControllerExplorer implements EventHandler, TreeAppControllerInt
} else if (event instanceof LoadFolderEvent) { } else if (event instanceof LoadFolderEvent) {
LoadFolderEvent loadFolderEvent = (LoadFolderEvent) event; LoadFolderEvent loadFolderEvent = (LoadFolderEvent) event;
sub.loadFolder(loadFolderEvent.getTargetFolder()); sub.loadFolder(loadFolderEvent.getTargetFolder());
} else if (event instanceof GetInfoEvent) {
GetInfoEvent getInfoEvent = (GetInfoEvent) event;
sub.showDetails(getInfoEvent.getSourceFile());
} }
} }

View File

@ -1,5 +1,7 @@
package org.gcube.portlets.user.workspace.client.event; package org.gcube.portlets.user.workspace.client.event;
import org.gcube.portlets.user.workspace.client.interfaces.EventsTypeEnum;
import org.gcube.portlets.user.workspace.client.interfaces.GuiEventInterface;
import org.gcube.portlets.user.workspace.client.model.FileModel; import org.gcube.portlets.user.workspace.client.model.FileModel;
import com.google.gwt.event.shared.GwtEvent; import com.google.gwt.event.shared.GwtEvent;
@ -9,7 +11,7 @@ import com.google.gwt.event.shared.GwtEvent;
* @author Francesco Mangiacrapa francesco.mangiacrapa{@literal @}isti.cnr.it * @author Francesco Mangiacrapa francesco.mangiacrapa{@literal @}isti.cnr.it
* *
*/ */
public class GetInfoEvent extends GwtEvent<GetInfoEventHandler> { public class GetInfoEvent extends GwtEvent<GetInfoEventHandler> implements GuiEventInterface{
public static Type<GetInfoEventHandler> TYPE = new Type<GetInfoEventHandler>(); public static Type<GetInfoEventHandler> TYPE = new Type<GetInfoEventHandler>();
private FileModel targetFile = null; private FileModel targetFile = null;
@ -32,4 +34,9 @@ public class GetInfoEvent extends GwtEvent<GetInfoEventHandler> {
public FileModel getSourceFile() { public FileModel getSourceFile() {
return targetFile; return targetFile;
} }
@Override
public EventsTypeEnum getKey() {
return EventsTypeEnum.GET_DETAILS_FOR_ITEM;
}
} }

View File

@ -35,5 +35,6 @@ public enum EventsTypeEnum
UPDATE_WORKSPACE_SIZE, UPDATE_WORKSPACE_SIZE,
ADD_ADMINISTRATOR_EVENT, ADD_ADMINISTRATOR_EVENT,
FILE_VERSIONING_HISTORY_EVENT, FILE_VERSIONING_HISTORY_EVENT,
GET_DETAILS_FOR_ITEM,
LOAD_FOLDER_EVENT; LOAD_FOLDER_EVENT;
} }

View File

@ -10,6 +10,7 @@ import org.gcube.portlets.user.workspace.client.model.FolderModel;
import org.gcube.portlets.user.workspace.shared.WorkspaceTrashOperation; import org.gcube.portlets.user.workspace.shared.WorkspaceTrashOperation;
// TODO: Auto-generated Javadoc
// Implements this interface to receive events by tree async // Implements this interface to receive events by tree async
/** /**
* The Interface SubscriberInterface. * The Interface SubscriberInterface.
@ -196,5 +197,15 @@ public interface SubscriberInterface {
* @param folderTarget the folder target * @param folderTarget the folder target
*/ */
void loadFolder(FileModel folderTarget); void loadFolder(FileModel folderTarget);
/**
* Show details.
*
* @param fileModel the file model
*/
void showDetails(FileModel fileModel);
} }

View File

@ -19,6 +19,7 @@ import com.extjs.gxt.ui.client.event.Listener;
import com.extjs.gxt.ui.client.widget.Dialog; import com.extjs.gxt.ui.client.widget.Dialog;
import com.extjs.gxt.ui.client.widget.form.TextField; import com.extjs.gxt.ui.client.widget.form.TextField;
import com.extjs.gxt.ui.client.widget.layout.FormLayout; import com.extjs.gxt.ui.client.widget.layout.FormLayout;
import com.google.gwt.core.client.GWT;
import com.google.gwt.user.client.Command; import com.google.gwt.user.client.Command;
import com.google.gwt.user.client.rpc.AsyncCallback; import com.google.gwt.user.client.rpc.AsyncCallback;
@ -30,8 +31,8 @@ import com.google.gwt.user.client.rpc.AsyncCallback;
public class DialogEditProperties extends Dialog { public class DialogEditProperties extends Dialog {
private FileModel item; private FileModel item;
private int widthDialog = 450; private int widthDialog = 800;
private int heigthDialog = 300; private int heigthDialog = 400;
private Command commad; private Command commad;
private List<TextField<String>> fields; private List<TextField<String>> fields;
private FormLayout layout; private FormLayout layout;
@ -49,8 +50,8 @@ public class DialogEditProperties extends Dialog {
this.commad = command; this.commad = command;
layout = new FormLayout(); layout = new FormLayout();
layout.setLabelWidth(90); layout.setLabelWidth(200);
layout.setDefaultWidth(300); layout.setDefaultWidth(550);
setLayout(layout); setLayout(layout);
setHeading("Edit Properties: " + item.getName()); setHeading("Edit Properties: " + item.getName());
@ -71,6 +72,15 @@ public class DialogEditProperties extends Dialog {
saveProperties(true); saveProperties(true);
} }
}); });
//SET TOGGLE BUTTON GRID VIEW
/*Scheduler.get().scheduleDeferred(new ScheduledCommand() {
@Override
public void execute() {
setZIndex(99999);
}
});*/
} }
/* /*
@ -143,8 +153,10 @@ public class DialogEditProperties extends Dialog {
fields = new ArrayList<TextField<String>>(result.size()); fields = new ArrayList<TextField<String>>(result.size());
for (String key : result.keySet()) { for (String key : result.keySet()) {
TextField<String> field = new TextField<String>(); TextField<String> field = new TextField<String>();
GWT.log("Adding field: "+key);
field.setFieldLabel(key); field.setFieldLabel(key);
field.setValue(result.get(key)); field.setValue(result.get(key));
field.setReadOnly(false);
add(field); add(field);
fields.add(field); fields.add(field);
} }

View File

@ -1,10 +1,13 @@
package org.gcube.portlets.user.workspace.client.view.windows; package org.gcube.portlets.user.workspace.client.view.windows;
import java.util.Date;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import org.gcube.portlets.user.workspace.client.AppControllerExplorer; import org.gcube.portlets.user.workspace.client.AppControllerExplorer;
import org.gcube.portlets.user.workspace.client.ConstantsExplorer;
import org.gcube.portlets.user.workspace.client.interfaces.GXTFolderItemTypeEnum; import org.gcube.portlets.user.workspace.client.interfaces.GXTFolderItemTypeEnum;
import org.gcube.portlets.user.workspace.client.model.FileGridModel;
import org.gcube.portlets.user.workspace.client.model.FileModel; import org.gcube.portlets.user.workspace.client.model.FileModel;
import com.github.gwtbootstrap.client.ui.Button; import com.github.gwtbootstrap.client.ui.Button;
@ -12,12 +15,14 @@ import com.github.gwtbootstrap.client.ui.ControlGroup;
import com.github.gwtbootstrap.client.ui.Label; import com.github.gwtbootstrap.client.ui.Label;
import com.github.gwtbootstrap.client.ui.TextArea; import com.github.gwtbootstrap.client.ui.TextArea;
import com.github.gwtbootstrap.client.ui.constants.LabelType; import com.github.gwtbootstrap.client.ui.constants.LabelType;
import com.github.gwtbootstrap.client.ui.constants.ResizeType;
import com.google.gwt.core.client.GWT; import com.google.gwt.core.client.GWT;
import com.google.gwt.dom.client.Style.Unit; import com.google.gwt.dom.client.Style.Unit;
import com.google.gwt.event.dom.client.ClickEvent; import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.event.dom.client.ClickHandler; import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.event.dom.client.KeyPressEvent; import com.google.gwt.event.dom.client.KeyPressEvent;
import com.google.gwt.event.dom.client.KeyPressHandler; import com.google.gwt.event.dom.client.KeyPressHandler;
import com.google.gwt.i18n.client.NumberFormat;
import com.google.gwt.uibinder.client.UiBinder; import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField; import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.user.client.Command; import com.google.gwt.user.client.Command;
@ -34,17 +39,24 @@ public class DialogGetInfoBootstrap extends Composite {
interface DialogGetInfoBootstrapUiBinder extends UiBinder<Widget, DialogGetInfoBootstrap> { interface DialogGetInfoBootstrapUiBinder extends UiBinder<Widget, DialogGetInfoBootstrap> {
} }
public static final String EMPTY = "empty";
private final NumberFormat number = ConstantsExplorer.numberFormatterKB;
public DialogGetInfoBootstrap() { public DialogGetInfoBootstrap() {
initWidget(uiBinder.createAndBindUi(this)); initWidget(uiBinder.createAndBindUi(this));
} }
public static final String UNKNOWN = "unknown"; public static final String NOT_AVAILABLE = "n.a.";
private Map<String, String> gCubeProperties; private Map<String, String> gCubeProperties;
@UiField @UiField
HorizontalPanel hpItemType; HorizontalPanel hpItemType;
@UiField
HorizontalPanel hpHeaderDetails;
@UiField @UiField
HTML txtName; HTML txtName;
@ -61,6 +73,9 @@ public class DialogGetInfoBootstrap extends Composite {
@UiField @UiField
HTML txtIsPublic; HTML txtIsPublic;
@UiField
HTML txtMimeType;
@UiField @UiField
ControlGroup cgThreddsSynched; ControlGroup cgThreddsSynched;
@ -75,26 +90,31 @@ public class DialogGetInfoBootstrap extends Composite {
@UiField @UiField
TextArea txtAreaDescription; TextArea txtAreaDescription;
@UiField
HTML txtOwner;
@UiField
HTML txtCreated;
@UiField
HTML txtLastMofication;
@UiField
HTML txtSize;
@UiField
HTML txtShared;
@UiField @UiField
Button buttonUpdateDescription; Button buttonUpdateDescription;
@UiField @UiField
Button buttonUpdateGcubeProperties; Button buttonUpdateGcubeProperties;
private FileModel fileModel; private FileModel fileModel;
/* /*
* TextField<String> txtType = new TextField<String>(); private
* TextField<String> txtCategory = new TextField<String>(); private
* TextField<String> txtOwner = new TextField<String>(); private
* TextField<String> txtLastMofication = new TextField<String>(); private
* TextField<String> txtCreated = new TextField<String>(); private
* TextField<String> txtSize = new TextField<String>(); private
* TextField<String> txtLocation = new TextField<String>(); private
* TextField<String> txtIsPublic = new TextField<String>(); private
* TextField<String> txtThreddsSynched = new TextField<String>(); private
* TextField<String> txtShared = new TextField<String>(); // private TextArea
* textAreaSharedWith = new TextArea(); private Html htmlUsersWidget = new * textAreaSharedWith = new TextArea(); private Html htmlUsersWidget = new
* Html(); private Html htmlPropertiesWidget = new Html(); private final * Html(); private Html htmlPropertiesWidget = new Html(); private final
* NumberFormat number = ConstantsExplorer.numberFormatterKB; // private * NumberFormat number = ConstantsExplorer.numberFormatterKB; // private
@ -105,6 +125,8 @@ public class DialogGetInfoBootstrap extends Composite {
public DialogGetInfoBootstrap(final FileModel fileModel) { public DialogGetInfoBootstrap(final FileModel fileModel) {
initWidget(uiBinder.createAndBindUi(this)); initWidget(uiBinder.createAndBindUi(this));
this.fileModel = fileModel; this.fileModel = fileModel;
hpHeaderDetails.add(new HTML("Details"));
hpItemType.add(fileModel.getIcon()); hpItemType.add(fileModel.getIcon());
Label labelItemType = new Label(); Label labelItemType = new Label();
@ -116,9 +138,9 @@ public class DialogGetInfoBootstrap extends Composite {
if (typeEnum != null) { if (typeEnum != null) {
label = typeEnum.getLabel(); label = typeEnum.getLabel();
label = label.replace("External ", ""); label = label.replace("External ", "");
//loading gcube properties // loading gcube properties
if(typeEnum.equals(GXTFolderItemTypeEnum.GCUBE_ITEM)) if (typeEnum.equals(GXTFolderItemTypeEnum.GCUBE_ITEM))
loadGcubeItemProperties(); loadGcubeItemProperties();
} else { } else {
@ -146,46 +168,68 @@ public class DialogGetInfoBootstrap extends Composite {
txtThreddsSynched.setVisible(true); txtThreddsSynched.setVisible(true);
htmlSetValue(txtThreddsSynched, fileModel.getSynchedThreddsStatus() + ""); htmlSetValue(txtThreddsSynched, fileModel.getSynchedThreddsStatus() + "");
txtThreddsSynched.setHTML(fileModel.getSynchedThreddsStatus() + ""); txtThreddsSynched.setHTML(fileModel.getSynchedThreddsStatus() + "");
} }
} }
//mimetype
htmlSetValue(txtMimeType, fileModel.getType());
txtAreaDescription.setResize(ResizeType.VERTICAL);
if (fileModel.isDirectory()) { if (fileModel.isDirectory()) {
txtAreaDescription.setValue(fileModel.getDescription()); txtAreaDescription.setValue(fileModel.getDescription());
// add(txtAreaDescription); // add(txtAreaDescription);
} else } else
loadDescription(fileModel.getIdentifier()); loadDescription(fileModel.getIdentifier());
//owner
htmlSetValue(txtOwner, fileModel.getOwnerFullName());
//creation date
loadCreationDate(fileModel.getIdentifier());
if(fileModel instanceof FileGridModel) {
FileGridModel fileGridModel = ((FileGridModel) fileModel);
//last update
htmlSetValue(txtLastMofication, fileGridModel.getLastModification().toString());
//size
htmlSetValue(txtSize, getFormattedSize(fileGridModel.getSize()));
}else {
loadLastModificationDate(fileModel.getIdentifier());
loadSize(fileModel.getIdentifier());
}
htmlSetValue(txtShared, fileModel.isShared()+"");
addHandlers(); addHandlers();
} }
private void addHandlers() { private void addHandlers() {
txtAreaDescription.addKeyPressHandler(new KeyPressHandler() { txtAreaDescription.addKeyPressHandler(new KeyPressHandler() {
@Override @Override
public void onKeyPress(KeyPressEvent event) { public void onKeyPress(KeyPressEvent event) {
GWT.log(event.getUnicodeCharCode()+""); GWT.log(event.getUnicodeCharCode() + "");
if(event.getUnicodeCharCode()==13) { if (event.getUnicodeCharCode() == 13) {
txtAreaDescription.setReadOnly(true); txtAreaDescription.setReadOnly(true);
Window.alert("Updating description"); Window.alert("Updating description");
} }
} }
}); });
buttonUpdateDescription.addClickHandler(new ClickHandler() { buttonUpdateDescription.addClickHandler(new ClickHandler() {
@Override @Override
public void onClick(ClickEvent event) { public void onClick(ClickEvent event) {
txtAreaDescription.setReadOnly(false); txtAreaDescription.setReadOnly(false);
txtAreaDescription.setFocus(true); txtAreaDescription.setFocus(true);
} }
}); });
final Command cmdReloadProperties = new Command() { final Command cmdReloadProperties = new Command() {
@Override @Override
@ -193,17 +237,15 @@ public class DialogGetInfoBootstrap extends Composite {
loadGcubeItemProperties(); loadGcubeItemProperties();
} }
}; };
buttonUpdateGcubeProperties.addClickHandler(new ClickHandler() { buttonUpdateGcubeProperties.addClickHandler(new ClickHandler() {
@Override @Override
public void onClick(ClickEvent event) { public void onClick(ClickEvent event) {
DialogEditProperties editProperties = new DialogEditProperties(fileModel, cmdReloadProperties); final DialogEditProperties editProperties = new DialogEditProperties(fileModel, cmdReloadProperties);
editProperties.setProperties(gCubeProperties);
editProperties.setZIndex(99999);
editProperties.show(); editProperties.show();
editProperties.setProperties(gCubeProperties);
} }
}); });
} }
@ -211,10 +253,23 @@ public class DialogGetInfoBootstrap extends Composite {
private void htmlSetValue(HTML field, String value) { private void htmlSetValue(HTML field, String value) {
if (value == null || value.isEmpty()) if (value == null || value.isEmpty())
field.setHTML(UNKNOWN); field.setHTML(NOT_AVAILABLE);
else else
field.setHTML(value); field.setHTML(value);
} }
private String getFormattedSize(long value) {
if (value > 0) {
double kb = value / 1024;
if (kb < 1)
kb = 1;
return number.format(kb);
} else if (value == 0) {
return EMPTY;
} else
return "";
}
private void loadLocation(String itemId) { private void loadLocation(String itemId) {
@ -226,7 +281,7 @@ public class DialogGetInfoBootstrap extends Composite {
public void onFailure(Throwable caught) { public void onFailure(Throwable caught) {
GWT.log("failure get list parents by item identifier " + caught); GWT.log("failure get list parents by item identifier " + caught);
removePlaceHolder(txtLocation); removePlaceHolder(txtLocation);
txtLocation.setHTML(UNKNOWN); txtLocation.setHTML(NOT_AVAILABLE);
// txtLocation.set(false); // txtLocation.set(false);
} }
@ -249,6 +304,77 @@ public class DialogGetInfoBootstrap extends Composite {
}); });
} }
private void loadSize(final String itemId) {
GWT.log("Load size");
setPlaceholder(txtSize, "loading...");
AppControllerExplorer.rpcWorkspaceService.loadSizeByItemId(itemId, new AsyncCallback<Long>() {
@Override
public void onFailure(Throwable caught) {
GWT.log("an error occured in load creation date by Id " + itemId + " " + caught.getMessage());
removePlaceHolder(txtSize);
}
@Override
public void onSuccess(Long result) {
GWT.log("Loaded size=" + result);
removePlaceHolder(txtSize);
if(result!=null)
htmlSetValue(txtSize, getFormattedSize(result));
else
htmlSetValue(txtSize, null);
}
});
}
private void loadCreationDate(final String itemId) {
setPlaceholder(txtCreated, "loading...");
AppControllerExplorer.rpcWorkspaceService.getItemCreationDateById(itemId, new AsyncCallback<Date>() {
@Override
public void onFailure(Throwable caught) {
GWT.log("an error occured in load creation date by Id " + itemId + " " + caught.getMessage());
removePlaceHolder(txtCreated);
}
@Override
public void onSuccess(Date result) {
removePlaceHolder(txtCreated);
if (result != null)
htmlSetValue(txtCreated, result.toString());
else
htmlSetValue(txtCreated, null);
}
});
}
private void loadLastModificationDate(final String itemId) {
setPlaceholder(txtLastMofication, "loading...");
AppControllerExplorer.rpcWorkspaceService.loadLastModificationDateById(itemId, new AsyncCallback<Date>() {
@Override
public void onFailure(Throwable caught) {
GWT.log("an error occured in loadLastModificationDateById " + itemId + " " + caught.getMessage());
removePlaceHolder(txtLastMofication);
}
@Override
public void onSuccess(Date result) {
removePlaceHolder(txtLastMofication);
if (result != null)
htmlSetValue(txtLastMofication, result.toString());
else
htmlSetValue(txtLastMofication, null);
}
});
}
/** /**
* @param identifier * @param identifier
@ -286,13 +412,13 @@ public class DialogGetInfoBootstrap extends Composite {
@Override @Override
public void onSuccess(Map<String, String> result) { public void onSuccess(Map<String, String> result) {
txtAreaGcubeProperties.setText(""); txtAreaGcubeProperties.setText("");
GWT.log("Gcube Item Properties: "+result); GWT.log("Gcube Item Properties: " + result);
gCubeProperties = result; gCubeProperties = result;
// unmask(); // unmask();
if(result!=null && result.size()>0) { if (result != null && result.size() > 0) {
for (String key : result.keySet()) { for (String key : result.keySet()) {
String text = txtAreaGcubeProperties.getText(); String text = txtAreaGcubeProperties.getText();
text+=key+"="+result.get(key)+";\n"; text += key + "=" + result.get(key) + ";\n";
txtAreaGcubeProperties.setText(text); txtAreaGcubeProperties.setText(text);
} }
cgGcubeProperties.setVisible(true); cgGcubeProperties.setVisible(true);
@ -303,11 +429,11 @@ public class DialogGetInfoBootstrap extends Composite {
public void onFailure(Throwable caught) { public void onFailure(Throwable caught) {
// unmask(); // unmask();
cgGcubeProperties.setVisible(false); cgGcubeProperties.setVisible(false);
GWT.log("an error occured in loadGcubeItemProperties " + fileModel.getIdentifier() + " " + caught.getMessage()); GWT.log("an error occured in loadGcubeItemProperties " + fileModel.getIdentifier() + " "
+ caught.getMessage());
} }
}); });
} }
private void setPlaceholder(HTML html, String placeholder) { private void setPlaceholder(HTML html, String placeholder) {
html.setHTML(placeholder); html.setHTML(placeholder);

View File

@ -13,6 +13,9 @@
} }
</ui:style> </ui:style>
<g:HTMLPanel> <g:HTMLPanel>
<g:HorizontalPanel ui:field="hpHeaderDetails"
addStyleNames="item-details-header">
</g:HorizontalPanel>
<g:HorizontalPanel ui:field="hpItemType" <g:HorizontalPanel ui:field="hpItemType"
addStyleNames="item-type-style"> addStyleNames="item-type-style">
</g:HorizontalPanel> </g:HorizontalPanel>
@ -56,6 +59,14 @@
</g:HTML> </g:HTML>
</b:Controls> </b:Controls>
</b:ControlGroup> </b:ControlGroup>
<b:ControlGroup
addStyleNames="my-control-group-get-info">
<b:ControlLabel>Type</b:ControlLabel>
<b:Controls>
<g:HTML ui:field="txtMimeType">
</g:HTML>
</b:Controls>
</b:ControlGroup>
<b:ControlGroup <b:ControlGroup
addStyleNames="my-control-group-get-info" addStyleNames="my-control-group-get-info"
ui:field="cgThreddsSynched" visible="false"> ui:field="cgThreddsSynched" visible="false">
@ -93,6 +104,46 @@
</b:Tooltip> </b:Tooltip>
</b:Controls> </b:Controls>
</b:ControlGroup> </b:ControlGroup>
<b:ControlGroup
addStyleNames="my-control-group-get-info">
<b:ControlLabel>Owner</b:ControlLabel>
<b:Controls>
<g:HTML ui:field="txtOwner">
</g:HTML>
</b:Controls>
</b:ControlGroup>
<b:ControlGroup
addStyleNames="my-control-group-get-info">
<b:ControlLabel>Created</b:ControlLabel>
<b:Controls>
<g:HTML ui:field="txtCreated">
</g:HTML>
</b:Controls>
</b:ControlGroup>
<b:ControlGroup
addStyleNames="my-control-group-get-info">
<b:ControlLabel>Last Mofication</b:ControlLabel>
<b:Controls>
<g:HTML ui:field="txtLastMofication">
</g:HTML>
</b:Controls>
</b:ControlGroup>
<b:ControlGroup
addStyleNames="my-control-group-get-info">
<b:ControlLabel>Size</b:ControlLabel>
<b:Controls>
<g:HTML ui:field="txtSize">
</g:HTML>
</b:Controls>
</b:ControlGroup>
<b:ControlGroup
addStyleNames="my-control-group-get-info">
<b:ControlLabel>Shared</b:ControlLabel>
<b:Controls>
<g:HTML ui:field="txtShared">
</g:HTML>
</b:Controls>
</b:ControlGroup>
<b:Alert close="false" ui:field="errorAlert" type="ERROR" <b:Alert close="false" ui:field="errorAlert" type="ERROR"
visible="false"></b:Alert> visible="false"></b:Alert>

View File

@ -316,7 +316,7 @@ table.userssuggest th {
width: 80px !important; width: 80px !important;
text-align: center !important; text-align: center !important;
padding-right: 10px !important; padding-right: 10px !important;
color: #5f6368; color: #959595;
} }
.my-control-group-get-info .add-on { .my-control-group-get-info .add-on {
@ -333,17 +333,35 @@ table.userssuggest th {
} }
.my-control-group-get-info .gwt-TextArea { .my-control-group-get-info .gwt-TextArea {
width: 350px; width: 250px;
height: 60px; height: 60px;
} }
.item-type-style { .item-type-style {
margin-top: 10px;
margin-left: 10px;
margin-bottom: 10px; margin-bottom: 10px;
background-color: #fcfcfc !important;
padding-top: 5px; padding-top: 5px;
padding-bottom: 5px; padding-bottom: 5px;
} }
.item-type-style td {
height: 30px;
}
.item-type-style td:first-child {
width: 30px;
padding-left: 5px;
}
.item-type-style td { .item-type-style td {
vertical-align: middle !important; vertical-align: middle !important;
}
.item-details-header .gwt-HTML {
font-size: 20px;
font-family: Roboto, Arial, serif !important;
color: #777;
margin: 15px;
} }