531: Workspace: create new folder doesn't work fine
Task-Url: https://support.d4science.org/issues/531 Added check in AddFolderEvent to fix the issue git-svn-id: http://svn.d4science-ii.research-infrastructures.eu/gcube/trunk/portlets/user/workspace@118961 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
ceb394cd08
commit
f61a1603c5
|
@ -3,6 +3,8 @@
|
|||
date="2015-07-06">
|
||||
<Change>[Bug #718] Fixed breadcrumb path
|
||||
</Change>
|
||||
<Change>[Bug #531] Workspace: create new folder doesn't work fine
|
||||
</Change>
|
||||
</Changeset>
|
||||
<Changeset component="org.gcube.portlets-user.workspace-portlet.6-8-0"
|
||||
date="2015-07-06">
|
||||
|
|
|
@ -751,8 +751,16 @@ public class AppController implements SubscriberInterface {
|
|||
|
||||
@Override
|
||||
public void onAddItem(AddFolderEvent event) {
|
||||
AppControllerExplorer.getEventBus().fireEvent(new AddFolderEvent(event.getFileSourceModel(),event.getParentFileModel()));
|
||||
|
||||
|
||||
FileModel folderToInsert = event.getFileSourceModel();
|
||||
GWT.log("Folder parent to create new folder not found, Loading from breadcrumb");
|
||||
if(folderToInsert==null){
|
||||
folderToInsert = wsPortlet.getToolBarPath().getLastParent();
|
||||
GWT.log("Folder parent in breadcrumb: "+folderToInsert.getName());
|
||||
}
|
||||
|
||||
if(folderToInsert!=null)
|
||||
AppControllerExplorer.getEventBus().fireEvent(new AddFolderEvent(folderToInsert,event.getParentFileModel()));
|
||||
}
|
||||
|
||||
});
|
||||
|
|
|
@ -262,9 +262,7 @@ public class GxtToolBarItemFunctionality {
|
|||
@Override
|
||||
public void componentSelected(ButtonEvent ce) {
|
||||
|
||||
AppController.getEventBus().fireEvent(
|
||||
new AddFolderEvent(gridGroupViewContainer
|
||||
.getCurrentFolderView(), null));
|
||||
AppController.getEventBus().fireEvent(new AddFolderEvent(gridGroupViewContainer.getCurrentFolderView(), null));
|
||||
}
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in New Issue