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
|
//COMMENTED 01-02-2013
|
||||||
// appContrExplorer.expandFolder(event.getIdentifier());
|
// appContrExplorer.expandFolder(event.getIdentifier());
|
||||||
|
|
||||||
|
|
||||||
if(fileModel.getIdentifier()!=null){
|
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());
|
FolderModel folder = new FolderModel(fileModel.getIdentifier(), fileModel.getName(), fileModel.getParentFileModel(), true, fileModel.isShared());
|
||||||
updateStoreByRpc(folder);
|
updateStoreByRpc(folder);
|
||||||
wsPortlet.getGridGroupContainer().setCurrentFolderView(folder);
|
wsPortlet.getGridGroupContainer().setCurrentFolderView(folder);
|
||||||
|
@ -437,17 +445,21 @@ public class AppController implements SubscriberInterface {
|
||||||
|
|
||||||
FileModel parent = null;
|
FileModel parent = null;
|
||||||
|
|
||||||
|
if(!wsPortlet.getSearchAndFilterContainer().isSearchActive()){ //IF IS NOT SEARCH ACTIVE
|
||||||
//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("get parent item for uploading from parent of file model: " +fileUploadEvent.getTargetFolderModel().getName());
|
||||||
}else if(wsPortlet.getGridGroupContainer().getCurrentFolderView()!=null && !wsPortlet.getSearchAndFilterContainer().isSearchActive()){
|
}else if(wsPortlet.getGridGroupContainer().getCurrentFolderView()!=null){
|
||||||
parent = wsPortlet.getGridGroupContainer().getCurrentFolderView();
|
parent = wsPortlet.getGridGroupContainer().getCurrentFolderView();
|
||||||
GWT.log("get parent item for uploading from CurrentFolderView: " +parent.getName());
|
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("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()));
|
AppControllerExplorer.getEventBus().fireEvent(new FileUploadEvent(parent,fileUploadEvent.getUploadType()));
|
||||||
|
|
||||||
|
@ -760,6 +772,10 @@ public class AppController implements SubscriberInterface {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean renameItem(String itemIdentifier, String newName, String extension) {
|
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);
|
return wsPortlet.getGridGroupContainer().renameItem(itemIdentifier, newName, extension);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,7 +30,7 @@ public class GxtPathPanel {
|
||||||
private Text txtPath = new Text("PATH ");
|
private Text txtPath = new Text("PATH ");
|
||||||
private LinkedHashMap<String, FileModel> hashFileModel = new LinkedHashMap<String, FileModel>();// Ordered-HashMap
|
private LinkedHashMap<String, FileModel> hashFileModel = new LinkedHashMap<String, FileModel>();// Ordered-HashMap
|
||||||
boolean rootAdded = false;
|
boolean rootAdded = false;
|
||||||
WidgetComponent hardDiskIcon = new WidgetComponent(new Image (Resources.getImageHardDisk()));
|
protected WidgetComponent hardDiskIcon = new WidgetComponent(new Image (Resources.getImageHardDisk()));
|
||||||
|
|
||||||
private FileModel lastParent;
|
private FileModel lastParent;
|
||||||
|
|
||||||
|
@ -76,11 +76,9 @@ public class GxtPathPanel {
|
||||||
// Window.alert("Name " + be.getButton().getText() +
|
// Window.alert("Name " + be.getButton().getText() +
|
||||||
// " ID: "+ be.getButton().getId());
|
// " ID: "+ be.getButton().getId());
|
||||||
|
|
||||||
FileModel target = hashFileModel.get(be.getButton()
|
FileModel target = hashFileModel.get(be.getButton().getId());
|
||||||
.getId());
|
|
||||||
|
|
||||||
AppController.getEventBus().fireEvent(
|
AppController.getEventBus().fireEvent(new PathElementSelectedEvent(target));
|
||||||
new PathElementSelectedEvent(target));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue