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">
|
<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>
|
<dependency-type>uses</dependency-type>
|
||||||
</dependent-module>
|
</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="java-output-path" value="/${module}/target/www/WEB-INF/classes"/>
|
||||||
<property name="context-root" value="workspace"/>
|
<property name="context-root" value="workspace"/>
|
||||||
|
|
|
@ -625,16 +625,12 @@ public class AppController implements SubscriberInterface {
|
||||||
public void onSearchItemById(SearchItemByIdEvent searchItemByIdEvent) {
|
public void onSearchItemById(SearchItemByIdEvent searchItemByIdEvent) {
|
||||||
|
|
||||||
if(searchItemByIdEvent.getItemId()!=null && !searchItemByIdEvent.getItemId().isEmpty()){
|
if(searchItemByIdEvent.getItemId()!=null && !searchItemByIdEvent.getItemId().isEmpty()){
|
||||||
|
|
||||||
wsPortlet.getSearchAndFilterContainer().setSearchActive(true); //ADDED 06-04-12
|
wsPortlet.getSearchAndFilterContainer().setSearchActive(true); //ADDED 06-04-12
|
||||||
appContrExplorer.searching(true);
|
appContrExplorer.searching(true);
|
||||||
doSearchItemById(searchItemByIdEvent.getItemId(), searchItemByIdEvent.getOperationParameter());
|
doSearchItemById(searchItemByIdEvent.getItemId(), searchItemByIdEvent.getOperationParameter());
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
|
|
||||||
appContrExplorer.searching(false);
|
appContrExplorer.searching(false);
|
||||||
wsPortlet.getGridGroupContainer().setBorderAsOnSearch(false);
|
wsPortlet.getGridGroupContainer().setBorderAsOnSearch(false);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -643,12 +639,10 @@ public class AppController implements SubscriberInterface {
|
||||||
wsPortlet.getGridGroupContainer().setBorderAsOnSearch(true);
|
wsPortlet.getGridGroupContainer().setBorderAsOnSearch(true);
|
||||||
wsPortlet.getGridGroupContainer().mask(ConstantsExplorer.LOADING,ConstantsExplorer.LOADINGSTYLE);
|
wsPortlet.getGridGroupContainer().mask(ConstantsExplorer.LOADING,ConstantsExplorer.LOADINGSTYLE);
|
||||||
|
|
||||||
|
|
||||||
switch (wsPortletInitOperation) {
|
switch (wsPortletInitOperation) {
|
||||||
|
|
||||||
case gotofolder:
|
case gotofolder:
|
||||||
|
|
||||||
|
|
||||||
appContrExplorer.getRpcWorkspaceService().getFolderChildrenForFileGridById(itemId, new AsyncCallback<List<FileGridModel>>() {
|
appContrExplorer.getRpcWorkspaceService().getFolderChildrenForFileGridById(itemId, new AsyncCallback<List<FileGridModel>>() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -673,13 +667,13 @@ public class AppController implements SubscriberInterface {
|
||||||
|
|
||||||
if(result!=null && result.size()>0){
|
if(result!=null && result.size()>0){
|
||||||
String childId = result.get(0).getIdentifier(); //GET FIRST CHILD ID TO LOAD PARENTS BREADCRUMB
|
String childId = result.get(0).getIdentifier(); //GET FIRST CHILD ID TO LOAD PARENTS BREADCRUMB
|
||||||
|
GWT.log("reloading breadcrumb for first child...");
|
||||||
loadParentBreadcrumbByItemId(childId, false);
|
loadParentBreadcrumbByItemId(childId, false);
|
||||||
}else{ //FOLDER IS EMPTY AND EXISTS, FOLDER IS LAST PARENT INTO BREADCRUMB
|
}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
|
loadParentBreadcrumbByItemId(itemId, true); //RELOAD BREDCRUMB
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
boolean selected =wsPortlet.getGridGroupContainer().selectItemByFileModelId(itemId);
|
boolean selected =wsPortlet.getGridGroupContainer().selectItemByFileModelId(itemId);
|
||||||
|
|
||||||
if(selected)
|
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() {
|
eventBus.addHandler(DeleteItemEvent.TYPE, new DeleteItemEventHandler() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -1049,7 +1032,6 @@ public class AppController implements SubscriberInterface {
|
||||||
public void onSuccess(List<FileModel> result) {
|
public void onSuccess(List<FileModel> result) {
|
||||||
|
|
||||||
updateBreadcrumb(result); //Set file path in tab panel on current item selected
|
updateBreadcrumb(result); //Set file path in tab panel on current item selected
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -40,10 +40,8 @@ public class WorkspacePortlet implements EntryPoint {
|
||||||
});
|
});
|
||||||
|
|
||||||
updateSize();
|
updateSize();
|
||||||
|
|
||||||
showGuidedTour();
|
showGuidedTour();
|
||||||
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Update window size
|
* Update window size
|
||||||
|
@ -51,34 +49,25 @@ public class WorkspacePortlet implements EntryPoint {
|
||||||
public void updateSize(){
|
public void updateSize(){
|
||||||
|
|
||||||
RootPanel workspace = RootPanel.get(ConstantsPortlet.WORKSPACEDIV);
|
RootPanel workspace = RootPanel.get(ConstantsPortlet.WORKSPACEDIV);
|
||||||
|
|
||||||
int topBorder = workspace.getAbsoluteTop();
|
int topBorder = workspace.getAbsoluteTop();
|
||||||
|
|
||||||
int leftBorder = workspace.getAbsoluteLeft();
|
int leftBorder = workspace.getAbsoluteLeft();
|
||||||
|
|
||||||
int footer = 85; //footer is bottombar + sponsor
|
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)
|
// if (rootHeight > 550)
|
||||||
// rootHeight = 550;
|
// rootHeight = 550;
|
||||||
|
|
||||||
int rootHeight = (Window.getClientHeight() - topBorder - 4 - footer);// - ((footer == null)?0:(footer.getOffsetHeight()-15));
|
int rootHeight = (Window.getClientHeight() - topBorder - 4 - footer);// - ((footer == null)?0:(footer.getOffsetHeight()-15));
|
||||||
|
|
||||||
if (rootHeight < 550)
|
if (rootHeight < 550)
|
||||||
rootHeight = 550;
|
rootHeight = 550;
|
||||||
|
|
||||||
int rootWidth = Window.getClientWidth() - 2* leftBorder; //- rightScrollBar;
|
int rootWidth = Window.getClientWidth() - 2* leftBorder; //- rightScrollBar;
|
||||||
|
|
||||||
System.out.println("New workspace dimension Height: "+rootHeight+" Width: "+rootWidth);
|
System.out.println("New workspace dimension Height: "+rootHeight+" Width: "+rootWidth);
|
||||||
|
|
||||||
appController.getMainPanel().setHeight(rootHeight);
|
appController.getMainPanel().setHeight(rootHeight);
|
||||||
appController.getMainPanel().setWidth(rootWidth);
|
appController.getMainPanel().setWidth(rootWidth);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void showGuidedTour() {
|
private void showGuidedTour() {
|
||||||
// GWT.log("oh");
|
|
||||||
GWT.runAsync(GCUBEGuidedTour.class, new RunAsyncCallback() {
|
GWT.runAsync(GCUBEGuidedTour.class, new RunAsyncCallback() {
|
||||||
public void onSuccess() {
|
public void onSuccess() {
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue