From 066d7a6b10271141b8ab6944971b1ac75b3002e8 Mon Sep 17 00:00:00 2001 From: Francesco Mangiacrapa Date: Mon, 20 Nov 2017 09:50:22 +0000 Subject: [PATCH] Task #9758: fixing git-svn-id: http://svn.d4science-ii.research-infrastructures.eu/gcube/trunk/portlets/user/workspace@158703 82a268e6-3cf1-43bd-a215-b396298e98cf --- .classpath | 6 ++--- distro/changelog.xml | 7 +++++- pom.xml | 2 +- .../toolbars/GxtToolBarItemFunctionality.java | 24 ++++++++++++------- 4 files changed, 26 insertions(+), 13 deletions(-) diff --git a/.classpath b/.classpath index 49b120d..8330ca2 100644 --- a/.classpath +++ b/.classpath @@ -1,12 +1,12 @@ - + - + @@ -34,5 +34,5 @@ - + diff --git a/distro/changelog.xml b/distro/changelog.xml index b6b24dc..276e2df 100644 --- a/distro/changelog.xml +++ b/distro/changelog.xml @@ -1,8 +1,13 @@ + + Task #9758: bug fixing + Incident #9676: fixed. Removed check on get sub-folder public - link when operation is performed by an administrator + link when operation is performed by an administrator + diff --git a/pom.xml b/pom.xml index bc30875..5850cda 100644 --- a/pom.xml +++ b/pom.xml @@ -11,7 +11,7 @@ org.gcube.portlets.user workspace war - 6.17.2-SNAPSHOT + 6.17.3-SNAPSHOT gCube Workspace Portlet gCube Workspace Portlet is a web-gui to manage the gCube workspace a collaborative area where users can exchange and organize information objects (workspace items) according to their specific needs. diff --git a/src/main/java/org/gcube/portlets/user/workspace/client/view/toolbars/GxtToolBarItemFunctionality.java b/src/main/java/org/gcube/portlets/user/workspace/client/view/toolbars/GxtToolBarItemFunctionality.java index 2844f25..f626cee 100644 --- a/src/main/java/org/gcube/portlets/user/workspace/client/view/toolbars/GxtToolBarItemFunctionality.java +++ b/src/main/java/org/gcube/portlets/user/workspace/client/view/toolbars/GxtToolBarItemFunctionality.java @@ -388,7 +388,14 @@ public class GxtToolBarItemFunctionality { public void componentSelected(ButtonEvent ce) { final FileGridModel fileGridModel = gridGroupViewContainer.getSelectedItem(); - FileModel parentTarget = getDirectoryOrParent(fileGridModel); + FileModel parentTarget = getParentDirectory(fileGridModel); + + if(parentTarget==null) + if(fileGridModel.isDirectory()){ + GWT.log("Forcing internal pasting.."); + parentTarget = fileGridModel; + } + String parentId = null; @@ -632,19 +639,20 @@ public class GxtToolBarItemFunctionality { } + /** - * The method return input file model if is directory otherwise parent of file model. + * Gets the parent directory. * * @param fileModel the file model - * @return the directory or parent + * @return the parent directory */ - private FileModel getDirectoryOrParent(FileGridModel fileModel){ + private FileModel getParentDirectory(FileGridModel fileModel){ if(fileModel!=null){ - if(fileModel.isDirectory()) - return fileModel; - else - return fileModel.getParentFileModel(); +// if(fileModel.isDirectory()) +// return fileModel; +// else + return fileModel.getParentFileModel(); } return null;