enhancements on VRE folder management
git-svn-id: http://svn.d4science-ii.research-infrastructures.eu/gcube/trunk/portlets/user/workspace-tree-widget@91540 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
895c4b33d4
commit
5172556090
|
@ -207,11 +207,14 @@ public class FileModel extends BaseModelData implements Serializable {
|
|||
|
||||
}else if(this.isShared()){ //SHARED ITEM?
|
||||
|
||||
if(this.isShareable()) //IS ROOT SHARED FOLDER
|
||||
absImgPr = Resources.getIconSharedFolder();
|
||||
else
|
||||
absImgPr = Resources.getIconFolder(); //IS A DESCENDANT
|
||||
|
||||
if(this.isVreFolder())
|
||||
absImgPr = Resources.getIconVREFolder();
|
||||
else{
|
||||
if(this.isShareable()) //IS ROOT SHARED FOLDER
|
||||
absImgPr = Resources.getIconSharedFolder();
|
||||
else
|
||||
absImgPr = Resources.getIconFolder(); //IS A DESCENDANT
|
||||
}
|
||||
|
||||
}else if(this.getStatus() == ConstantsExplorer.FOLDERNOTLOAD){ //IS A FOLDER IN LOADING
|
||||
absImgPr = Resources.getIconLoading2();
|
||||
|
|
|
@ -17,10 +17,12 @@ public class FolderModel extends FileModel {
|
|||
|
||||
public FolderModel(String identifier, String name, FileModel parent, boolean isDirectory, boolean isShared, boolean isVreFolder) {
|
||||
super(identifier, name, parent, isDirectory, isShared);
|
||||
super.setVreFolder(isVreFolder);
|
||||
}
|
||||
|
||||
public FolderModel(String identifier, String name, boolean isDirectory, boolean isVreFolder) {
|
||||
super(identifier, name, isDirectory);
|
||||
super.setVreFolder(isVreFolder);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -298,5 +298,8 @@ public interface Icons extends ClientBundle {
|
|||
|
||||
@Source("icons/writeall.png")
|
||||
ImageResource writeall();
|
||||
|
||||
@Source("icons/vrefolder.png")
|
||||
ImageResource vreFolder();
|
||||
}
|
||||
|
||||
|
|
|
@ -60,6 +60,11 @@ public class Resources {
|
|||
return AbstractImagePrototype.create(ICONS.createNew());
|
||||
}
|
||||
|
||||
public static AbstractImagePrototype getIconVREFolder(){
|
||||
|
||||
return AbstractImagePrototype.create(ICONS.vreFolder());
|
||||
}
|
||||
|
||||
public static AbstractImagePrototype getIconPpt(){
|
||||
|
||||
return AbstractImagePrototype.create(ICONS.ppt());
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 421 B |
|
@ -151,6 +151,10 @@ public class AsyncTreePanel extends LayoutContainer {
|
|||
if(model.getStatus() == ConstantsExplorer.FOLDERNOTLOAD)
|
||||
return Resources.getIconLoading2();
|
||||
|
||||
if(model.isVreFolder()){
|
||||
|
||||
return Resources.getIconVREFolder();
|
||||
}
|
||||
//SHARE ICON
|
||||
if(model.isShared()){
|
||||
if(model.isShareable())
|
||||
|
|
|
@ -710,8 +710,8 @@ public class ContextMenuTree {
|
|||
contextMenu.getItemByItemId(WorkspaceOperation.SHARE_LINK.getId()).setVisible(true);
|
||||
}
|
||||
|
||||
/*
|
||||
if(selectedItem.isBaseVREFolder()){
|
||||
//IS VRE FOLDER?
|
||||
if(selectedItem.isVreFolder()){
|
||||
|
||||
contextMenu.getItemByItemId(WorkspaceOperation.SHARE.getId()).setVisible(false); //SHARE
|
||||
contextMenu.getItemByItemId(WorkspaceOperation.INSERT_SHARED_FOLDER.getId()).setVisible(false); //insert shared folder
|
||||
|
@ -719,7 +719,7 @@ public class ContextMenuTree {
|
|||
contextMenu.getItemByItemId(WorkspaceOperation.RENAME.getId()).setVisible(false); //UNSHARE
|
||||
contextMenu.getItemByItemId(WorkspaceOperation.REMOVE.getId()).setVisible(false); //UNSHARE
|
||||
return;
|
||||
}*/
|
||||
}
|
||||
|
||||
//CASE DIRECTORY
|
||||
if(selectedItem.isDirectory()){
|
||||
|
|
|
@ -860,8 +860,10 @@ public class GWTWorkspaceBuilder {
|
|||
|
||||
case SHARED_FOLDER:
|
||||
|
||||
WorkspaceSharedFolder sharedFolder = (WorkspaceSharedFolder) item;
|
||||
fileModel = new FolderModel(item.getId(), item.getName(), true, sharedFolder.isVreFolder());
|
||||
WorkspaceSharedFolder shared = (WorkspaceSharedFolder) item;
|
||||
String name = shared.isVreFolder()?shared.getDisplayName():item.getName();
|
||||
|
||||
fileModel = new FolderModel(item.getId(), name, true, shared.isVreFolder());
|
||||
fileModel.setShared(true);
|
||||
fileModel.setType(GXTFolderItemTypeEnum.SHARED_FOLDER.toString());
|
||||
|
||||
|
@ -952,7 +954,7 @@ public class GWTWorkspaceBuilder {
|
|||
case SHARED_FOLDER:
|
||||
WorkspaceSharedFolder shared = (WorkspaceSharedFolder) item;
|
||||
String name = shared.isVreFolder()?shared.getDisplayName():item.getName();
|
||||
fileModel = new FolderModel(item.getId(), name, (FolderModel) parentFolderModel, true, true,shared.isVreFolder());
|
||||
fileModel = new FolderModel(item.getId(), name, (FolderModel) parentFolderModel, true, true, shared.isVreFolder());
|
||||
fileModel.setType(GXTFolderItemTypeEnum.SHARED_FOLDER.toString());
|
||||
fileModel.setShareable(true);
|
||||
fileModel.setDescription(item.getDescription());
|
||||
|
|
Loading…
Reference in New Issue