bug fixed on file position upload after a "got to folder"
git-svn-id: http://svn.d4science-ii.research-infrastructures.eu/gcube/trunk/portlets/user/workspace@81240 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
35aaa45853
commit
083914fdf5
|
@ -112,6 +112,7 @@ public class AppController implements SubscriberInterface {
|
||||||
private HasWidgets rootPanel;
|
private HasWidgets rootPanel;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public AppController(AppControllerExplorer appControllerExplorer) {
|
public AppController(AppControllerExplorer appControllerExplorer) {
|
||||||
this.appContrExplorer = appControllerExplorer;
|
this.appContrExplorer = appControllerExplorer;
|
||||||
this.appContrExplorer.subscribe(this, new EventsTypeEnum[] {
|
this.appContrExplorer.subscribe(this, new EventsTypeEnum[] {
|
||||||
|
@ -665,17 +666,32 @@ public class AppController implements SubscriberInterface {
|
||||||
//FILE UPLOAD CASES..
|
//FILE UPLOAD CASES..
|
||||||
if(fileUploadEvent.getTargetFolderModel()!=null){
|
if(fileUploadEvent.getTargetFolderModel()!=null){
|
||||||
parent = fileUploadEvent.getTargetFolderModel();
|
parent = fileUploadEvent.getTargetFolderModel();
|
||||||
GWT.log("get parent item for uploading from parent of file model: " +fileUploadEvent.getTargetFolderModel().getName());
|
GWT.log("Search is not active, get parent item for uploading from parent of file model: " +fileUploadEvent.getTargetFolderModel().getName());
|
||||||
}else if(wsPortlet.getGridGroupContainer().getCurrentFolderView()!=null){
|
|
||||||
parent = wsPortlet.getGridGroupContainer().getCurrentFolderView();
|
|
||||||
GWT.log("get parent item for uploading from CurrentFolderView: " +parent.getName());
|
|
||||||
}else if(wsPortlet.getToolBarPath().getLastParent()!=null){
|
}else if(wsPortlet.getToolBarPath().getLastParent()!=null){
|
||||||
parent = wsPortlet.getToolBarPath().getLastParent();
|
parent = wsPortlet.getToolBarPath().getLastParent();
|
||||||
GWT.log("get parent item for uploading from breadcrumb: " +parent.getName());
|
GWT.log("Search is not active get parent item for uploading from breadcrumb: " +parent.getName());
|
||||||
|
}else if(wsPortlet.getGridGroupContainer().getCurrentFolderView()!=null){
|
||||||
|
parent = wsPortlet.getGridGroupContainer().getCurrentFolderView();
|
||||||
|
GWT.log("Search is not active get parent item for uploading from CurrentFolderView: " +parent.getName());
|
||||||
}
|
}
|
||||||
|
// }else if(wsPortlet.getGridGroupContainer().getCurrentFolderView()!=null){
|
||||||
|
// parent = wsPortlet.getGridGroupContainer().getCurrentFolderView();
|
||||||
|
// GWT.log("get parent item for uploading from CurrentFolderView: " +parent.getName());
|
||||||
|
// }else if(wsPortlet.getToolBarPath().getLastParent()!=null){
|
||||||
|
// parent = wsPortlet.getToolBarPath().getLastParent();
|
||||||
|
// GWT.log("get parent item for uploading from breadcrumb: " +parent.getName());
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
else{ //IF IS SEARCH ACTIVE
|
||||||
|
|
||||||
|
//is BREADCRUMB fully?
|
||||||
|
if(wsPortlet.getToolBarPath().getLastParent()!=null){
|
||||||
|
parent = wsPortlet.getToolBarPath().getLastParent();
|
||||||
|
GWT.log("Search is active get parent item for uploading from breadcrumb: " +parent.getName());
|
||||||
|
}else
|
||||||
|
parent = null; //also SET null AS PARENT
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
|
||||||
parent = null; //IF IS SEARCH ACTIVE SET null AS PARENT
|
|
||||||
|
|
||||||
AppControllerExplorer.getEventBus().fireEvent(new FileUploadEvent(parent,fileUploadEvent.getUploadType()));
|
AppControllerExplorer.getEventBus().fireEvent(new FileUploadEvent(parent,fileUploadEvent.getUploadType()));
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue