Revised social networking library mechanism for http links, mentions and hashtags recognition, Task #13207

testing passed

git-svn-id: https://svn.research-infrastructures.eu/d4science/gcube/trunk/portlets/user/share-updates@178783 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Massimiliano Assante 2019-03-29 11:44:15 +00:00
parent 44c92bd0ab
commit f27bc29082
11 changed files with 93 additions and 13 deletions

View File

@ -1,12 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" output="target/share-updates-2.6.3-SNAPSHOT/WEB-INF/classes" path="src/main/java">
<classpathentry kind="src" output="target/share-updates-2.7.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/share-updates-2.6.3-SNAPSHOT/WEB-INF/classes" path="src/main/resources">
<classpathentry excluding="**" kind="src" output="target/share-updates-2.7.0-SNAPSHOT/WEB-INF/classes" path="src/main/resources">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
@ -15,11 +15,13 @@
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
<attribute name="test" value="true"/>
</attributes>
</classpathentry>
<classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources">
<attributes>
<attribute name="maven.pomderived" value="true"/>
<attribute name="test" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER">
@ -30,6 +32,7 @@
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
<attributes>
<attribute name="maven.pomderived" value="true"/>
<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
@ -37,5 +40,5 @@
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="target/share-updates-2.6.3-SNAPSHOT/WEB-INF/classes"/>
<classpathentry kind="output" path="target/share-updates-2.7.0-SNAPSHOT/WEB-INF/classes"/>
</classpath>

View File

@ -40,6 +40,16 @@
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>com.gwtplugins.gdt.eclipse.core.webAppProjectValidator</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>com.gwtplugins.gwt.eclipse.core.gwtProjectValidator</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
@ -56,5 +66,6 @@
<nature>org.eclipse.wst.jsdt.core.jsNature</nature>
<nature>com.google.gwt.eclipse.core.gwtNature</nature>
<nature>com.liferay.ide.core.liferayNature</nature>
<nature>com.gwtplugins.gwt.eclipse.core.gwtNature</nature>
</natures>
</projectDescription>

View File

@ -0,0 +1,4 @@
eclipse.preferences.version=1
lastWarOutDir=/Users/massi/Documents/workspace/share-updates/target/share-updates-2.7.0-SNAPSHOT
warSrcDir=src/main/webapp
warSrcDirIsOutput=false

View File

@ -5,4 +5,5 @@ org.eclipse.jdt.core.compiler.compliance=1.7
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.release=disabled
org.eclipse.jdt.core.compiler.source=1.7

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0">
<wb-module deploy-name="share-updates-portlet">
<wb-module deploy-name="share-updates">
<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"/>
@ -11,7 +11,7 @@
<dependent-module archiveName="pickitem-widget-2.0.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/pickitem-widget/pickitem-widget">
<dependency-type>uses</dependency-type>
</dependent-module>
<dependent-module archiveName="social-util-library-1.4.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/social-util-library/social-util-library">
<dependent-module archiveName="social-util-library-1.6.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/social-util-library/social-util-library">
<dependency-type>uses</dependency-type>
</dependent-module>
<dependent-module archiveName="fileupload-progress-bar-1.6.1-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/fileupload-progress-bar/fileupload-progress-bar">

View File

@ -6,4 +6,5 @@
<installed facet="jst.jaxrs" version="2.0"/>
<installed facet="jst.web" version="3.0"/>
<installed facet="java" version="1.7"/>
<installed facet="com.gwtplugins.gwt.facet" version="1.0"/>
</faceted-project>

View File

@ -1,4 +1,8 @@
<ReleaseNotes>
<Changeset component="org.gcube.portlets-user.shareupdates.2-7-0"
date="2019-03-29">
<Change>Revised social networking library mechanism for http links, mentions and hashtags recognition, Task #13207</Change>
</Changeset>
<Changeset component="org.gcube.portlets-user.shareupdates.2-6-2"
date="2019-01-04">
<Change>Incident #13096, mentioning in some VRE may not work</Change>

