bug fixed on rename of a breadcrumb item
git-svn-id: http://svn.d4science-ii.research-infrastructures.eu/gcube/trunk/portlets/user/workspace@71811 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
d686391ce8
commit
a62b890cb0
|
@ -315,7 +315,15 @@ public class AppController implements SubscriberInterface {
|
|||
//COMMENTED 01-02-2013
|
||||
// appContrExplorer.expandFolder(event.getIdentifier());
|
||||
|
||||
|
||||
if(fileModel.getIdentifier()!=null){
|
||||
|
||||
if(wsPortlet.getSearchAndFilterContainer().isSearchActive()){
|
||||
AppController.getEventBus().fireEvent(new SearchTextEvent(null));
|
||||
wsPortlet.getSearchAndFilterContainer().setSearchActive(false);
|
||||
}
|
||||
|
||||
System.out.println("FILE MODEL DOUBLE CLICK: "+fileModel);
|
||||
FolderModel folder = new FolderModel(fileModel.getIdentifier(), fileModel.getName(), fileModel.getParentFileModel(), true, fileModel.isShared());
|
||||
updateStoreByRpc(folder);
|
||||
wsPortlet.getGridGroupContainer().setCurrentFolderView(folder);
|
||||
|
@ -437,17 +445,21 @@ public class AppController implements SubscriberInterface {
|
|||
|
||||
FileModel parent = null;
|
||||
|
||||
//FILE UPLOAD CASES..
|
||||
if(fileUploadEvent.getTargetFolderModel()!=null){
|
||||
parent = fileUploadEvent.getTargetFolderModel();
|
||||
GWT.log("get parent item for uploading from parent of file model: " +fileUploadEvent.getTargetFolderModel().getName());
|
||||
}else if(wsPortlet.getGridGroupContainer().getCurrentFolderView()!=null && !wsPortlet.getSearchAndFilterContainer().isSearchActive()){
|
||||
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());
|
||||
if(!wsPortlet.getSearchAndFilterContainer().isSearchActive()){ //IF IS NOT SEARCH ACTIVE
|
||||
//FILE UPLOAD CASES..
|
||||
if(fileUploadEvent.getTargetFolderModel()!=null){
|
||||
parent = fileUploadEvent.getTargetFolderModel();
|
||||
GWT.log("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){
|
||||
parent = wsPortlet.getToolBarPath().getLastParent();
|
||||
GWT.log("get parent item for uploading from breadcrumb: " +parent.getName());
|
||||
}
|
||||
}
|
||||
else
|
||||
parent = null; //IF IS SEARCH ACTIVE SET null AS PARENT
|
||||
|
||||
AppControllerExplorer.getEventBus().fireEvent(new FileUploadEvent(parent,fileUploadEvent.getUploadType()));
|
||||
|
||||
|
@ -760,6 +772,10 @@ public class AppController implements SubscriberInterface {
|
|||
|
||||
@Override
|
||||
public boolean renameItem(String itemIdentifier, String newName, String extension) {
|
||||
|
||||
FileModel lastParent = wsPortlet.getToolBarPath().getLastParent(); //RELOAD BREADCRUMB
|
||||
loadBreadcrumbById(lastParent, true);
|
||||
|
||||
return wsPortlet.getGridGroupContainer().renameItem(itemIdentifier, newName, extension);
|
||||
|
||||
}
|
||||
|
|
|
@ -30,7 +30,7 @@ public class GxtPathPanel {
|
|||
private Text txtPath = new Text("PATH ");
|
||||
private LinkedHashMap<String, FileModel> hashFileModel = new LinkedHashMap<String, FileModel>();// Ordered-HashMap
|
||||
boolean rootAdded = false;
|
||||
WidgetComponent hardDiskIcon = new WidgetComponent(new Image (Resources.getImageHardDisk()));
|
||||
protected WidgetComponent hardDiskIcon = new WidgetComponent(new Image (Resources.getImageHardDisk()));
|
||||
|
||||
private FileModel lastParent;
|
||||
|
||||
|
@ -76,11 +76,9 @@ public class GxtPathPanel {
|
|||
// Window.alert("Name " + be.getButton().getText() +
|
||||
// " ID: "+ be.getButton().getId());
|
||||
|
||||
FileModel target = hashFileModel.get(be.getButton()
|
||||
.getId());
|
||||
FileModel target = hashFileModel.get(be.getButton().getId());
|
||||
|
||||
AppController.getEventBus().fireEvent(
|
||||
new PathElementSelectedEvent(target));
|
||||
AppController.getEventBus().fireEvent(new PathElementSelectedEvent(target));
|
||||
}
|
||||
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue