Added sample page guided tour and the required dependencies

git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/portlets/user/user-statistics@128313 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Costantino Perciante 2016-04-26 12:54:28 +00:00
parent d8d9ab70f2
commit a9053705dc
6 changed files with 69 additions and 4 deletions

View File

@ -4,7 +4,6 @@
<wb-resource deploy-path="/" source-path="/src/main/webapp" tag="defaultRootSource"/> <wb-resource deploy-path="/" source-path="/src/main/webapp" tag="defaultRootSource"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/> <wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/resources"/> <wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/resources"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/test/resources"/>
<property name="java-output-path" value="/user-statistics/target/user-statistics-portlet-0.0.1-SNAPSHOT/WEB-INF/classes"/> <property name="java-output-path" value="/user-statistics/target/user-statistics-portlet-0.0.1-SNAPSHOT/WEB-INF/classes"/>
<property name="context-root" value="user-statistics"/> <property name="context-root" value="user-statistics"/>
</wb-module> </wb-module>

View File

@ -2,7 +2,7 @@
<faceted-project> <faceted-project>
<fixed facet="wst.jsdt.web"/> <fixed facet="wst.jsdt.web"/>
<installed facet="java" version="1.7"/> <installed facet="java" version="1.7"/>
<installed facet="jst.web" version="2.3"/> <installed facet="jst.web" version="3.0"/>
<installed facet="wst.jsdt.web" version="1.0"/> <installed facet="wst.jsdt.web" version="1.0"/>
<installed facet="jst.jaxrs" version="1.1"/> <installed facet="jst.jaxrs" version="1.1"/>
<installed facet="liferay.portlet" version="6.0"/> <installed facet="liferay.portlet" version="6.0"/>

View File

@ -154,6 +154,11 @@
<artifactId>usermanagement-core</artifactId> <artifactId>usermanagement-core</artifactId>
<version>[2.0.0-SNAPSHOT, 3.0.0-SNAPSHOT)</version> <version>[2.0.0-SNAPSHOT, 3.0.0-SNAPSHOT)</version>
</dependency> </dependency>
<dependency>
<groupId>org.gcube.portlets.widgets</groupId>
<artifactId>widget-tour</artifactId>
<version>[1.0.0-SNAPSHOT, 2.0.0-SNAPSHOT)</version>
</dependency>
</dependencies> </dependencies>
<build> <build>

View File

@ -10,7 +10,10 @@ import org.gcube.portlet.user.userstatisticsportlet.client.ui.CommentsAndLikesWi
import org.gcube.portlet.user.userstatisticsportlet.client.ui.StatisticWidget; import org.gcube.portlet.user.userstatisticsportlet.client.ui.StatisticWidget;
import org.gcube.portlet.user.userstatisticsportlet.shared.PostsStatsBean; import org.gcube.portlet.user.userstatisticsportlet.shared.PostsStatsBean;
import org.gcube.portlet.user.userstatisticsportlet.shared.UserInformation; import org.gcube.portlet.user.userstatisticsportlet.shared.UserInformation;
import org.gcube.portlets.widgets.widgettour.client.extendedclasses.GCubeTour;
import com.ait.toolkit.hopscotch.client.Placement;
import com.ait.toolkit.hopscotch.client.TourStep;
import com.github.gwtbootstrap.client.ui.Button; import com.github.gwtbootstrap.client.ui.Button;
import com.github.gwtbootstrap.client.ui.constants.ButtonType; import com.github.gwtbootstrap.client.ui.constants.ButtonType;
import com.google.gwt.core.client.GWT; import com.google.gwt.core.client.GWT;
@ -413,6 +416,52 @@ public class StatisticsPanel extends Composite {
} }
}); });
if(!isRoot){
// Build a tour example (please look at WidgetTour.html)
GCubeTour tour = new GCubeTour("tour-example", "user-statistics-portlet", 1, null, "VRE Tour");
tour.setShowPrevButton(true);
// add steps
TourStep firstStep = new TourStep(Placement.BOTTOM, "heading");
firstStep.setContent("Welcome to this VRE. Click next to see what if offers to you");
firstStep.setTitle("Welcome");
firstStep.centerXOffset();
firstStep.centerArrowOffset();
tour.addStep(firstStep);
// another
TourStep secondStep = new TourStep(Placement.RIGHT, "statistics-container");
secondStep.setContent("Here your main statistics are reported");
secondStep.setTitle("User Statistics");
tour.addStep(secondStep);
// another
TourStep thirdStep = new TourStep(Placement.BOTTOM, "shareUpdateDiv");
thirdStep.setContent("Here you can share your updates puttin text, attaching files (drag and drop can be used)"
+ " and much more!");
thirdStep.setTitle("Share Updates");
tour.addStep(thirdStep);
TourStep fourthStep = new TourStep(Placement.TOP, "newsfeedDIV");
fourthStep.setContent("Here you can see the most recent updates made by VRE's users");
fourthStep.setTitle("News");
tour.addStep(fourthStep);
TourStep fifthStep = new TourStep(Placement.RIGHT, "invite-friends-DIV");
fifthStep.setContent("Invite your friends that want to share information with us!");
fifthStep.setTitle("Invite Friends");
tour.addStep(fifthStep);
TourStep sixthStep = new TourStep(Placement.LEFT, "LoggedinDiv");
sixthStep.setContent("Here you can see the current VRE description");
sixthStep.setTitle("VRE Description");
tour.addStep(sixthStep);
// start the tour
tour.startTour();
}
} }
/** /**

View File

@ -4,6 +4,7 @@
<inherits name='com.google.gwt.user.User' /> <inherits name='com.google.gwt.user.User' />
<!-- Other module inherits --> <!-- Other module inherits -->
<inherits name='org.gcube.portlets.widgets.widgettour.WidgetTour' />
<inherits name='org.gcube.portlets.user.gcubewidgets.WidgetFactory' /> <inherits name='org.gcube.portlets.user.gcubewidgets.WidgetFactory' />
<inherits name='org.gcube.portal.databook.GCubeSocialNetworking' /> <inherits name='org.gcube.portal.databook.GCubeSocialNetworking' />
@ -13,7 +14,8 @@
<!-- Other module inherits --> <!-- Other module inherits -->
<inherits name="net.eliasbalasis.tibcopagebus4gwt.tibcopagebus4gwt" /> <inherits name="net.eliasbalasis.tibcopagebus4gwt.tibcopagebus4gwt" />
<inherits name="org.jsonmaker.gwt.Gwt_jsonmaker" /> <inherits name="org.jsonmaker.gwt.Gwt_jsonmaker" />
<inherits name="net.eliasbalasis.tibcopagebus4gwt.testsubscriber.TestSubscriber" /> <inherits
name="net.eliasbalasis.tibcopagebus4gwt.testsubscriber.TestSubscriber" />
<!-- Specify the app entry point class. --> <!-- Specify the app entry point class. -->
<entry-point <entry-point

View File

@ -24,6 +24,16 @@
<url-pattern>/statistics/scopeService</url-pattern> <url-pattern>/statistics/scopeService</url-pattern>
</servlet-mapping> </servlet-mapping>
<servlet>
<servlet-name>widgettourServlet</servlet-name>
<servlet-class>org.gcube.portlets.widgets.widgettour.server.TourManagerServicesImpl</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>widgettourServlet</servlet-name>
<url-pattern>/statistics/tourmanagerservice</url-pattern>
</servlet-mapping>
<!-- Default page to serve --> <!-- Default page to serve -->
<welcome-file-list> <welcome-file-list>
<welcome-file>Statistics.html</welcome-file> <welcome-file>Statistics.html</welcome-file>