fixes for Incident #10262: Cannot see who liked posts on VREs of Parthenos
Feature #10242: add comment taking up to 3 seconds sometime to be delivered in the UI now shows a loader Ported to GWT 2.8.1 git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/portlets/user/news-feed@158422 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
90b34f01a0
commit
79d974bbbd
|
@ -1,12 +1,12 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="src" output="target/news-feed-2.4.0-SNAPSHOT/WEB-INF/classes" path="src/main/java">
|
||||
<classpathentry kind="src" output="target/news-feed-2.5.0-SNAPSHOT/WEB-INF/classes" path="src/main/java">
|
||||
<attributes>
|
||||
<attribute name="optional" value="true"/>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry excluding="**" kind="src" output="target/news-feed-2.4.0-SNAPSHOT/WEB-INF/classes" path="src/main/resources">
|
||||
<classpathentry excluding="**" kind="src" output="target/news-feed-2.5.0-SNAPSHOT/WEB-INF/classes" path="src/main/resources">
|
||||
<attributes>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
|
@ -39,5 +39,5 @@
|
|||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="output" path="target/news-feed-2.4.0-SNAPSHOT/WEB-INF/classes"/>
|
||||
<classpathentry kind="output" path="target/news-feed-2.5.0-SNAPSHOT/WEB-INF/classes"/>
|
||||
</classpath>
|
||||
|
|
|
@ -2,11 +2,11 @@ eclipse.preferences.version=1
|
|||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
|
||||
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
|
||||
org.eclipse.jdt.core.compiler.compliance=1.7
|
||||
org.eclipse.jdt.core.compiler.compliance=1.8
|
||||
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
|
||||
org.eclipse.jdt.core.compiler.debug.localVariable=generate
|
||||
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
|
||||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
|
||||
org.eclipse.jdt.core.compiler.source=1.7
|
||||
org.eclipse.jdt.core.compiler.source=1.8
|
||||
|
|
|
@ -5,6 +5,9 @@
|
|||
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
|
||||
<wb-resource deploy-path="/WEB-INF/classes" source-path="/target/generated-sources/gwt"/>
|
||||
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/resources"/>
|
||||
<dependent-module archiveName="gcube-widgets-2.2.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/gcube-widgets/gcube-widgets">
|
||||
<dependency-type>uses</dependency-type>
|
||||
</dependent-module>
|
||||
<property name="java-output-path" value="/${module}/target/www/WEB-INF/classes"/>
|
||||
<property name="context-root" value="news-feed"/>
|
||||
</wb-module>
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
<faceted-project>
|
||||
<fixed facet="wst.jsdt.web"/>
|
||||
<installed facet="wst.jsdt.web" version="1.0"/>
|
||||
<installed facet="java" version="1.7"/>
|
||||
<installed facet="liferay.portlet" version="6.0"/>
|
||||
<installed facet="jst.jaxrs" version="2.0"/>
|
||||
<installed facet="jst.web" version="3.0"/>
|
||||
<installed facet="java" version="1.8"/>
|
||||
</faceted-project>
|
||||
|
|
|
@ -1 +1,17 @@
|
|||
{"ide":{"scriptPaths":[]},"plugins":{"aui":{},"liferay":{},"yui":{}},"libs":["ecma5","browser"]}
|
||||
{
|
||||
"plugins": {
|
||||
"aui": {
|
||||
|
||||
},
|
||||
"liferay": {
|
||||
|
||||
},
|
||||
"yui": {
|
||||
|
||||
}
|
||||
},
|
||||
"libs": [
|
||||
"ecma5",
|
||||
"browser"
|
||||
]
|
||||
}
|
|
@ -1,4 +1,10 @@
|
|||
<ReleaseNotes>
|
||||
<Changeset component="org.gcube.portlets-user.news-feed.2-5-0"
|
||||
date="2017-11-13">
|
||||
<Change>fixes for Incident #10262: Cannot see who liked posts on VREs of Parthenos</Change>
|
||||
<Change>Feature #10242: add comment taking up to 3 seconds sometime to be delivered in the UI now shows a loader</Change>
|
||||
<Change>Ported to GWT 2.8.1</Change>
|
||||
</Changeset>
|
||||
<Changeset component="org.gcube.portlets-user.news-feed.2-3-0"
|
||||
date="2017-02-20">
|
||||
<Change>fixes for changes to the underneath
|
||||
|
|
28
pom.xml
28
pom.xml
|
@ -12,7 +12,7 @@
|
|||
<groupId>org.gcube.portlets.user</groupId>
|
||||
<artifactId>news-feed</artifactId>
|
||||
<packaging>war</packaging>
|
||||
<version>2.4.0-SNAPSHOT</version>
|
||||
<version>2.5.0-SNAPSHOT</version>
|
||||
|
||||
<name>gCube News Feed Portlet</name>
|
||||
<description>
|
||||
|
@ -25,10 +25,10 @@
|
|||
</scm>
|
||||
<properties>
|
||||
<!-- Convenience property to set the GWT version -->
|
||||
<gwtVersion>2.6.1</gwtVersion>
|
||||
<gwtVersion>2.8.1</gwtVersion>
|
||||
<guavaVersion>18.0</guavaVersion>
|
||||
<distroDirectory>distro</distroDirectory>
|
||||
<maven.compiler.source>1.7</maven.compiler.source>
|
||||
<maven.compiler.source>1.8</maven.compiler.source>
|
||||
<maven.compiler.target>1.8</maven.compiler.target>
|
||||
<webappDirectory>${project.build.directory}/${project.build.finalName}</webappDirectory>
|
||||
<liferay.version>6.2.5</liferay.version>
|
||||
|
@ -53,12 +53,29 @@
|
|||
<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.google.gwt</groupId>
|
||||
<artifactId>gwt-codeserver</artifactId>
|
||||
<version>${gwtVersion}</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.google.gwt</groupId>
|
||||
<artifactId>gwt-servlet</artifactId>
|
||||
<version>${gwtVersion}</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>xml-apis</groupId>
|
||||
<artifactId>xml-apis</artifactId>
|
||||
<version>1.4.01</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.gcube.portlets.user</groupId>
|
||||
<artifactId>gcube-widgets</artifactId>
|
||||
|
@ -185,9 +202,12 @@
|
|||
<version>1.0.3</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<!-- https://mvnrepository.com/artifact/org.gwt-jsonmaker/gwt-jsonmaker -->
|
||||
<dependency>
|
||||
<groupId>com.google</groupId>
|
||||
<groupId>org.gwt-jsonmaker</groupId>
|
||||
<artifactId>gwt-jsonmaker</artifactId>
|
||||
<version>1.3.0</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>net.eliasbalasis</groupId>
|
||||
|
|
|
@ -1299,16 +1299,19 @@ public class NewsFeedPanel extends Composite {
|
|||
}
|
||||
|
||||
private void doAddComment(final TweetTemplate owner, String text, HashSet<String> mentionedUsers) {
|
||||
owner.showCommentingPreloader(true);
|
||||
newsService.comment(owner.getFeedKey(), text, mentionedUsers, owner.getMyFeedUserId(), owner.isAppFeed(), new AsyncCallback<OperationResult>() {
|
||||
@Override
|
||||
public void onFailure(Throwable caught) {
|
||||
owner.showCommentingPreloader(true);
|
||||
Window.alert("Could not deliver this comment: " + caught.getMessage());
|
||||
}
|
||||
@Override
|
||||
public void onSuccess(OperationResult result) {
|
||||
owner.showCommentingPreloader(false);
|
||||
if (result != null) {
|
||||
if (!result.isSuccess()) {
|
||||
//CheckSession.showLogoutDialog();
|
||||
Window.alert("Could not deliver this comment. Please try again in a short while.");
|
||||
}
|
||||
else {
|
||||
Comment comment = (Comment) result.getObject();
|
||||
|
|
|
@ -78,7 +78,7 @@ public class TweetTemplate extends Composite {
|
|||
private int totalComments = 0;
|
||||
private HTML showAllComments = new HTML();
|
||||
private boolean isAppFeed = false;
|
||||
|
||||
private HTML submitCommentPreloader = new HTML("<div class=\"more-comment\"><img style=\"padding-right:15px;\"src=\""+ loading +"\" /></div>");
|
||||
private TweetTemplate myInstance;
|
||||
|
||||
// Carousel from the image-previewer widget
|
||||
|
@ -617,10 +617,21 @@ public class TweetTemplate extends Composite {
|
|||
}
|
||||
|
||||
public void addComment(SingleComment comment) {
|
||||
|
||||
commentsPanel.add(comment);
|
||||
myComments.add(comment);
|
||||
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @param show true to show a preloader, false to hide it.
|
||||
* display a preloader userful when the user is wating for the comment operation to be confirmed by the server
|
||||
*/
|
||||
public void showCommentingPreloader(boolean show) {
|
||||
if (show)
|
||||
commentsPanel.add(submitCommentPreloader);
|
||||
else
|
||||
commentsPanel.remove(submitCommentPreloader);
|
||||
|
||||
}
|
||||
|
||||
public void updateSingleComment(Comment edited, HTMLPanel commentPanel){
|
||||
|
|
Loading…
Reference in New Issue