ADDED SUPPORT FOR RICH TEXT INPUT in VME DB Case
git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/portlets/user/reports@97806 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
f436cf7b57
commit
c3878362c3
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="src" output="target/reports-4.9.0-SNAPSHOT/WEB-INF/classes" path="src/main/java">
|
||||
<classpathentry kind="src" output="target/reports-4.9.1-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/reports-4.9.0-SNAPSHOT/WEB-INF/classes"/>
|
||||
<classpathentry kind="output" path="target/reports-4.9.1-SNAPSHOT/WEB-INF/classes"/>
|
||||
</classpath>
|
||||
|
|
|
@ -2,6 +2,6 @@
|
|||
<<<<<<<=.mine
|
||||
>>>>>>>=.r71295
|
||||
eclipse.preferences.version=1
|
||||
lastWarOutDir=/Users/massi/Documents/workspace/reports/target/reports-4.9.0-SNAPSHOT
|
||||
lastWarOutDir=/Users/massi/Documents/workspace/reports/target/reports-4.9.1-SNAPSHOT
|
||||
warSrcDir=src/main/webapp
|
||||
warSrcDirIsOutput=false
|
||||
|
|
2
pom.xml
2
pom.xml
|
@ -12,7 +12,7 @@
|
|||
<groupId>org.gcube.portlets.user</groupId>
|
||||
<artifactId>reports</artifactId>
|
||||
<packaging>war</packaging>
|
||||
<version>4.9.0-SNAPSHOT</version>
|
||||
<version>4.9.1-SNAPSHOT</version>
|
||||
<name>gCube Reports Manager</name>
|
||||
<description>
|
||||
gCube Reports Portlet.
|
||||
|
|
|
@ -122,11 +122,11 @@ public class RichTextToolbar extends Composite {
|
|||
} else if (sender == removeLink) {
|
||||
extended.removeLink();
|
||||
}
|
||||
// else if (sender == ol) {
|
||||
// extended.insertOrderedList();
|
||||
// } else if (sender == ul) {
|
||||
// extended.insertUnorderedList();
|
||||
// }
|
||||
else if (sender == ol) {
|
||||
extended.insertOrderedList();
|
||||
} else if (sender == ul) {
|
||||
extended.insertUnorderedList();
|
||||
}
|
||||
else if (sender == foreColorButton) {
|
||||
commands.get("pickColor").execute();
|
||||
}
|
||||
|
@ -189,8 +189,8 @@ public class RichTextToolbar extends Composite {
|
|||
private PushButton open_report;
|
||||
private PushButton importing;
|
||||
|
||||
// private PushButton ol;
|
||||
// private PushButton ul;
|
||||
private PushButton ol;
|
||||
private PushButton ul;
|
||||
private PushButton insertImage;
|
||||
private PushButton createLink;
|
||||
private PushButton removeLink;
|
||||
|
@ -263,70 +263,69 @@ public class RichTextToolbar extends Composite {
|
|||
topPanel.add(saveDB = createPushButton(images.db_save(), "Commit current in VME-DB")); //TODO:
|
||||
}
|
||||
|
||||
if (! isVme) {
|
||||
topPanel.add(new HTML(" "));
|
||||
fonts = createFontList();
|
||||
fonts.setPixelSize(150, 18);
|
||||
topPanel.add(fonts);
|
||||
topPanel.add(new HTML(" "));
|
||||
topPanel.add(fontSizes = createFontSizes());
|
||||
}
|
||||
topPanel.add(new HTML(" "));
|
||||
fonts = createFontList();
|
||||
fonts.setPixelSize(150, 18);
|
||||
topPanel.add(fonts);
|
||||
topPanel.add(new HTML(" "));
|
||||
topPanel.add(fontSizes = createFontSizes());
|
||||
|
||||
// We only use these listeners for updating status, so don't hook them up
|
||||
// unless at least basic editing is supported.
|
||||
richText.addKeyUpHandler(listener);
|
||||
richText.addClickHandler(listener);
|
||||
|
||||
}
|
||||
if (! isVme) {
|
||||
if (basic != null) {
|
||||
topPanel.add(bold = createToggleButton(images.bold(), strings.bold()));
|
||||
|
||||
if (basic != null) {
|
||||
topPanel.add(bold = createToggleButton(images.bold(), strings.bold()));
|
||||
|
||||
|
||||
|
||||
topPanel.add(italic = createToggleButton(images.italic(), strings.italic()));
|
||||
topPanel.add(underline = createToggleButton(images.underline(), strings.underline()));
|
||||
topPanel.add(italic = createToggleButton(images.italic(), strings.italic()));
|
||||
topPanel.add(underline = createToggleButton(images.underline(), strings.underline()));
|
||||
|
||||
topPanel.add(new HTML(" ", true));
|
||||
topPanel.add(subscript = createToggleButton(images.subscript(),"subscript"));
|
||||
topPanel.add(superscript = createToggleButton(images.superscript(),
|
||||
"superscript"));
|
||||
topPanel.add(strikethrough = createToggleButton(images.strikeThrough(),
|
||||
strings.strikeThrough()));
|
||||
topPanel.add(new HTML(" ", true));
|
||||
topPanel.add(justifyLeft = createPushButton(images.justifyLeft(),
|
||||
strings.justifyLeft()));
|
||||
topPanel.add(justifyCenter = createPushButton(images.justifyCenter(),
|
||||
strings.justifyCenter()));
|
||||
topPanel.add(justifyRight = createPushButton(images.justifyRight(),
|
||||
strings.justifyRight()));
|
||||
topPanel.add(new HTML(" ", true));
|
||||
topPanel.add(new HTML(" ", true));
|
||||
topPanel.add(subscript = createToggleButton(images.subscript(),"subscript"));
|
||||
topPanel.add(superscript = createToggleButton(images.superscript(),
|
||||
"superscript"));
|
||||
topPanel.add(strikethrough = createToggleButton(images.strikeThrough(),
|
||||
strings.strikeThrough()));
|
||||
topPanel.add(new HTML(" ", true));
|
||||
topPanel.add(justifyLeft = createPushButton(images.justifyLeft(),
|
||||
strings.justifyLeft()));
|
||||
topPanel.add(justifyCenter = createPushButton(images.justifyCenter(),
|
||||
strings.justifyCenter()));
|
||||
topPanel.add(justifyRight = createPushButton(images.justifyRight(),
|
||||
strings.justifyRight()));
|
||||
topPanel.add(new HTML(" ", true));
|
||||
|
||||
|
||||
}
|
||||
|
||||
if (extended != null) {
|
||||
|
||||
// topPanel.add(ol = createPushButton(images.ol(), strings.ol()));
|
||||
// topPanel.add(ul = createPushButton(images.ul(), strings.ul()));
|
||||
//TODO: To be re-enabled in the future
|
||||
// topPanel.add(insertImage = createPushButton(images.insertImage(),
|
||||
// strings.insertImage()));
|
||||
topPanel.add(createLink = createPushButton(images.createLink(),
|
||||
strings.createLink()));
|
||||
topPanel.add(removeLink = createPushButton(images.removeLink(),
|
||||
strings.removeLink()));
|
||||
|
||||
topPanel.add(removeFormat = createPushButton(images.removeFormat(),
|
||||
strings.removeFormat()));
|
||||
topPanel.add(foreColorButton = createPushButton(images.foreColors(),
|
||||
"Text Color"));
|
||||
}
|
||||
if (basic != null) {
|
||||
topPanel.add(new HTML(" "));
|
||||
// topPanel.add(foreColors = createColorList("Color"));
|
||||
// foreColors.setStyleName("listbox");
|
||||
}
|
||||
}
|
||||
|
||||
if (extended != null) {
|
||||
|
||||
topPanel.add(ol = createPushButton(images.ol(), strings.ol()));
|
||||
topPanel.add(ul = createPushButton(images.ul(), strings.ul()));
|
||||
//TODO: To be re-enabled in the future
|
||||
// topPanel.add(insertImage = createPushButton(images.insertImage(),
|
||||
// strings.insertImage()));
|
||||
topPanel.add(createLink = createPushButton(images.createLink(),
|
||||
strings.createLink()));
|
||||
topPanel.add(removeLink = createPushButton(images.removeLink(),
|
||||
strings.removeLink()));
|
||||
|
||||
topPanel.add(removeFormat = createPushButton(images.removeFormat(),
|
||||
strings.removeFormat()));
|
||||
topPanel.add(foreColorButton = createPushButton(images.foreColors(),
|
||||
"Text Color"));
|
||||
}
|
||||
if (basic != null) {
|
||||
topPanel.add(new HTML(" "));
|
||||
// topPanel.add(foreColors = createColorList("Color"));
|
||||
// foreColors.setStyleName("listbox");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private ListBox createFontList() {
|
||||
|
@ -410,27 +409,25 @@ public class RichTextToolbar extends Composite {
|
|||
* @param enable true to enable the widget, false to disable it
|
||||
*/
|
||||
public void setEnabled(boolean enable) {
|
||||
if (! isVME) {
|
||||
bold.setEnabled(enable);
|
||||
italic.setEnabled(enable);
|
||||
underline.setEnabled(enable);
|
||||
strikethrough.setEnabled(enable);
|
||||
justifyLeft.setEnabled(enable);
|
||||
justifyCenter.setEnabled(enable);
|
||||
justifyRight.setEnabled(enable);
|
||||
superscript.setEnabled(enable);
|
||||
subscript.setEnabled(enable);
|
||||
foreColorButton.setEnabled(enable);
|
||||
// insertImage.setEnabled(enable);
|
||||
// ol.setEnabled(enable);
|
||||
// ul.setEnabled(enable);
|
||||
createLink.setEnabled(enable);
|
||||
removeLink.setEnabled(enable);
|
||||
removeFormat.setEnabled(enable);
|
||||
//foreColors.setEnabled(enable);
|
||||
fonts.setEnabled(enable);
|
||||
fontSizes.setEnabled(enable);
|
||||
}
|
||||
bold.setEnabled(enable);
|
||||
italic.setEnabled(enable);
|
||||
underline.setEnabled(enable);
|
||||
strikethrough.setEnabled(enable);
|
||||
justifyLeft.setEnabled(enable);
|
||||
justifyCenter.setEnabled(enable);
|
||||
justifyRight.setEnabled(enable);
|
||||
superscript.setEnabled(enable);
|
||||
subscript.setEnabled(enable);
|
||||
foreColorButton.setEnabled(enable);
|
||||
// insertImage.setEnabled(enable);
|
||||
ol.setEnabled(enable);
|
||||
ul.setEnabled(enable);
|
||||
createLink.setEnabled(enable);
|
||||
removeLink.setEnabled(enable);
|
||||
removeFormat.setEnabled(enable);
|
||||
//foreColors.setEnabled(enable);
|
||||
fonts.setEnabled(enable);
|
||||
fontSizes.setEnabled(enable);
|
||||
}
|
||||
|
||||
public void enableCommands(boolean enable) {
|
||||
|
|
Reference in New Issue