removed dipendency to guided-tour-widget

git-svn-id: http://svn.d4science-ii.research-infrastructures.eu/gcube/trunk/portlets/user/workspace@129965 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Costantino Perciante 2016-07-05 16:28:34 +00:00
parent 8f0b744348
commit c528f6b123
3 changed files with 45 additions and 61 deletions

View File

@ -84,13 +84,6 @@
<version>${gwtVersion}</version> <version>${gwtVersion}</version>
<scope>compile</scope> <scope>compile</scope>
</dependency> </dependency>
<dependency>
<groupId>org.gcube.portlets.widgets</groupId>
<artifactId>guided-tour-widget</artifactId>
<version>[1.4.0-SNAPSHOT, 2.0.0-SNAPSHOT)</version>
<scope>compile</scope>
</dependency>
<dependency> <dependency>
<groupId>org.gcube.applicationsupportlayer</groupId> <groupId>org.gcube.applicationsupportlayer</groupId>
<artifactId>accesslogger</artifactId> <artifactId>accesslogger</artifactId>

View File

@ -1,13 +1,6 @@
package org.gcube.portlets.user.workspace.client; 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.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.ResizeEvent;
import com.google.gwt.event.logical.shared.ResizeHandler; import com.google.gwt.event.logical.shared.ResizeHandler;
import com.google.gwt.user.client.Window; import com.google.gwt.user.client.Window;
@ -31,57 +24,57 @@ public class WorkspacePortlet implements EntryPoint {
appController = new AppController(appControllerExplorer); appController = new AppController(appControllerExplorer);
appController.go(RootPanel.get(ConstantsPortlet.WORKSPACEDIV)); appController.go(RootPanel.get(ConstantsPortlet.WORKSPACEDIV));
Window.addResizeHandler(new ResizeHandler() { Window.addResizeHandler(new ResizeHandler() {
@Override @Override
public void onResize(ResizeEvent event) { public void onResize(ResizeEvent event) {
System.out.println("onWindowResized width: "+event.getWidth()+" height: "+event.getHeight()); System.out.println("onWindowResized width: "+event.getWidth()+" height: "+event.getHeight());
updateSize(); updateSize();
} }
}); });
updateSize(); updateSize();
showGuidedTour(); // showGuidedTour();
} }
/** /**
* Update window size * Update window size
*/ */
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() {
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");
}
});
} }
// 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");
// }
// });
// }
} }

View File

@ -1,12 +1,10 @@
package org.gcube.portlets.user.workspace.client.resources; package org.gcube.portlets.user.workspace.client.resources;
import org.gcube.portlets.widgets.guidedtour.resources.client.GuidedTourResource;
import com.google.gwt.resources.client.ClientBundle; import com.google.gwt.resources.client.ClientBundle;
public interface TourResources extends ClientBundle { public interface TourResources extends ClientBundle {
@Source("GuidedTour.xml") // @Source("GuidedTour.xml")
GuidedTourResource quickTour(); // GuidedTourResource quickTour();
} }