|
|
|
@ -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());
|
|
|
|
|