Integrated gwt-bootstrap and revised css, ported to GWT 2.7.0

git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/portlets/user/questions@114479 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Massimiliano Assante 2015-04-28 13:37:50 +00:00
parent e1cf4e9650
commit b64ec9686d
8 changed files with 44 additions and 18 deletions

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" output="target/questions-1.0.0-SNAPSHOT/WEB-INF/classes" path="src/main/java">
<classpathentry kind="src" output="target/questions-1.1.0-SNAPSHOT/WEB-INF/classes" path="src/main/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
@ -31,5 +31,5 @@
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="target/questions-1.0.0-SNAPSHOT/WEB-INF/classes"/>
<classpathentry kind="output" path="target/questions-1.1.0-SNAPSHOT/WEB-INF/classes"/>
</classpath>

View File

@ -0,0 +1,3 @@
eclipse.preferences.version=1
validateFragments=false
validation.use-project-settings=true

View File

@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0">
<wb-module deploy-name="${module}">
<wb-module deploy-name="questions-portlet">
<wb-resource deploy-path="/" source-path="/target/m2e-wtp/web-resources"/>
<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"/>
<dependent-module archiveName="wsmail-widget-1.7.2-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/wsmail-widget/wsmail-widget">
<dependent-module archiveName="session-checker-0.3.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/session-checker/session-checker">
<dependency-type>uses</dependency-type>
</dependent-module>
<property name="java-output-path" value="/${module}/target/www/WEB-INF/classes"/>

View File

@ -4,4 +4,5 @@
<installed facet="jst.web" version="2.3"/>
<installed facet="wst.jsdt.web" version="1.0"/>
<installed facet="java" version="1.7"/>
<installed facet="liferay.portlet" version="6.0"/>
</faceted-project>

23
pom.xml
View File

@ -13,10 +13,10 @@
<groupId>org.gcube.portlets.user</groupId>
<artifactId>questions</artifactId>
<packaging>war</packaging>
<version>1.0.0-SNAPSHOT</version>
<version>1.1.0-SNAPSHOT</version>
<name>gCube Questions Ask Managers Portlet</name>
<description>
VRE Managers
Message VRE Managers
</description>
<scm>
<connection>scm:svn:http://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/${project.artifactId}</connection>
@ -25,7 +25,7 @@
</scm>
<properties>
<!-- Convenience property to set the GWT version -->
<gwtVersion>2.5.1</gwtVersion>
<gwtVersion>2.7.0</gwtVersion>
<distroDirectory>distro</distroDirectory>
<maven.compiler.source>1.7</maven.compiler.source>
<maven.compiler.target>1.7</maven.compiler.target>
@ -48,14 +48,27 @@
<dependencies>
<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt-user</artifactId>
<artifactId>gwt-servlet</artifactId>
<version>${gwtVersion}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt-servlet</artifactId>
<artifactId>gwt-user</artifactId>
<version>${gwtVersion}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt-dev</artifactId>
<version>${gwtVersion}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.github.gwtbootstrap</groupId>
<artifactId>gwt-bootstrap</artifactId>
<version>2.3.2.0</version>
</dependency>
<dependency>
<groupId>org.gcube.portlets.user</groupId>
<artifactId>gcube-widgets</artifactId>

View File

@ -8,6 +8,7 @@ import org.gcube.portlets.user.questions.client.resources.Images;
import org.gcube.portlets.user.questions.client.ui.DisplayBadge;
import org.gcube.portlets.widgets.wsmail.client.forms.MailForm;
import com.github.gwtbootstrap.client.ui.Button;
import com.google.gwt.core.client.GWT;
import com.google.gwt.core.client.RunAsyncCallback;
import com.google.gwt.event.dom.client.ClickEvent;
@ -20,6 +21,7 @@ import com.google.gwt.user.client.ui.HasAlignment;
import com.google.gwt.user.client.ui.HasVerticalAlignment;
import com.google.gwt.user.client.ui.HorizontalPanel;
import com.google.gwt.user.client.ui.Image;
import com.google.gwt.user.client.ui.SimplePanel;
import com.google.gwt.user.client.ui.VerticalPanel;
public class VREManagersPanel extends Composite {
@ -29,6 +31,7 @@ public class VREManagersPanel extends Composite {
private Image loadingImage;
private Image postToImage;
private Button messageManagers = new Button();
private VerticalPanel mainPanel = new VerticalPanel();
private ArrayList<UserInfo> managers;
@ -48,17 +51,15 @@ public class VREManagersPanel extends Composite {
mainPanel.clear();
mainPanel.setHorizontalAlignment(HasAlignment.ALIGN_LEFT);
mainPanel.setVerticalAlignment(HasVerticalAlignment.ALIGN_TOP);
mainPanel.setStyleName("questions-frame");
mainPanel.setStyleName("invites-frame");
HTML name = new HTML(DISPLAY_NAME);
name.setStyleName("questions-title");
name.addStyleName("manager-action");
HorizontalPanel hp = new HorizontalPanel();
hp.add(name);
hp.setStyleName("manager-action");
postToImage.setStyleName("manager-post-image");
postToImage.setTitle("Message privately to the Managers");
hp.add(postToImage);
// hp.add(postToImage);
mainPanel.add(hp);
if (users == null || users.isEmpty()) {
mainPanel.add(new HTML("<div class=\"frame\" style=\"font-size: 16px;\">Ops, something went wrong. Please <a href=\"javascript: location.reload();\">reload<a/> this page.</div>"));
@ -66,7 +67,15 @@ public class VREManagersPanel extends Composite {
for (int i = 0; i < users.size(); i++) {
mainPanel.add(new DisplayBadge(users.get(i)));
}
if (users.size() > 1)
messageManagers.setText("Message managers");
else
messageManagers.setText("Message manager");
}
SimplePanel bPanel = new SimplePanel();
bPanel.setStyleName("manager-action");
bPanel.setWidget(messageManagers);
mainPanel.add(bPanel);
}
@Override
@ -79,7 +88,7 @@ public class VREManagersPanel extends Composite {
});
initWidget(mainPanel);
postToImage.addClickHandler(new ClickHandler() {
messageManagers.addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
final List<String> listToLogin = new ArrayList<String>();

View File

@ -2,9 +2,9 @@
<module rename-to='questions'>
<!-- Inherit the core Web Toolkit stuff. -->
<inherits name='com.google.gwt.user.User' />
<!-- <set-property name="user.agent" value="gecko1_8" /> -->
<!-- <set-property name="user.agent" value="safari" /> -->
<!-- Other module inherits -->
<!-- inherits GCUBE Widgets -->
<inherits name="com.github.gwtbootstrap.Bootstrap" />
<inherits name='org.gcube.portlets.user.gcubewidgets.WidgetFactory' />
<inherits name='org.gcube.portlets.widgets.wsmail.WsMail_Widget' />
<inherits name='org.gcube.portal.databook.GCubeSocialNetworking' />

View File

@ -7,7 +7,7 @@
font-size: 16px;
color: #555;
font-weight: 400;
margin-bottom: 10px;
margin-bottom: 5px;
}
.questions-frame {
@ -37,7 +37,7 @@
}
.manager-action {
padding: 5px;
padding: 10px 0px;
}
.manager-post-image:hover {