Added bootstrap to change the improve profile strenght button

git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/portlets/user/user-statistics@126965 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Costantino Perciante 2016-04-11 09:41:33 +00:00
parent 5b1f933e26
commit d8d9ab70f2
5 changed files with 13 additions and 3 deletions

View File

@ -4,6 +4,7 @@
<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/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="context-root" value="user-statistics"/>
</wb-module>

View File

@ -56,6 +56,10 @@
</dependencyManagement>
<dependencies>
<dependency>
<groupId>com.github.gwtbootstrap</groupId>
<artifactId>gwt-bootstrap</artifactId>
</dependency>
<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt-servlet</artifactId>

View File

@ -11,13 +11,14 @@ import org.gcube.portlet.user.userstatisticsportlet.client.ui.StatisticWidget;
import org.gcube.portlet.user.userstatisticsportlet.shared.PostsStatsBean;
import org.gcube.portlet.user.userstatisticsportlet.shared.UserInformation;
import com.github.gwtbootstrap.client.ui.Button;
import com.github.gwtbootstrap.client.ui.constants.ButtonType;
import com.google.gwt.core.client.GWT;
import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.i18n.client.NumberFormat;
import com.google.gwt.user.client.Window;
import com.google.gwt.user.client.rpc.AsyncCallback;
import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.FlowPanel;
import com.google.gwt.user.client.ui.HTML;
@ -311,6 +312,7 @@ public class StatisticsPanel extends Composite {
if(profileStrengthInt < profileImproveThreshold){
final Button improveProfileButton = new Button(IMPROVE_BUTTON_LABEL);
improveProfileButton.setType(ButtonType.WARNING);
improveProfileButton.setTitle("Improve your profile.");
improveProfileButton.addClickHandler(new ClickHandler() {
@ -325,7 +327,7 @@ public class StatisticsPanel extends Composite {
});
profileStrengthLabel.setStyleName("statistic-value-inline");
improveProfileButton.setStyleName("button-improve-profile");
improveProfileButton.addStyleName("button-improve-profile");
profileStrength.appendToPanel(improveProfileButton);
}

View File

@ -118,7 +118,7 @@ public class UserStatisticsServiceImpl extends RemoteServiceServlet implements U
*/
public String getDevelopmentUser() {
String user = userid;
// user = "massimiliano.assante";
// user = "costantino.perciante";
return user;
}

View File

@ -6,6 +6,9 @@
<!-- Other module inherits -->
<inherits name='org.gcube.portlets.user.gcubewidgets.WidgetFactory' />
<inherits name='org.gcube.portal.databook.GCubeSocialNetworking' />
<!-- Bootstrap import -->
<inherits name="com.github.gwtbootstrap.Bootstrap" />
<!-- Other module inherits -->
<inherits name="net.eliasbalasis.tibcopagebus4gwt.tibcopagebus4gwt" />