View File

@ -13,7 +13,7 @@
<groupId>org.gcube.portlets.user</groupId>
<artifactId>share-updates</artifactId>
<packaging>war</packaging>
<version>2.6.3-SNAPSHOT</version>
<version>2.7.0-SNAPSHOT</version>
<name>gCube Share Updates Portlet</name>
<description>
gCube Share Updates for exchanging updates with other users of VREs.
@ -254,11 +254,10 @@
</goals>
</execution>
</executions>
<!-- Plugin configuration. There are many available options, see gwt-maven-plugin
documentation at codehaus.org -->
<configuration>
<runTarget>ShareUpdates.html</runTarget>
<hostedWebapp>${webappDirectory}</hostedWebapp>
<extraJvmArgs>-Dlogback.configurationFile=portal-logback.xml</extraJvmArgs>
</configuration>
</plugin>

View File

@ -486,10 +486,7 @@ public class ShareUpdateForm extends Composite {
// escape html text
String toShareText = escapeHtml(textToPost);
if (! checkTextLength(toShareText)) {
Window.alert("We found a single word containing more than 50 chars and it's not a link, is it meaningful?");
return;
}
// disable text edit and submission button
enableSubmitButtons(false);
shareTextArea.setEnabled(false);

View File

@ -16,7 +16,6 @@ import org.gcube.portlets.widgets.pickitem.shared.ItemBean;
import com.google.gwt.core.client.GWT;
import com.google.gwt.dom.client.Element;
import com.google.gwt.dom.client.Node;
import com.google.gwt.dom.client.NodeList;
import com.google.gwt.event.dom.client.KeyCodes;
import com.google.gwt.event.dom.client.KeyPressEvent;

View File

@ -0,0 +1,61 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- For assistance related to logback-translator or configuration -->
<!-- files in general, please contact the logback user mailing list -->
<!-- at http://www.qos.ch/mailman/listinfo/logback-user -->
<!-- -->
<!-- For professional support please see -->
<!-- http://www.qos.ch/shop/products/professionalSupport -->
<!-- -->
<configuration>
<appender name="CA" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>[PORTAL] %-4r [%t] %-5p %c - %m%n</pattern>
</encoder>
</appender>
<appender name="GCUBE" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%d{ISO8601} %-5p %c{2} [%t,%M:%L]</pattern>
</encoder>
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
<level>DEBUG</level>
</filter>
</appender>
<logger name="org.gcube" level="TRACE">
<appender-ref ref="GCUBE"/>
</logger>
<logger name="org.gcube.portlets.user.homelibrary" level="INFO CA"/>
<logger name="org.gcube.common.core.utils.events" level="INFO">
<appender-ref ref="CA"/>
</logger>
<logger name="org.gcube.common.scope.impl" level="INFO">
<appender-ref ref="CA"/>
</logger>
<logger name="org.gcube.portlets.widgets.workspaceuploader.server" level="WARN">
<appender-ref ref="CA"/>
</logger>
<logger name="org.gcube.common.authorization.client.proxy" level="INFO">
<appender-ref ref="CA"/>
</logger>
<logger name="org.gcube.smartgears.handlers" level="INFO">
<appender-ref ref="CA"/>
</logger>
<logger name=" log4j.logger.org.gcube.portal.threadlocalexec" level="DEBUG">
<appender-ref ref="CA"/>
</logger>
<logger name="org.gcube.informationsystem.publisher" level="INFO">
<appender-ref ref="CA"/>
</logger>
<logger name="com.couchbase.client" level="ERROR">
<appender-ref ref="CA"/>
</logger>
<logger name="org.apache.jasper.compiler.TldLocationsCache.level" level="ERROR">
<appender-ref ref="CA"/>
</logger>
<logger name="org.gcube.common.resources.kxml" level="ERROR">
<appender-ref ref="CA"/>
</logger>
<root level="INFO">
<appender-ref ref="CA"/>
</root>
</configuration>