working on copy

git-svn-id: http://svn.d4science-ii.research-infrastructures.eu/gcube/trunk/portlets/user/workspace@173230 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Francesco Mangiacrapa 2018-10-10 16:42:44 +00:00
parent 6285a31c94
commit 9a3a772961
1 changed files with 17 additions and 9 deletions

View File

@ -1960,28 +1960,28 @@ public class AppController implements SubscriberInterface {
* @see org.gcube.portlets.user.workspace.client.interfaces.SubscriberInterface#pasteEventIsCompleted()
*/
@Override
public void moveEventIsCompleted(boolean refreshingTheTree, String parentId) {
public void moveEventIsCompleted(boolean refreshingTheTree, String destinationFolderId) {
wsPortlet.getGridGroupContainer().unmask();
if(refreshingTheTree){
wsPortlet.getGridGroupContainer().unmask();
}else{ //FORCE GRID REFRESH
FileModel theFolder = wsPortlet.getToolBarPath().getParentFolder(parentId);
FileModel theFolder = wsPortlet.getToolBarPath().getParentFolder(destinationFolderId);
GWT.log("moveEventIsCompleted tree is not refreshable");
if(theFolder!=null){
//THE FOLDER IS IN THE BREADCRUMB
GWT.log("Comparing breadcrumb id: "+theFolder.getIdentifier() + " and parent id: "+parentId);
if(theFolder.getIdentifier().compareToIgnoreCase(parentId)==0){
GWT.log("Comparing breadcrumb id: "+theFolder.getIdentifier() + " and parent id: "+destinationFolderId);
if(theFolder.getIdentifier().compareToIgnoreCase(destinationFolderId)==0){
eventBus.fireEvent(new GridRefreshEvent());
}
}else{
//MOVING HAS BEEN PERFORMED IN A FOLDER MISSING IN THE BREADCRUMB, SO LOADING IT A NEW ONE
//FOR DISPLAYING
GWT.log("Loading grid on the parent folder of: "+parentId);
GWT.log("Loading grid on the parent folder of: "+destinationFolderId);
AppControllerExplorer.rpcWorkspaceService.getParentByItemId(parentId, new AsyncCallback<FileModel>() {
AppControllerExplorer.rpcWorkspaceService.getParentByItemId(destinationFolderId, new AsyncCallback<FileModel>() {
@Override
public void onFailure(Throwable caught) {
@ -2001,13 +2001,21 @@ public class AppController implements SubscriberInterface {
}
/* (non-Javadoc)
* @see org.gcube.portlets.user.workspace.client.interfaces.SubscriberInterface#copyEventIsCompleted()
*/
@Override
public void copyEventIsCompleted() {
//wsPortlet.getGxtCardLayoutResultPanel().getToolBarItemFunctionalities().activePasteButton(true);
public void copyEventIsCompleted(String destinationFolderId) {
wsPortlet.getGridGroupContainer().unmask();
FileModel theFolder = wsPortlet.getToolBarPath().getParentFolder(destinationFolderId);
if(theFolder!=null){
//THE FOLDER IS IN THE BREADCRUMB
GWT.log("Comparing breadcrumb id: "+theFolder.getIdentifier() + " and destination folder id: "+destinationFolderId);
if(theFolder.getIdentifier().compareToIgnoreCase(destinationFolderId)==0){
eventBus.fireEvent(new GridRefreshEvent());
}
}
}