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:
parent
5b1f933e26
commit
d8d9ab70f2
|
@ -4,6 +4,7 @@
|
||||||
<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>
|
||||||
|
|
4
pom.xml
4
pom.xml
|
@ -56,6 +56,10 @@
|
||||||
</dependencyManagement>
|
</dependencyManagement>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.github.gwtbootstrap</groupId>
|
||||||
|
<artifactId>gwt-bootstrap</artifactId>
|
||||||
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.google.gwt</groupId>
|
<groupId>com.google.gwt</groupId>
|
||||||
<artifactId>gwt-servlet</artifactId>
|
<artifactId>gwt-servlet</artifactId>
|
||||||
|
|
|
@ -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.PostsStatsBean;
|
||||||
import org.gcube.portlet.user.userstatisticsportlet.shared.UserInformation;
|
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.core.client.GWT;
|
||||||
import com.google.gwt.event.dom.client.ClickEvent;
|
import com.google.gwt.event.dom.client.ClickEvent;
|
||||||
import com.google.gwt.event.dom.client.ClickHandler;
|
import com.google.gwt.event.dom.client.ClickHandler;
|
||||||
import com.google.gwt.i18n.client.NumberFormat;
|
import com.google.gwt.i18n.client.NumberFormat;
|
||||||
import com.google.gwt.user.client.Window;
|
import com.google.gwt.user.client.Window;
|
||||||
import com.google.gwt.user.client.rpc.AsyncCallback;
|
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.Composite;
|
||||||
import com.google.gwt.user.client.ui.FlowPanel;
|
import com.google.gwt.user.client.ui.FlowPanel;
|
||||||
import com.google.gwt.user.client.ui.HTML;
|
import com.google.gwt.user.client.ui.HTML;
|
||||||
|
@ -311,6 +312,7 @@ public class StatisticsPanel extends Composite {
|
||||||
if(profileStrengthInt < profileImproveThreshold){
|
if(profileStrengthInt < profileImproveThreshold){
|
||||||
|
|
||||||
final Button improveProfileButton = new Button(IMPROVE_BUTTON_LABEL);
|
final Button improveProfileButton = new Button(IMPROVE_BUTTON_LABEL);
|
||||||
|
improveProfileButton.setType(ButtonType.WARNING);
|
||||||
improveProfileButton.setTitle("Improve your profile.");
|
improveProfileButton.setTitle("Improve your profile.");
|
||||||
|
|
||||||
improveProfileButton.addClickHandler(new ClickHandler() {
|
improveProfileButton.addClickHandler(new ClickHandler() {
|
||||||
|
@ -325,7 +327,7 @@ public class StatisticsPanel extends Composite {
|
||||||
});
|
});
|
||||||
|
|
||||||
profileStrengthLabel.setStyleName("statistic-value-inline");
|
profileStrengthLabel.setStyleName("statistic-value-inline");
|
||||||
improveProfileButton.setStyleName("button-improve-profile");
|
improveProfileButton.addStyleName("button-improve-profile");
|
||||||
profileStrength.appendToPanel(improveProfileButton);
|
profileStrength.appendToPanel(improveProfileButton);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -118,7 +118,7 @@ public class UserStatisticsServiceImpl extends RemoteServiceServlet implements U
|
||||||
*/
|
*/
|
||||||
public String getDevelopmentUser() {
|
public String getDevelopmentUser() {
|
||||||
String user = userid;
|
String user = userid;
|
||||||
// user = "massimiliano.assante";
|
// user = "costantino.perciante";
|
||||||
return user;
|
return user;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -7,6 +7,9 @@
|
||||||
<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' />
|
||||||
|
|
||||||
|
<!-- Bootstrap import -->
|
||||||
|
<inherits name="com.github.gwtbootstrap.Bootstrap" />
|
||||||
|
|
||||||
<!-- 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" />
|
||||||
|
|
Loading…
Reference in New Issue