git-svn-id: http://svn.d4science-ii.research-infrastructures.eu/gcube/trunk/portlets/user/workspace@71734 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
4858405235
commit
d8c64c7990
|
@ -90,7 +90,8 @@ public class AppController implements SubscriberInterface {
|
|||
private WorskpacePortlet wsPortlet = null;
|
||||
private AppControllerExplorer appContrExplorer = null;
|
||||
private String rootIdentifier = null;
|
||||
public static boolean isSearchActive = false;
|
||||
// public static boolean isSearchActive = false;
|
||||
|
||||
|
||||
public AppController(AppControllerExplorer appControllerExplorer) {
|
||||
this.appContrExplorer = appControllerExplorer;
|
||||
|
@ -337,7 +338,7 @@ public class AppController implements SubscriberInterface {
|
|||
}
|
||||
else{
|
||||
wsPortlet.getSearchAndFilterContainer().setSearchActive(true); //ADDED 06-04-12
|
||||
isSearchActive = true;
|
||||
// setSearchActive(true);
|
||||
appContrExplorer.searching(true);
|
||||
doSearchText(searchTextEvent.getTextSearch());
|
||||
}
|
||||
|
@ -435,12 +436,12 @@ public class AppController implements SubscriberInterface {
|
|||
public void onFileUploadEvent(FileUploadEvent fileUploadEvent) {
|
||||
|
||||
FileModel parent = null;
|
||||
|
||||
|
||||
//FILE UPLOAD CASES..
|
||||
if(fileUploadEvent.getParentFileModel()!=null){
|
||||
parent = fileUploadEvent.getParentFileModel();
|
||||
GWT.log("get parent item for uploading from parent of file model: " +fileUploadEvent.getParentFileModel().getName());
|
||||
}else if(wsPortlet.getGridGroupContainer().getCurrentFolderView()!=null && !isSearchActive){
|
||||
}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){
|
||||
|
@ -448,7 +449,7 @@ public class AppController implements SubscriberInterface {
|
|||
GWT.log("get parent item for uploading from breadcrumb: " +parent.getName());
|
||||
}
|
||||
|
||||
AppControllerExplorer.getEventBus().fireEvent(new FileUploadEvent(fileUploadEvent.getParentFileModel(),fileUploadEvent.getUploadType()));
|
||||
AppControllerExplorer.getEventBus().fireEvent(new FileUploadEvent(parent,fileUploadEvent.getUploadType()));
|
||||
|
||||
}
|
||||
});
|
||||
|
@ -524,6 +525,15 @@ public class AppController implements SubscriberInterface {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
// public static boolean isSearchActive() {
|
||||
// return isSearchActive;
|
||||
// }
|
||||
//
|
||||
// public static void setSearchActive(boolean isSearchActive) {
|
||||
// AppController.isSearchActive = isSearchActive;
|
||||
// }
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -728,7 +738,7 @@ public class AppController implements SubscriberInterface {
|
|||
wsPortlet.getSearchAndFilterContainer().searchCancel(); //TODO added in 05/04/2012
|
||||
AppController.getEventBus().fireEvent(new SearchTextEvent(null));
|
||||
wsPortlet.getSearchAndFilterContainer().setSearchActive(false);
|
||||
isSearchActive = false;
|
||||
// setSearchActive(false);
|
||||
if(item.isDirectory())
|
||||
updateStoreByRpc(item);
|
||||
else
|
||||
|
@ -802,7 +812,7 @@ public class AppController implements SubscriberInterface {
|
|||
@Override
|
||||
public void onSuccess(List<FileGridModel> result) {
|
||||
wsPortlet.getSearchAndFilterContainer().setSearchActive(true);
|
||||
isSearchActive = true;
|
||||
// setSearchActive(true);
|
||||
wsPortlet.getGridGroupContainer().unmask();
|
||||
wsPortlet.getGridGroupContainer().updateStore(result);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue