256: Workspace explorer
Task-Url: https://support.d4science.org/issues/256 Added gwt comments git-svn-id: http://svn.d4science-ii.research-infrastructures.eu/gcube/trunk/portlets/user/workspace@115514 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
02e077ce71
commit
c49b501713
|
@ -8,6 +8,9 @@
|
|||
<dependent-module archiveName="workspace-tree-widget-6.8.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/workspace-tree-widget-TRUNK/workspace-tree-widget-TRUNK">
|
||||
<dependency-type>uses</dependency-type>
|
||||
</dependent-module>
|
||||
<dependent-module archiveName="workspace-light-tree-2.14.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/workspace-light-tree-TRUNK/workspace-light-tree-TRUNK">
|
||||
<dependency-type>uses</dependency-type>
|
||||
</dependent-module>
|
||||
|
||||
<property name="java-output-path" value="/${module}/target/www/WEB-INF/classes"/>
|
||||
<property name="context-root" value="workspace"/>
|
||||
|
|
|
@ -625,16 +625,12 @@ public class AppController implements SubscriberInterface {
|
|||
public void onSearchItemById(SearchItemByIdEvent searchItemByIdEvent) {
|
||||
|
||||
if(searchItemByIdEvent.getItemId()!=null && !searchItemByIdEvent.getItemId().isEmpty()){
|
||||
|
||||
wsPortlet.getSearchAndFilterContainer().setSearchActive(true); //ADDED 06-04-12
|
||||
appContrExplorer.searching(true);
|
||||
doSearchItemById(searchItemByIdEvent.getItemId(), searchItemByIdEvent.getOperationParameter());
|
||||
|
||||
}else{
|
||||
|
||||
appContrExplorer.searching(false);
|
||||
wsPortlet.getGridGroupContainer().setBorderAsOnSearch(false);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -643,12 +639,10 @@ public class AppController implements SubscriberInterface {
|
|||
wsPortlet.getGridGroupContainer().setBorderAsOnSearch(true);
|
||||
wsPortlet.getGridGroupContainer().mask(ConstantsExplorer.LOADING,ConstantsExplorer.LOADINGSTYLE);
|
||||
|
||||
|
||||
switch (wsPortletInitOperation) {
|
||||
|
||||
case gotofolder:
|
||||
|
||||
|
||||
appContrExplorer.getRpcWorkspaceService().getFolderChildrenForFileGridById(itemId, new AsyncCallback<List<FileGridModel>>() {
|
||||
|
||||
@Override
|
||||
|
@ -673,13 +667,13 @@ public class AppController implements SubscriberInterface {
|
|||
|
||||
if(result!=null && result.size()>0){
|
||||
String childId = result.get(0).getIdentifier(); //GET FIRST CHILD ID TO LOAD PARENTS BREADCRUMB
|
||||
GWT.log("reloading breadcrumb for first child...");
|
||||
loadParentBreadcrumbByItemId(childId, false);
|
||||
}else{ //FOLDER IS EMPTY AND EXISTS, FOLDER IS LAST PARENT INTO BREADCRUMB
|
||||
|
||||
GWT.log("reloading breadcrumb by item including as last parent");
|
||||
loadParentBreadcrumbByItemId(itemId, true); //RELOAD BREDCRUMB
|
||||
}
|
||||
|
||||
|
||||
|
||||
boolean selected =wsPortlet.getGridGroupContainer().selectItemByFileModelId(itemId);
|
||||
|
||||
if(selected)
|
||||
|
@ -825,17 +819,6 @@ public class AppController implements SubscriberInterface {
|
|||
}
|
||||
});
|
||||
|
||||
|
||||
// eventBus.addHandler(FileDownloadEvent.TYPE, new FileDownloadEventHandler() {
|
||||
//
|
||||
// @Override
|
||||
// public void onFileDownloadEvent(FileDownloadEvent fileDownloadEvent) {
|
||||
// AppControllerExplorer.getEventBus().fireEvent(new FileDownloadEvent(fileDownloadEvent.getItemIdentifier(), fileDownloadEvent.getItemName(), fileDownloadEvent.getDownloadType()));
|
||||
//
|
||||
// }
|
||||
// });
|
||||
|
||||
|
||||
eventBus.addHandler(DeleteItemEvent.TYPE, new DeleteItemEventHandler() {
|
||||
|
||||
@Override
|
||||
|
@ -1047,9 +1030,8 @@ public class AppController implements SubscriberInterface {
|
|||
|
||||
@Override
|
||||
public void onSuccess(List<FileModel> result) {
|
||||
|
||||
|
||||
updateBreadcrumb(result); //Set file path in tab panel on current item selected
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
@ -40,10 +40,8 @@ public class WorkspacePortlet implements EntryPoint {
|
|||
});
|
||||
|
||||
updateSize();
|
||||
|
||||
showGuidedTour();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Update window size
|
||||
|
@ -51,34 +49,25 @@ public class WorkspacePortlet implements EntryPoint {
|
|||
public void updateSize(){
|
||||
|
||||
RootPanel workspace = RootPanel.get(ConstantsPortlet.WORKSPACEDIV);
|
||||
|
||||
int topBorder = workspace.getAbsoluteTop();
|
||||
|
||||
int leftBorder = workspace.getAbsoluteLeft();
|
||||
|
||||
int footer = 85; //footer is bottombar + sponsor
|
||||
|
||||
// int rootHeight = (Window.getClientHeight() - topBorder - 4) ;// - ((footer == null)?0:(footer.getOffsetHeight()-15));
|
||||
|
||||
// int rootHeight = (Window.getClientHeight() - topBorder - 4) ;// - ((footer == null)?0:(footer.getOffsetHeight()-15));
|
||||
// if (rootHeight > 550)
|
||||
// rootHeight = 550;
|
||||
|
||||
int rootHeight = (Window.getClientHeight() - topBorder - 4 - footer);// - ((footer == null)?0:(footer.getOffsetHeight()-15));
|
||||
|
||||
if (rootHeight < 550)
|
||||
rootHeight = 550;
|
||||
|
||||
int rootWidth = Window.getClientWidth() - 2* leftBorder; //- rightScrollBar;
|
||||
|
||||
System.out.println("New workspace dimension Height: "+rootHeight+" Width: "+rootWidth);
|
||||
|
||||
appController.getMainPanel().setHeight(rootHeight);
|
||||
appController.getMainPanel().setWidth(rootWidth);
|
||||
|
||||
}
|
||||
|
||||
private void showGuidedTour() {
|
||||
// GWT.log("oh");
|
||||
GWT.runAsync(GCUBEGuidedTour.class, new RunAsyncCallback() {
|
||||
public void onSuccess() {
|
||||
|
||||
|
|
Loading…
Reference in New Issue