Updated GetInfo adding Public Folder
git-svn-id: http://svn.d4science-ii.research-infrastructures.eu/gcube/trunk/portlets/user/workspace-tree-widget@131411 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
51df7faa73
commit
9c1205118a
|
@ -292,7 +292,7 @@ public class FileModel extends BaseModelData implements Serializable {
|
||||||
|
|
||||||
}else if(this.isShared()){ //IS A SHARED FOLDER?
|
}else if(this.isShared()){ //IS A SHARED FOLDER?
|
||||||
|
|
||||||
GWT.log("setting icon is shared: "+this.isShared() + ", this.isVreFolder() "+this.isVreFolder() +", this.isShareable() "+this.isShareable());
|
GWT.log("setting icon "+this.getName()+" is shared: "+this.isShared() + ", this.isVreFolder() "+this.isVreFolder() +", this.isShareable() "+this.isShareable());
|
||||||
|
|
||||||
if(this.isVreFolder())
|
if(this.isVreFolder())
|
||||||
absImgPr = Resources.getIconVREFolder();
|
absImgPr = Resources.getIconVREFolder();
|
||||||
|
@ -304,7 +304,7 @@ public class FileModel extends BaseModelData implements Serializable {
|
||||||
absImgPr = Resources.getIconSharedFolder();
|
absImgPr = Resources.getIconSharedFolder();
|
||||||
}else{ //IS A DESCENDANT
|
}else{ //IS A DESCENDANT
|
||||||
if(this.isPublic()) //IS PLUBIC
|
if(this.isPublic()) //IS PLUBIC
|
||||||
Resources.getIconFolderPublic();
|
absImgPr = Resources.getIconFolderPublic();
|
||||||
else
|
else
|
||||||
absImgPr = Resources.getIconFolder(); //IS A PRIVATE FOLDER
|
absImgPr = Resources.getIconFolder(); //IS A PRIVATE FOLDER
|
||||||
}
|
}
|
||||||
|
|
|
@ -1534,8 +1534,6 @@ public class Resources {
|
||||||
return Resources.getIconWorkflowReport();
|
return Resources.getIconWorkflowReport();
|
||||||
}else if(itemType.equals(GXTFolderItemTypeEnum.WORKFLOW_TEMPLATE)){
|
}else if(itemType.equals(GXTFolderItemTypeEnum.WORKFLOW_TEMPLATE)){
|
||||||
return Resources.getIconWorkflowTemplate();
|
return Resources.getIconWorkflowTemplate();
|
||||||
}else if(itemType.equals(GXTFolderItemTypeEnum.FOLDER)){
|
|
||||||
return Resources.getIconFolder();
|
|
||||||
}else if(itemType.equals(GXTFolderItemTypeEnum.EXTERNAL_RESOURCE_LINK)){
|
}else if(itemType.equals(GXTFolderItemTypeEnum.EXTERNAL_RESOURCE_LINK)){
|
||||||
return Resources.getIconResourceLink();
|
return Resources.getIconResourceLink();
|
||||||
}
|
}
|
||||||
|
|
|
@ -52,6 +52,7 @@ public class DialogGetInfo extends Dialog {
|
||||||
private TextField<String> txtCreated = new TextField<String>();
|
private TextField<String> txtCreated = new TextField<String>();
|
||||||
private TextField<String> txtSize = new TextField<String>();
|
private TextField<String> txtSize = new TextField<String>();
|
||||||
private TextField<String> txtLocation = new TextField<String>();
|
private TextField<String> txtLocation = new TextField<String>();
|
||||||
|
private TextField<String> txtIsPublic = new TextField<String>();
|
||||||
private TextField<String> txtShared = new TextField<String>();
|
private TextField<String> txtShared = new TextField<String>();
|
||||||
// private TextArea textAreaSharedWith = new TextArea();
|
// private TextArea textAreaSharedWith = new TextArea();
|
||||||
private Html htmlUsersWidget = new Html();
|
private Html htmlUsersWidget = new Html();
|
||||||
|
@ -96,6 +97,14 @@ public class DialogGetInfo extends Dialog {
|
||||||
|
|
||||||
add(txtLocation);
|
add(txtLocation);
|
||||||
|
|
||||||
|
if(fileModel.isDirectory()){
|
||||||
|
txtIsPublic = new TextField<String>();
|
||||||
|
txtIsPublic.setFieldLabel("Public Folder");
|
||||||
|
txtIsPublic.setReadOnly(true);
|
||||||
|
txtIsPublic.setValue(fileModel.isPublic()+"");
|
||||||
|
add(txtIsPublic);
|
||||||
|
}
|
||||||
|
|
||||||
txtAreaDescription.setFieldLabel("Description");
|
txtAreaDescription.setFieldLabel("Description");
|
||||||
txtAreaDescription.setHeight(30);
|
txtAreaDescription.setHeight(30);
|
||||||
txtAreaDescription.setReadOnly(true);
|
txtAreaDescription.setReadOnly(true);
|
||||||
|
|
|
@ -56,7 +56,6 @@ public class DialogGetLink extends Dialog {
|
||||||
public DialogGetLink(String headingTxt, final FileModel item, Link_Type type) {
|
public DialogGetLink(String headingTxt, final FileModel item, Link_Type type) {
|
||||||
this.item = item;
|
this.item = item;
|
||||||
setButtonAlign(HorizontalAlignment.CENTER);
|
setButtonAlign(HorizontalAlignment.CENTER);
|
||||||
setIcon(Resources.getIconPublicLink());
|
|
||||||
vp.setHorizontalAlign(HorizontalAlignment.CENTER);
|
vp.setHorizontalAlign(HorizontalAlignment.CENTER);
|
||||||
vp.setVerticalAlign(VerticalAlignment.MIDDLE);
|
vp.setVerticalAlign(VerticalAlignment.MIDDLE);
|
||||||
vp.getElement().getStyle().setPadding(1, Unit.PX);
|
vp.getElement().getStyle().setPadding(1, Unit.PX);
|
||||||
|
@ -95,6 +94,7 @@ public class DialogGetLink extends Dialog {
|
||||||
case PUBLIC_LINK:
|
case PUBLIC_LINK:
|
||||||
|
|
||||||
vp.mask("Getting Public Link...");
|
vp.mask("Getting Public Link...");
|
||||||
|
setIcon(Resources.getIconPublicLink());
|
||||||
|
|
||||||
if(item.getIdentifier()!=null && !item.getIdentifier().isEmpty()){
|
if(item.getIdentifier()!=null && !item.getIdentifier().isEmpty()){
|
||||||
AppControllerExplorer.rpcWorkspaceService.getPublicLinkForFolderItemId(item.getIdentifier(), true, new AsyncCallback<PublicLink>() {
|
AppControllerExplorer.rpcWorkspaceService.getPublicLinkForFolderItemId(item.getIdentifier(), true, new AsyncCallback<PublicLink>() {
|
||||||
|
@ -129,6 +129,11 @@ public class DialogGetLink extends Dialog {
|
||||||
case FOLDER_LINK:
|
case FOLDER_LINK:
|
||||||
|
|
||||||
vp.mask("Getting Folder Link... checking permissions");
|
vp.mask("Getting Folder Link... checking permissions");
|
||||||
|
if(item.isShared()){
|
||||||
|
setIcon(Resources.getIconFolderSharedPublic());
|
||||||
|
}else
|
||||||
|
setIcon(Resources.getIconFolderPublic());
|
||||||
|
|
||||||
if(item.getIdentifier()!=null && !item.getIdentifier().isEmpty()){
|
if(item.getIdentifier()!=null && !item.getIdentifier().isEmpty()){
|
||||||
AppControllerExplorer.rpcWorkspaceService.getOwnerByItemId(item.getIdentifier(), new AsyncCallback<InfoContactModel>() {
|
AppControllerExplorer.rpcWorkspaceService.getOwnerByItemId(item.getIdentifier(), new AsyncCallback<InfoContactModel>() {
|
||||||
|
|
||||||
|
|
|
@ -574,7 +574,7 @@ public class GWTWorkspaceBuilder {
|
||||||
switch (item.getType()) {
|
switch (item.getType()) {
|
||||||
|
|
||||||
case FOLDER: fileModel = new FolderModel(item.getId(), item.getName(), true, false);
|
case FOLDER: fileModel = new FolderModel(item.getId(), item.getName(), true, false);
|
||||||
fileModel.setType(GXTFolderItemTypeEnum.FOLDER.toString());
|
fileModel.setType(GXTFolderItemTypeEnum.FOLDER.getLabel());
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case FOLDER_ITEM:
|
case FOLDER_ITEM:
|
||||||
|
@ -590,7 +590,7 @@ public class GWTWorkspaceBuilder {
|
||||||
|
|
||||||
fileModel = new FolderModel(item.getId(), name, true, shared.isVreFolder());
|
fileModel = new FolderModel(item.getId(), name, true, shared.isVreFolder());
|
||||||
fileModel.setShared(true);
|
fileModel.setShared(true);
|
||||||
fileModel.setType(GXTFolderItemTypeEnum.FOLDER_SHARED.toString());
|
fileModel.setType(GXTFolderItemTypeEnum.FOLDER_SHARED.getLabel());
|
||||||
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
@ -681,11 +681,11 @@ public class GWTWorkspaceBuilder {
|
||||||
boolean isPublic = ((WorkspaceFolder) item).isPublic();
|
boolean isPublic = ((WorkspaceFolder) item).isPublic();
|
||||||
fileModel = new FolderModel(item.getId(), item.getName(), parentFolderModel, true, false, false, isPublic);
|
fileModel = new FolderModel(item.getId(), item.getName(), parentFolderModel, true, false, false, isPublic);
|
||||||
if(isPublic)
|
if(isPublic)
|
||||||
fileModel.setType(GXTFolderItemTypeEnum.FOLDER_PUBLIC.toString());
|
fileModel.setType(GXTFolderItemTypeEnum.FOLDER_PUBLIC.getLabel());
|
||||||
else
|
else
|
||||||
fileModel.setType(GXTFolderItemTypeEnum.FOLDER.toString());
|
fileModel.setType(GXTFolderItemTypeEnum.FOLDER.getLabel());
|
||||||
|
|
||||||
fileModel.setType(GXTFolderItemTypeEnum.FOLDER.toString());
|
fileModel.setType(GXTFolderItemTypeEnum.FOLDER.getLabel());
|
||||||
fileModel.setShareable(true);
|
fileModel.setShareable(true);
|
||||||
fileModel.setDescription(item.getDescription());
|
fileModel.setDescription(item.getDescription());
|
||||||
break;
|
break;
|
||||||
|
@ -764,7 +764,7 @@ public class GWTWorkspaceBuilder {
|
||||||
|
|
||||||
case FOLDER:
|
case FOLDER:
|
||||||
fileGridModel = new FolderGridModel(item.getId(), item.getName(), toDate(item.getLastModified()), parentFileModel, -1, true, false,false, false);
|
fileGridModel = new FolderGridModel(item.getId(), item.getName(), toDate(item.getLastModified()), parentFileModel, -1, true, false,false, false);
|
||||||
fileGridModel.setType(GXTFolderItemTypeEnum.FOLDER.toString());
|
fileGridModel.setType(GXTFolderItemTypeEnum.FOLDER.getLabel());
|
||||||
fileGridModel.setShortcutCategory(GXTCategoryItemInterface.SMF_FOLDERS);
|
fileGridModel.setShortcutCategory(GXTCategoryItemInterface.SMF_FOLDERS);
|
||||||
fileGridModel.setShareable(true);
|
fileGridModel.setShareable(true);
|
||||||
break;
|
break;
|
||||||
|
@ -778,7 +778,7 @@ public class GWTWorkspaceBuilder {
|
||||||
case SHARED_FOLDER:
|
case SHARED_FOLDER:
|
||||||
//ATTENTION: SEARCH ITEM IS NOT CASTABLE AT WorkspaceSharedFolder
|
//ATTENTION: SEARCH ITEM IS NOT CASTABLE AT WorkspaceSharedFolder
|
||||||
fileGridModel = new FolderGridModel(item.getId(), item.getName(), toDate(item.getLastModified()), parentFileModel, -1, true, true, item.isVreFolder(), false);
|
fileGridModel = new FolderGridModel(item.getId(), item.getName(), toDate(item.getLastModified()), parentFileModel, -1, true, true, item.isVreFolder(), false);
|
||||||
fileGridModel.setType(GXTFolderItemTypeEnum.FOLDER_SHARED.toString());
|
fileGridModel.setType(GXTFolderItemTypeEnum.FOLDER_SHARED.getLabel());
|
||||||
fileGridModel.setShortcutCategory(GXTCategoryItemInterface.SMF_SHARED_FOLDERS);
|
fileGridModel.setShortcutCategory(GXTCategoryItemInterface.SMF_SHARED_FOLDERS);
|
||||||
fileGridModel.setShareable(true);
|
fileGridModel.setShareable(true);
|
||||||
break;
|
break;
|
||||||
|
@ -857,9 +857,9 @@ public class GWTWorkspaceBuilder {
|
||||||
boolean isPublic = ((WorkspaceFolder)item).isPublic();
|
boolean isPublic = ((WorkspaceFolder)item).isPublic();
|
||||||
fileGridModel = new FolderGridModel(item.getId(), item.getName(), toDate(item.getLastModificationTime()), parentFileModel, -1, true, false,false, isPublic);
|
fileGridModel = new FolderGridModel(item.getId(), item.getName(), toDate(item.getLastModificationTime()), parentFileModel, -1, true, false,false, isPublic);
|
||||||
if(isPublic)
|
if(isPublic)
|
||||||
fileGridModel.setType(GXTFolderItemTypeEnum.FOLDER_PUBLIC.toString());
|
fileGridModel.setType(GXTFolderItemTypeEnum.FOLDER_PUBLIC.getLabel().toString());
|
||||||
else
|
else
|
||||||
fileGridModel.setType(GXTFolderItemTypeEnum.FOLDER.toString());
|
fileGridModel.setType(GXTFolderItemTypeEnum.FOLDER.getLabel().toString());
|
||||||
|
|
||||||
fileGridModel.setShortcutCategory(GXTCategoryItemInterface.SMF_FOLDERS);
|
fileGridModel.setShortcutCategory(GXTCategoryItemInterface.SMF_FOLDERS);
|
||||||
fileGridModel.setShareable(true);
|
fileGridModel.setShareable(true);
|
||||||
|
@ -879,9 +879,9 @@ public class GWTWorkspaceBuilder {
|
||||||
fileGridModel = new FolderGridModel(item.getId(), name, toDate(item.getLastModificationTime()), parentFileModel, -1, true, true, shared.isVreFolder(), isPublic);
|
fileGridModel = new FolderGridModel(item.getId(), name, toDate(item.getLastModificationTime()), parentFileModel, -1, true, true, shared.isVreFolder(), isPublic);
|
||||||
|
|
||||||
if(isPublic)
|
if(isPublic)
|
||||||
fileGridModel.setType(GXTFolderItemTypeEnum.FOLDER_SHARED_PUBLIC.toString());
|
fileGridModel.setType(GXTFolderItemTypeEnum.FOLDER_SHARED_PUBLIC.getLabel().toString());
|
||||||
else
|
else
|
||||||
fileGridModel.setType(GXTFolderItemTypeEnum.FOLDER_SHARED.toString());
|
fileGridModel.setType(GXTFolderItemTypeEnum.FOLDER_SHARED.getLabel().toString());
|
||||||
|
|
||||||
fileGridModel.setShortcutCategory(GXTCategoryItemInterface.SMF_SHARED_FOLDERS);
|
fileGridModel.setShortcutCategory(GXTCategoryItemInterface.SMF_SHARED_FOLDERS);
|
||||||
fileGridModel.setShareable(true);
|
fileGridModel.setShareable(true);
|
||||||
|
|
Loading…
Reference in New Issue