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"?> <?xml version="1.0" encoding="UTF-8"?>
<classpath> <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> <attributes>
<attribute name="optional" value="true"/> <attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/> <attribute name="maven.pomderived" value="true"/>
@ -31,5 +31,5 @@
<attribute name="maven.pomderived" value="true"/> <attribute name="maven.pomderived" value="true"/>
</attributes> </attributes>
</classpathentry> </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> </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"> <?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="/target/m2e-wtp/web-resources"/>
<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"/>
<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> <dependency-type>uses</dependency-type>
</dependent-module> </dependent-module>
<property name="java-output-path" value="/${module}/target/www/WEB-INF/classes"/> <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="jst.web" version="2.3"/>
<installed facet="wst.jsdt.web" version="1.0"/> <installed facet="wst.jsdt.web" version="1.0"/>
<installed facet="java" version="1.7"/> <installed facet="java" version="1.7"/>
<installed facet="liferay.portlet" version="6.0"/>
</faceted-project> </faceted-project>

23
pom.xml
View File

@ -13,10 +13,10 @@
<groupId>org.gcube.portlets.user</groupId> <groupId>org.gcube.portlets.user</groupId>
<artifactId>questions</artifactId> <artifactId>questions</artifactId>
<packaging>war</packaging> <packaging>war</packaging>
<version>1.0.0-SNAPSHOT</version> <version>1.1.0-SNAPSHOT</version>
<name>gCube Questions Ask Managers Portlet</name> <name>gCube Questions Ask Managers Portlet</name>
<description> <description>
VRE Managers Message VRE Managers
</description> </description>
<scm> <scm>
<connection>scm:svn:http://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/${project.artifactId}</connection> <connection>scm:svn:http://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/${project.artifactId}</connection>
@ -25,7 +25,7 @@
</scm> </scm>
<properties> <properties>
<!-- Convenience property to set the GWT version --> <!-- Convenience property to set the GWT version -->
<gwtVersion>2.5.1</gwtVersion> <gwtVersion>2.7.0</gwtVersion>
<distroDirectory>distro</distroDirectory> <distroDirectory>distro</distroDirectory>
<maven.compiler.source>1.7</maven.compiler.source> <maven.compiler.source>1.7</maven.compiler.source>
<maven.compiler.target>1.7</maven.compiler.target> <maven.compiler.target>1.7</maven.compiler.target>
@ -48,14 +48,27 @@
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>com.google.gwt</groupId> <groupId>com.google.gwt</groupId>
<artifactId>gwt-user</artifactId> <artifactId>gwt-servlet</artifactId>
<version>${gwtVersion}</version>
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.google.gwt</groupId> <groupId>com.google.gwt</groupId>
<artifactId>gwt-servlet</artifactId> <artifactId>gwt-user</artifactId>
<version>${gwtVersion}</version>
<scope>provided</scope> <scope>provided</scope>
</dependency> </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> <dependency>
<groupId>org.gcube.portlets.user</groupId> <groupId>org.gcube.portlets.user</groupId>
<artifactId>gcube-widgets</artifactId> <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.user.questions.client.ui.DisplayBadge;
import org.gcube.portlets.widgets.wsmail.client.forms.MailForm; 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.GWT;
import com.google.gwt.core.client.RunAsyncCallback; import com.google.gwt.core.client.RunAsyncCallback;
import com.google.gwt.event.dom.client.ClickEvent; 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.HasVerticalAlignment;
import com.google.gwt.user.client.ui.HorizontalPanel; import com.google.gwt.user.client.ui.HorizontalPanel;
import com.google.gwt.user.client.ui.Image; import com.google.gwt.user.client.ui.Image;
import com.google.gwt.user.client.ui.SimplePanel;
import com.google.gwt.user.client.ui.VerticalPanel; import com.google.gwt.user.client.ui.VerticalPanel;
public class VREManagersPanel extends Composite { public class VREManagersPanel extends Composite {
@ -29,6 +31,7 @@ public class VREManagersPanel extends Composite {
private Image loadingImage; private Image loadingImage;
private Image postToImage; private Image postToImage;
private Button messageManagers = new Button();
private VerticalPanel mainPanel = new VerticalPanel(); private VerticalPanel mainPanel = new VerticalPanel();
private ArrayList<UserInfo> managers; private ArrayList<UserInfo> managers;
@ -48,17 +51,15 @@ public class VREManagersPanel extends Composite {
mainPanel.clear(); mainPanel.clear();
mainPanel.setHorizontalAlignment(HasAlignment.ALIGN_LEFT); mainPanel.setHorizontalAlignment(HasAlignment.ALIGN_LEFT);
mainPanel.setVerticalAlignment(HasVerticalAlignment.ALIGN_TOP); mainPanel.setVerticalAlignment(HasVerticalAlignment.ALIGN_TOP);
mainPanel.setStyleName("questions-frame"); mainPanel.setStyleName("invites-frame");
HTML name = new HTML(DISPLAY_NAME); HTML name = new HTML(DISPLAY_NAME);
name.setStyleName("questions-title"); name.setStyleName("questions-title");
name.addStyleName("manager-action");
HorizontalPanel hp = new HorizontalPanel(); HorizontalPanel hp = new HorizontalPanel();
hp.add(name); hp.add(name);
hp.setStyleName("manager-action");
postToImage.setStyleName("manager-post-image"); postToImage.setStyleName("manager-post-image");
postToImage.setTitle("Message privately to the Managers"); postToImage.setTitle("Message privately to the Managers");
hp.add(postToImage); // hp.add(postToImage);
mainPanel.add(hp); mainPanel.add(hp);
if (users == null || users.isEmpty()) { 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>")); 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++) { for (int i = 0; i < users.size(); i++) {
mainPanel.add(new DisplayBadge(users.get(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 @Override
@ -79,7 +88,7 @@ public class VREManagersPanel extends Composite {
}); });
initWidget(mainPanel); initWidget(mainPanel);
postToImage.addClickHandler(new ClickHandler() { messageManagers.addClickHandler(new ClickHandler() {
@Override @Override
public void onClick(ClickEvent event) { public void onClick(ClickEvent event) {
final List<String> listToLogin = new ArrayList<String>(); final List<String> listToLogin = new ArrayList<String>();

View File

@ -2,9 +2,9 @@
<module rename-to='questions'> <module rename-to='questions'>
<!-- Inherit the core Web Toolkit stuff. --> <!-- Inherit the core Web Toolkit stuff. -->
<inherits name='com.google.gwt.user.User' /> <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 --> <!-- 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.user.gcubewidgets.WidgetFactory' />
<inherits name='org.gcube.portlets.widgets.wsmail.WsMail_Widget' /> <inherits name='org.gcube.portlets.widgets.wsmail.WsMail_Widget' />
<inherits name='org.gcube.portal.databook.GCubeSocialNetworking' /> <inherits name='org.gcube.portal.databook.GCubeSocialNetworking' />

View File

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