enhancements on trash
git-svn-id: http://svn.d4science-ii.research-infrastructures.eu/gcube/trunk/portlets/user/workspace-tree-widget@95646 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
beeb3186fb
commit
6245d850a8
|
@ -19,10 +19,10 @@ public class TrashEvent extends GwtEvent<TrashEventHandler> implements GuiEventI
|
||||||
|
|
||||||
public static Type<TrashEventHandler> TYPE = new Type<TrashEventHandler>();
|
public static Type<TrashEventHandler> TYPE = new Type<TrashEventHandler>();
|
||||||
|
|
||||||
private List<FileModel> targetFileModels;
|
private List<? extends FileModel> targetFileModels;
|
||||||
private WorkspaceTrashOperation trashOperation;
|
private WorkspaceTrashOperation trashOperation;
|
||||||
|
|
||||||
public TrashEvent(WorkspaceTrashOperation trashOperation, List<FileModel> targets) {
|
public TrashEvent(WorkspaceTrashOperation trashOperation, List<? extends FileModel> targets) {
|
||||||
this.trashOperation = trashOperation;
|
this.trashOperation = trashOperation;
|
||||||
this.setTargetFileModels(targets);
|
this.setTargetFileModels(targets);
|
||||||
}
|
}
|
||||||
|
@ -50,11 +50,12 @@ public class TrashEvent extends GwtEvent<TrashEventHandler> implements GuiEventI
|
||||||
this.trashOperation = trashOperation;
|
this.trashOperation = trashOperation;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
public List<FileModel> getTargetFileModels() {
|
public List<FileModel> getTargetFileModels() {
|
||||||
return targetFileModels;
|
return (List<FileModel>) targetFileModels;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setTargetFileModels(List<FileModel> targetFileModels) {
|
public void setTargetFileModels( List<? extends FileModel> targetFileModels) {
|
||||||
this.targetFileModels = targetFileModels;
|
this.targetFileModels = targetFileModels;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -287,8 +287,11 @@ public interface Icons extends ClientBundle {
|
||||||
@Source("icons/sharelink.png")
|
@Source("icons/sharelink.png")
|
||||||
ImageResource publicLink();
|
ImageResource publicLink();
|
||||||
|
|
||||||
@Source("icons/trash.png")
|
@Source("icons/user_trash_full.png")
|
||||||
ImageResource trash();
|
ImageResource trash_full();
|
||||||
|
|
||||||
|
@Source("icons/user_trash.png")
|
||||||
|
ImageResource trash_empty();
|
||||||
|
|
||||||
@Source("icons/readonly.png")
|
@Source("icons/readonly.png")
|
||||||
ImageResource readonly();
|
ImageResource readonly();
|
||||||
|
@ -313,5 +316,19 @@ public interface Icons extends ClientBundle {
|
||||||
|
|
||||||
@Source("icons/sharegroup.png")
|
@Source("icons/sharegroup.png")
|
||||||
ImageResource groupusers();
|
ImageResource groupusers();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Source("icons/undo.png")
|
||||||
|
ImageResource undo();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Source("icons/recycle.png")
|
||||||
|
ImageResource recycle();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -45,14 +45,29 @@ public class Resources {
|
||||||
return AbstractImagePrototype.create(ICONS.table());
|
return AbstractImagePrototype.create(ICONS.table());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static AbstractImagePrototype getIconRecycle(){
|
||||||
|
|
||||||
|
return AbstractImagePrototype.create(ICONS.recycle());
|
||||||
|
}
|
||||||
|
|
||||||
|
public static AbstractImagePrototype getIconUndo(){
|
||||||
|
|
||||||
|
return AbstractImagePrototype.create(ICONS.undo());
|
||||||
|
}
|
||||||
|
|
||||||
public static AbstractImagePrototype getIconShareLink(){
|
public static AbstractImagePrototype getIconShareLink(){
|
||||||
|
|
||||||
return AbstractImagePrototype.create(ICONS.shareLink());
|
return AbstractImagePrototype.create(ICONS.shareLink());
|
||||||
}
|
}
|
||||||
|
|
||||||
public static AbstractImagePrototype getTrash(){
|
public static AbstractImagePrototype getTrashFull(){
|
||||||
|
|
||||||
return AbstractImagePrototype.create(ICONS.trash());
|
return AbstractImagePrototype.create(ICONS.trash_full());
|
||||||
|
}
|
||||||
|
|
||||||
|
public static AbstractImagePrototype getTrashEmpty(){
|
||||||
|
|
||||||
|
return AbstractImagePrototype.create(ICONS.trash_empty());
|
||||||
}
|
}
|
||||||
|
|
||||||
public static AbstractImagePrototype getIconCreateNew(){
|
public static AbstractImagePrototype getIconCreateNew(){
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 952 B |
Binary file not shown.
After Width: | Height: | Size: 649 B |
Binary file not shown.
After Width: | Height: | Size: 655 B |
Binary file not shown.
After Width: | Height: | Size: 786 B |
|
@ -2235,8 +2235,11 @@ public class GWTWorkspaceBuilder {
|
||||||
FileTrashedModel fileTrashModel = new FileTrashedModel();
|
FileTrashedModel fileTrashModel = new FileTrashedModel();
|
||||||
fileTrashModel.setName(trashedItem.getName());
|
fileTrashModel.setName(trashedItem.getName());
|
||||||
|
|
||||||
|
fileTrashModel.setIdentifier(trashedItem.getOriginalParentId()+trashedItem.getName()); //CALCULATED ID
|
||||||
|
|
||||||
//SETTING PARENT
|
//SETTING PARENT
|
||||||
FileModel oldParent = new FileModel(trashedItem.getOriginalParentId(), "", true);
|
FileModel oldParent = new FileModel(trashedItem.getOriginalParentId(), "", true);
|
||||||
|
|
||||||
fileTrashModel.setOrginalPath(trashedItem.getDeletedFrom());
|
fileTrashModel.setOrginalPath(trashedItem.getDeletedFrom());
|
||||||
fileTrashModel.setParentFileModel(oldParent);
|
fileTrashModel.setParentFileModel(oldParent);
|
||||||
|
|
||||||
|
|
|
@ -19,9 +19,9 @@ public enum WorkspaceTrashOperation {
|
||||||
|
|
||||||
//CALLING OPERATION SERVER
|
//CALLING OPERATION SERVER
|
||||||
REFRESH("Refresh", "Refresh trash content"),
|
REFRESH("Refresh", "Refresh trash content"),
|
||||||
RESTORE("Restore", "Restore the trash item"),
|
RESTORE("Restore", "Restore the trash item/s (selected)"),
|
||||||
RESTORE_ALL("Restore All", "Restore all trash content"),
|
RESTORE_ALL("Restore All", "Restore all trash content"),
|
||||||
DELETE_PERMANENTLY("Delete Permanently", "Delete Permanently the trash item"),
|
DELETE_PERMANENTLY("Delete Permanently", "Delete Permanently the trash item/s (selected)"),
|
||||||
EMPTY_TRASH("Empty", "Empty definitively trash content");
|
EMPTY_TRASH("Empty", "Empty definitively trash content");
|
||||||
|
|
||||||
public String label;
|
public String label;
|
||||||
|
|
Loading…
Reference in New Issue