From 5cf7a20068778185550385f985613843bb75a74b Mon Sep 17 00:00:00 2001 From: Francesco Mangiacrapa Date: Fri, 8 Jan 2016 11:37:14 +0000 Subject: [PATCH] fixed #1333 git-svn-id: http://svn.d4science-ii.research-infrastructures.eu/gcube/trunk/portlets/user/workspace@122157 82a268e6-3cf1-43bd-a215-b396298e98cf --- .classpath | 4 ++-- .settings/org.eclipse.wst.common.component | 8 +++++++- .../user/workspace/client/AppController.java | 16 ++++------------ .../client/view/panels/GxtBorderLayoutPanel.java | 16 ++-------------- src/main/webapp/WEB-INF/web.xml | 10 ++++++++++ 5 files changed, 25 insertions(+), 29 deletions(-) diff --git a/.classpath b/.classpath index 994826f..e01126b 100644 --- a/.classpath +++ b/.classpath @@ -1,6 +1,6 @@ - + @@ -26,5 +26,5 @@ - + diff --git a/.settings/org.eclipse.wst.common.component b/.settings/org.eclipse.wst.common.component index 5285cd0..b5c2704 100644 --- a/.settings/org.eclipse.wst.common.component +++ b/.settings/org.eclipse.wst.common.component @@ -5,7 +5,13 @@ - + + uses + + + uses + + uses diff --git a/src/main/java/org/gcube/portlets/user/workspace/client/AppController.java b/src/main/java/org/gcube/portlets/user/workspace/client/AppController.java index 5f7d3c9..8db1d7b 100644 --- a/src/main/java/org/gcube/portlets/user/workspace/client/AppController.java +++ b/src/main/java/org/gcube/portlets/user/workspace/client/AppController.java @@ -1131,24 +1131,19 @@ public class AppController implements SubscriberInterface { * @param includeItemAsParent the include item as parent */ protected void loadParentBreadcrumbByItemId(final String childItemId, boolean includeItemAsParent){ - GWT.log("Reload Parent Breadcrumb: [Item id: "+childItemId+"]"); - AppControllerExplorer.rpcWorkspaceService.getListParentsByItemIdentifier(childItemId, includeItemAsParent, new AsyncCallback>() { @Override public void onFailure(Throwable caught) { GWT.log("failure get list parents by item identifier "+caught); - } @Override public void onSuccess(List result) { - updateBreadcrumb(result); //Set file path in tab panel on current item selected } }); - } /** @@ -1167,7 +1162,7 @@ public class AppController implements SubscriberInterface { GWT.log("Updated Breadcrumb for : "+parent); if(parent!=null){ - wsPortlet.getBorderLayoutContainer().updateParentId(parent.getIdentifier()); + wsPortlet.getBorderLayoutContainer().updateDnDParentId(parent.getIdentifier()); if(parent.isDirectory() && parent.isShared()){ //IS SHARED FOLDER, ENABLING OPERATION FOR ACTIVE BREADCRUMB setACLInfo(parent.getIdentifier()); @@ -1181,7 +1176,7 @@ public class AppController implements SubscriberInterface { setACLInfo(null); //IS NOT A SHARE FOLDER DOSN'T DISPLAY ACL INFO } }else{ - wsPortlet.getBorderLayoutContainer().updateParentId(null); + wsPortlet.getBorderLayoutContainer().updateDnDParentId(null); setACLInfo(null); } @@ -1206,14 +1201,11 @@ public class AppController implements SubscriberInterface { @Override public void onFailure(Throwable arg0) { // TODO Auto-generated method stub - } - + @Override public void onSuccess(List res) { - FileModel parent = wsPortlet.getToolBarPath().getLastParent(); - GWT.log("Validating correct ACL id: "+parentId +" and "+parent.getIdentifier()); if(parentId.compareTo(parent.getIdentifier())==0){ if(res!=null && res.size()>0){ @@ -1295,7 +1287,7 @@ public class AppController implements SubscriberInterface { @Override public void onOverwriteCompleted(String parentId, String itemId) { GWT.log("Upload Override Completed: [parentID: "+parentId+", itemId: "+itemId+"]"); - eventBus.fireEvent(new CompletedFileUploadEvent(parentId, itemId, WS_UPLOAD_TYPE.File, true)); + AppControllerExplorer.getEventBus().fireEvent(new CompletedFileUploadEvent(parentId, itemId, WS_UPLOAD_TYPE.File, true)); } }; diff --git a/src/main/java/org/gcube/portlets/user/workspace/client/view/panels/GxtBorderLayoutPanel.java b/src/main/java/org/gcube/portlets/user/workspace/client/view/panels/GxtBorderLayoutPanel.java index 6f69823..5db5b5c 100644 --- a/src/main/java/org/gcube/portlets/user/workspace/client/view/panels/GxtBorderLayoutPanel.java +++ b/src/main/java/org/gcube/portlets/user/workspace/client/view/panels/GxtBorderLayoutPanel.java @@ -100,12 +100,10 @@ public class GxtBorderLayoutPanel extends ContentPanel { setLayout(borderLayout); //setStyleAttribute("padding", "10px"); setHeaderVisible(false); - // center.add(this.gridFilter); BorderLayoutData northData = new BorderLayoutData(LayoutRegion.NORTH, 60, 60, 60); northData.setCollapsible(true); - northData.setSplit(true); //Split bar between regions // northData.setFloatable(true); northData.setCollapsible(true); @@ -134,8 +132,7 @@ public class GxtBorderLayoutPanel extends ContentPanel { north.add(this.searchAndFilterContainer); north.setScrollMode(Scroll.AUTOY); west.add(this.expPanel); - - + north.addListener(Events.Resize, new Listener(){ @Override @@ -172,33 +169,24 @@ public class GxtBorderLayoutPanel extends ContentPanel { } }); // center.add(this.toolbarContainer); - center.setId("Center Panel "+Random.nextInt()); - // GWT.log("center: "+center.getId()); dnd.addUniqueContainer(this.gxtCardLayoutResultPanel); center.add(dnd); - // south.add(this.toolBarItemDetails); - west.addListener(Events.Resize, new Listener(){ @Override public void handleEvent(BoxComponentEvent be) { - expPanel.getAsycTreePanel().setSizeTreePanel(expPanel.getWidth()-13, expPanel.getHeight()-39); - if(expPanel.getSmartFolderPanel()!=null) expPanel.getSmartFolderPanel().setSizeSmartPanel(expPanel.getWidth()-2, expPanel.getHeight()-29); - } - }); add(north, northData); add(west, westData); add(center, centerData); add(east, eastData); -// add(south, southData); } /** @@ -220,7 +208,7 @@ public class GxtBorderLayoutPanel extends ContentPanel { * * @param parentId the parent id */ - public void updateParentId(String parentId){ + public void updateDnDParentId(String parentId){ dnd.setParameters(parentId, UPLOAD_TYPE.File); } } \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/web.xml b/src/main/webapp/WEB-INF/web.xml index 5812293..8a8b530 100644 --- a/src/main/webapp/WEB-INF/web.xml +++ b/src/main/webapp/WEB-INF/web.xml @@ -85,6 +85,16 @@ org.gcube.portlets.widgets.workspaceuploader.server.WorkspaceUploaderServiceImpl + + workspaceUploaderWsUtil + org.gcube.portlets.widgets.workspaceuploader.server.WorkspaceUploaderWsUtil + + + + workspaceUploaderWsUtil + /workspace/workspaceUploaderWsUtil + + workspaceExplorer /workspace/WorkspaceExplorerService