rich text editor works

git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/portlets/user/reports@98012 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Massimiliano Assante 2014-06-30 10:15:19 +00:00
parent 70e7d0ad9c
commit 33f033f2db
7 changed files with 20 additions and 9 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/reports-4.9.1-SNAPSHOT/WEB-INF/classes" path="src/main/java"> <classpathentry kind="src" output="target/reports-4.9.2-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/reports-4.9.1-SNAPSHOT/WEB-INF/classes"/> <classpathentry kind="output" path="target/reports-4.9.2-SNAPSHOT/WEB-INF/classes"/>
</classpath> </classpath>

View File

@ -2,6 +2,6 @@
<<<<<<<=.mine <<<<<<<=.mine
>>>>>>>=.r71295 >>>>>>>=.r71295
eclipse.preferences.version=1 eclipse.preferences.version=1
lastWarOutDir=/Users/massi/Documents/workspace/reports/target/reports-4.9.1-SNAPSHOT lastWarOutDir=/Users/massi/Documents/workspace/reports/target/reports-4.9.2-SNAPSHOT
warSrcDir=src/main/webapp warSrcDir=src/main/webapp
warSrcDirIsOutput=false warSrcDirIsOutput=false

View File

@ -10,9 +10,6 @@
<dependent-module archiveName="gcube-reporting-library-3.5.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/gcube-reporting-library/gcube-reporting-library"> <dependent-module archiveName="gcube-reporting-library-3.5.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/gcube-reporting-library/gcube-reporting-library">
<dependency-type>uses</dependency-type> <dependency-type>uses</dependency-type>
</dependent-module> </dependent-module>
<dependent-module archiveName="fileupload-progress-bar-1.2.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/fileupload-progress-bar/fileupload-progress-bar">
<dependency-type>uses</dependency-type>
</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"/>
<property name="context-root" value="reports"/> <property name="context-root" value="reports"/>
</wb-module> </wb-module>

View File

@ -12,7 +12,7 @@
<groupId>org.gcube.portlets.user</groupId> <groupId>org.gcube.portlets.user</groupId>
<artifactId>reports</artifactId> <artifactId>reports</artifactId>
<packaging>war</packaging> <packaging>war</packaging>
<version>4.9.1-SNAPSHOT</version> <version>4.9.2-SNAPSHOT</version>
<name>gCube Reports Manager</name> <name>gCube Reports Manager</name>
<description> <description>
gCube Reports Portlet. gCube Reports Portlet.

View File

@ -233,6 +233,7 @@ public class TemplateComponent {
height = 40; height = 40;
D4sRichTextarea ta = new D4sRichTextarea(sc.getId(), sc.getType(), presenter, sc.getX(), sc.getY(),width, height, getUserComments() != null, showClose, owner); D4sRichTextarea ta = new D4sRichTextarea(sc.getId(), sc.getType(), presenter, sc.getX(), sc.getY(),width, height, getUserComments() != null, showClose, owner);
ta.setHTML((String) sc.getPossibleContent()); ta.setHTML((String) sc.getPossibleContent());
ta.setMetadata(sc.getMetadata());
//ta.setStyleName("cw-RichText"); //ta.setStyleName("cw-RichText");
ta.setPixelSize(width, height); ta.setPixelSize(width, height);
this.content = ta; this.content = ta;
@ -441,6 +442,7 @@ public class TemplateComponent {
else { else {
content = ((D4sRichTextarea) this.content).getHTML(); content = ((D4sRichTextarea) this.content).getHTML();
id = ((D4sRichTextarea) this.content).getId(); id = ((D4sRichTextarea) this.content).getId();
metas = ((D4sRichTextarea) this.content).getMetadata();
} }
break; break;
case HEADING_1: case HEADING_1:

View File

@ -54,7 +54,8 @@ public class BasicTextArea extends TextArea {
addFocusHandler(new FocusHandler() { addFocusHandler(new FocusHandler() {
@Override @Override
public void onFocus(FocusEvent event) { public void onFocus(FocusEvent event) {
autoSizeIt(myId, height); autoSizeIt(myId, height);
presenter.addTextToolBar(false);
} }
}); });
} }

View File

@ -1,6 +1,9 @@
package org.gcube.portlets.user.reportgenerator.client.targets; package org.gcube.portlets.user.reportgenerator.client.targets;
import java.util.List;
import org.gcube.portlets.d4sreporting.common.shared.ComponentType; import org.gcube.portlets.d4sreporting.common.shared.ComponentType;
import org.gcube.portlets.d4sreporting.common.shared.Metadata;
import org.gcube.portlets.user.reportgenerator.client.ReportGenerator; import org.gcube.portlets.user.reportgenerator.client.ReportGenerator;
import org.gcube.portlets.user.reportgenerator.client.Presenter.Presenter; import org.gcube.portlets.user.reportgenerator.client.Presenter.Presenter;
@ -30,7 +33,8 @@ import com.google.gwt.user.client.ui.Widget;
* @version October 2008 (0.2) * @version October 2008 (0.2)
*/ */
public class D4sRichTextarea extends ReportTextArea { public class D4sRichTextarea extends ReportTextArea {
//the properties associated
private List<Metadata> metas;
/** /**
* the text area * the text area
*/ */
@ -145,7 +149,14 @@ public class D4sRichTextarea extends ReportTextArea {
currHeight = height + 20; currHeight = height + 20;
} }
} }
public List<Metadata> getMetadata() {
return metas;
}
public void setMetadata(List<Metadata> metas) {
this.metas = metas;
}
/** /**
* *
* @return . * @return .