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?
|
}else if(this.isShared()){ //SHARED ITEM?
|
||||||
|
|
||||||
|
if(this.isVreFolder())
|
||||||
|
absImgPr = Resources.getIconVREFolder();
|
||||||
|
else{
|
||||||
if(this.isShareable()) //IS ROOT SHARED FOLDER
|
if(this.isShareable()) //IS ROOT SHARED FOLDER
|
||||||
absImgPr = Resources.getIconSharedFolder();
|
absImgPr = Resources.getIconSharedFolder();
|
||||||
else
|
else
|
||||||
absImgPr = Resources.getIconFolder(); //IS A DESCENDANT
|
absImgPr = Resources.getIconFolder(); //IS A DESCENDANT
|
||||||
|
}
|
||||||
|
|
||||||
}else if(this.getStatus() == ConstantsExplorer.FOLDERNOTLOAD){ //IS A FOLDER IN LOADING
|
}else if(this.getStatus() == ConstantsExplorer.FOLDERNOTLOAD){ //IS A FOLDER IN LOADING
|
||||||
absImgPr = Resources.getIconLoading2();
|
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) {
|
public FolderModel(String identifier, String name, FileModel parent, boolean isDirectory, boolean isShared, boolean isVreFolder) {
|
||||||
super(identifier, name, parent, isDirectory, isShared);
|
super(identifier, name, parent, isDirectory, isShared);
|
||||||
|
super.setVreFolder(isVreFolder);
|
||||||
}
|
}
|
||||||
|
|
||||||
public FolderModel(String identifier, String name, boolean isDirectory, boolean isVreFolder) {
|
public FolderModel(String identifier, String name, boolean isDirectory, boolean isVreFolder) {
|
||||||
super(identifier, name, isDirectory);
|
super(identifier, name, isDirectory);
|
||||||
|
super.setVreFolder(isVreFolder);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -298,5 +298,8 @@ public interface Icons extends ClientBundle {
|
||||||
|
|
||||||
@Source("icons/writeall.png")
|
@Source("icons/writeall.png")
|
||||||
ImageResource writeall();
|
ImageResource writeall();
|
||||||
|
|
||||||
|
@Source("icons/vrefolder.png")
|
||||||
|
ImageResource vreFolder();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -60,6 +60,11 @@ public class Resources {
|
||||||
return AbstractImagePrototype.create(ICONS.createNew());
|
return AbstractImagePrototype.create(ICONS.createNew());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static AbstractImagePrototype getIconVREFolder(){
|
||||||
|
|
||||||
|
return AbstractImagePrototype.create(ICONS.vreFolder());
|
||||||
|
}
|
||||||
|
|
||||||
public static AbstractImagePrototype getIconPpt(){
|
public static AbstractImagePrototype getIconPpt(){
|
||||||
|
|
||||||
return AbstractImagePrototype.create(ICONS.ppt());
|
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)
|
if(model.getStatus() == ConstantsExplorer.FOLDERNOTLOAD)
|
||||||
return Resources.getIconLoading2();
|
return Resources.getIconLoading2();
|
||||||
|
|
||||||
|
if(model.isVreFolder()){
|
||||||
|
|
||||||
|
return Resources.getIconVREFolder();
|
||||||
|
}
|
||||||
//SHARE ICON
|
//SHARE ICON
|
||||||
if(model.isShared()){
|
if(model.isShared()){
|
||||||
if(model.isShareable())
|
if(model.isShareable())
|
||||||
|
|
|
@ -710,8 +710,8 @@ public class ContextMenuTree {
|
||||||
contextMenu.getItemByItemId(WorkspaceOperation.SHARE_LINK.getId()).setVisible(true);
|
contextMenu.getItemByItemId(WorkspaceOperation.SHARE_LINK.getId()).setVisible(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
//IS VRE FOLDER?
|
||||||
if(selectedItem.isBaseVREFolder()){
|
if(selectedItem.isVreFolder()){
|
||||||
|
|
||||||
contextMenu.getItemByItemId(WorkspaceOperation.SHARE.getId()).setVisible(false); //SHARE
|
contextMenu.getItemByItemId(WorkspaceOperation.SHARE.getId()).setVisible(false); //SHARE
|
||||||
contextMenu.getItemByItemId(WorkspaceOperation.INSERT_SHARED_FOLDER.getId()).setVisible(false); //insert shared folder
|
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.RENAME.getId()).setVisible(false); //UNSHARE
|
||||||
contextMenu.getItemByItemId(WorkspaceOperation.REMOVE.getId()).setVisible(false); //UNSHARE
|
contextMenu.getItemByItemId(WorkspaceOperation.REMOVE.getId()).setVisible(false); //UNSHARE
|
||||||
return;
|
return;
|
||||||
}*/
|
}
|
||||||
|
|
||||||
//CASE DIRECTORY
|
//CASE DIRECTORY
|
||||||
if(selectedItem.isDirectory()){
|
if(selectedItem.isDirectory()){
|
||||||
|
|
|
@ -860,8 +860,10 @@ public class GWTWorkspaceBuilder {
|
||||||
|
|
||||||
case SHARED_FOLDER:
|
case SHARED_FOLDER:
|
||||||
|
|
||||||
WorkspaceSharedFolder sharedFolder = (WorkspaceSharedFolder) item;
|
WorkspaceSharedFolder shared = (WorkspaceSharedFolder) item;
|
||||||
fileModel = new FolderModel(item.getId(), item.getName(), true, sharedFolder.isVreFolder());
|
String name = shared.isVreFolder()?shared.getDisplayName():item.getName();
|
||||||
|
|
||||||
|
fileModel = new FolderModel(item.getId(), name, true, shared.isVreFolder());
|
||||||
fileModel.setShared(true);
|
fileModel.setShared(true);
|
||||||
fileModel.setType(GXTFolderItemTypeEnum.SHARED_FOLDER.toString());
|
fileModel.setType(GXTFolderItemTypeEnum.SHARED_FOLDER.toString());
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue