diff --git a/pom.xml b/pom.xml index 699183d..36d3052 100644 --- a/pom.xml +++ b/pom.xml @@ -84,13 +84,6 @@ ${gwtVersion} compile - - - org.gcube.portlets.widgets - guided-tour-widget - [1.4.0-SNAPSHOT, 2.0.0-SNAPSHOT) - compile - org.gcube.applicationsupportlayer accesslogger diff --git a/src/main/java/org/gcube/portlets/user/workspace/client/WorkspacePortlet.java b/src/main/java/org/gcube/portlets/user/workspace/client/WorkspacePortlet.java index 38b448a..31d15b1 100644 --- a/src/main/java/org/gcube/portlets/user/workspace/client/WorkspacePortlet.java +++ b/src/main/java/org/gcube/portlets/user/workspace/client/WorkspacePortlet.java @@ -1,13 +1,6 @@ package org.gcube.portlets.user.workspace.client; -import org.gcube.portlets.user.workspace.client.resources.TourResources; -import org.gcube.portlets.widgets.guidedtour.client.GCUBEGuidedTour; -import org.gcube.portlets.widgets.guidedtour.client.GuidedTourResourceProvider; -import org.gcube.portlets.widgets.guidedtour.resources.client.GuidedTourResource; - import com.google.gwt.core.client.EntryPoint; -import com.google.gwt.core.client.GWT; -import com.google.gwt.core.client.RunAsyncCallback; import com.google.gwt.event.logical.shared.ResizeEvent; import com.google.gwt.event.logical.shared.ResizeHandler; import com.google.gwt.user.client.Window; @@ -31,57 +24,57 @@ public class WorkspacePortlet implements EntryPoint { appController = new AppController(appControllerExplorer); appController.go(RootPanel.get(ConstantsPortlet.WORKSPACEDIV)); - Window.addResizeHandler(new ResizeHandler() { - @Override - public void onResize(ResizeEvent event) { - System.out.println("onWindowResized width: "+event.getWidth()+" height: "+event.getHeight()); - updateSize(); - } - }); + Window.addResizeHandler(new ResizeHandler() { + @Override + public void onResize(ResizeEvent event) { + System.out.println("onWindowResized width: "+event.getWidth()+" height: "+event.getHeight()); + updateSize(); + } + }); - updateSize(); - showGuidedTour(); + updateSize(); + // showGuidedTour(); } /** * Update window size */ - public void updateSize(){ + public void updateSize(){ - RootPanel workspace = RootPanel.get(ConstantsPortlet.WORKSPACEDIV); - int topBorder = workspace.getAbsoluteTop(); - int leftBorder = workspace.getAbsoluteLeft(); - int footer = 85; //footer is bottombar + sponsor + 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)); -// if (rootHeight > 550) -// rootHeight = 550; + // 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 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.runAsync(GCUBEGuidedTour.class, new RunAsyncCallback() { - public void onSuccess() { - - GCUBEGuidedTour.showTour(WorkspacePortlet.class.getName(), new GuidedTourResourceProvider() { - @Override - public GuidedTourResource getResource() { - TourResources resources = GWT.create(TourResources.class); - return resources.quickTour(); - } - }); - } - public void onFailure(Throwable caught) { - Window.alert("Could not check show tour"); - } - }); + 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.runAsync(GCUBEGuidedTour.class, new RunAsyncCallback() { + // public void onSuccess() { + // + // GCUBEGuidedTour.showTour(WorkspacePortlet.class.getName(), new GuidedTourResourceProvider() { + // @Override + // public GuidedTourResource getResource() { + // TourResources resources = GWT.create(TourResources.class); + // return resources.quickTour(); + // } + // }); + // } + // public void onFailure(Throwable caught) { + // Window.alert("Could not check show tour"); + // } + // }); + // } } diff --git a/src/main/java/org/gcube/portlets/user/workspace/client/resources/TourResources.java b/src/main/java/org/gcube/portlets/user/workspace/client/resources/TourResources.java index bfa19e4..870b516 100644 --- a/src/main/java/org/gcube/portlets/user/workspace/client/resources/TourResources.java +++ b/src/main/java/org/gcube/portlets/user/workspace/client/resources/TourResources.java @@ -1,12 +1,10 @@ package org.gcube.portlets.user.workspace.client.resources; -import org.gcube.portlets.widgets.guidedtour.resources.client.GuidedTourResource; - import com.google.gwt.resources.client.ClientBundle; public interface TourResources extends ClientBundle { - - @Source("GuidedTour.xml") - GuidedTourResource quickTour(); + + // @Source("GuidedTour.xml") + // GuidedTourResource quickTour(); } \ No newline at end of file