structure view cimplete
git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/portlets/user/reports@87167 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
b18bea1b92
commit
0254eb1a9c
|
@ -26,7 +26,7 @@
|
|||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="con" path="com.google.gwt.eclipse.core.GWT_CONTAINER"/>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6">
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER">
|
||||
<attributes>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
|
|
|
@ -7,6 +7,9 @@
|
|||
<dependent-module archiveName="gcube-reporting-modeler-1.1.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/gcube-reporting-modeler/gcube-reporting-modeler">
|
||||
<dependency-type>uses</dependency-type>
|
||||
</dependent-module>
|
||||
<dependent-module archiveName="gcube-reporting-library-3.4.1-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/gcube-reporting-library/gcube-reporting-library">
|
||||
<dependency-type>uses</dependency-type>
|
||||
</dependent-module>
|
||||
<property name="java-output-path" value="/${module}/target/www/WEB-INF/classes"/>
|
||||
<property name="context-root" value="reports"/>
|
||||
</wb-module>
|
||||
|
|
|
@ -540,7 +540,7 @@ public class Headerbar extends Composite{
|
|||
|
||||
Command showReportStructure = new Command() {
|
||||
public void execute() {
|
||||
presenter.showReportStructure();
|
||||
presenter.toggleReportStructure();
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -553,7 +553,7 @@ public class Headerbar extends Composite{
|
|||
MenuItem toReturn = new MenuItem("View", optionsMenu);
|
||||
|
||||
optionsMenu.addItem("View Properties", openPageProperties);
|
||||
optionsMenu.addItem("View Structure", showReportStructure);
|
||||
optionsMenu.addItem("View/Hide Structure", showReportStructure);
|
||||
optionsMenu.addSeparator();
|
||||
|
||||
return toReturn;
|
||||
|
|
|
@ -52,6 +52,10 @@ public class CommonCommands {
|
|||
*
|
||||
*/
|
||||
public Command saveTemplate;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public Command structureView;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
|
@ -65,7 +69,11 @@ public class CommonCommands {
|
|||
*/
|
||||
public CommonCommands(final Presenter presenter) {
|
||||
this.presenter = presenter;
|
||||
|
||||
structureView = new Command() {
|
||||
public void execute() {
|
||||
presenter.toggleReportStructure();
|
||||
}
|
||||
};
|
||||
newTemplate = new Command() {
|
||||
public void execute() {
|
||||
presenter.changeTemplateName(TemplateModel.DEFAULT_NAME);
|
||||
|
|
|
@ -417,6 +417,7 @@ public class Presenter {
|
|||
*/
|
||||
HashMap<String, Command> toReturn = new HashMap<String, Command>();
|
||||
|
||||
toReturn.put("structureView", commonCommands.structureView);
|
||||
toReturn.put("save", commonCommands.saveTemplate);
|
||||
toReturn.put("newdoc", commonCommands.newTemplate);
|
||||
toReturn.put("open_report", commonCommands.openReport);
|
||||
|
@ -808,8 +809,7 @@ public class Presenter {
|
|||
if (currPage > 1)
|
||||
titleBar.getSectionSwitchPanel().showPrevButton();
|
||||
|
||||
//show the structure
|
||||
showReportStructure();
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1126,9 +1126,19 @@ public class Presenter {
|
|||
areaForBiblio = d4sArea;
|
||||
}
|
||||
|
||||
|
||||
public void showReportStructure() {
|
||||
toolBoxPanel.showStructure(new ReportStructurePanel(eventBus, model.getSerializableModel(), ToolboxPanel.TOOLBOX_WIDTH+"px", ToolboxPanel.TOOLBOX_HEIGHT+"px"));
|
||||
/**
|
||||
* show/hide the structure view
|
||||
*/
|
||||
boolean hidden = true;
|
||||
public void toggleReportStructure() {
|
||||
if (hidden) {
|
||||
toolBoxPanel.showStructure(new ReportStructurePanel(eventBus, model.getSerializableModel(), ToolboxPanel.TOOLBOX_WIDTH+"px", ToolboxPanel.TOOLBOX_HEIGHT+"px"));
|
||||
hidden = false;
|
||||
}
|
||||
else {
|
||||
toolBoxPanel.collapse();
|
||||
hidden = true;
|
||||
}
|
||||
}
|
||||
|
||||
public HorizontalPanel getExportsPanel() {
|
||||
|
|
|
@ -43,6 +43,8 @@ public class ToolboxPanel extends VerticalPanel {
|
|||
}
|
||||
|
||||
public void collapse() {
|
||||
clear();
|
||||
GWT.log("collapse");
|
||||
setWidth("20px");
|
||||
}
|
||||
|
||||
|
|
|
@ -87,6 +87,10 @@ public interface Images extends ImageBundle {
|
|||
* @return .
|
||||
*/
|
||||
AbstractImagePrototype db_save();
|
||||
/**
|
||||
* @return .
|
||||
*/
|
||||
AbstractImagePrototype structureView();
|
||||
/**
|
||||
* @return .
|
||||
*/
|
||||
|
|
|
@ -40,3 +40,4 @@ open_report = Open Report from Workspace
|
|||
importing = Import from Template
|
||||
forecolors = Text Color
|
||||
close_report = Close Report
|
||||
structureView = Show/Hide Structure View
|
|
@ -80,6 +80,8 @@ public class RichTextToolbar extends Composite {
|
|||
commands.get("save").execute();
|
||||
} else if (sender == newdoc) {
|
||||
commands.get("newdoc").execute();
|
||||
}else if (sender == structureView) {
|
||||
commands.get("structureView").execute();
|
||||
}else if (sender == close) {
|
||||
commands.get("newdoc").execute();
|
||||
} else if (sender == open_report) {
|
||||
|
@ -164,6 +166,7 @@ public class RichTextToolbar extends Composite {
|
|||
private VerticalPanel outer = new VerticalPanel();
|
||||
private HorizontalPanel topPanel = new HorizontalPanel();
|
||||
private HorizontalPanel bottomPanel = new HorizontalPanel();
|
||||
private ToggleButton structureView;
|
||||
private ToggleButton bold;
|
||||
private ToggleButton italic;
|
||||
private ToggleButton underline;
|
||||
|
@ -233,6 +236,7 @@ public class RichTextToolbar extends Composite {
|
|||
richText.addStyleName("hasRichTextToolbar");
|
||||
|
||||
if (basic != null) {
|
||||
topPanel.add(structureView = createToggleButton(images.structureView(), strings.structureView()));
|
||||
if (! isVme) {
|
||||
//add the new template button
|
||||
topPanel.add(newdoc = createPushButton(images.newdoc(), strings.newdoc()));
|
||||
|
@ -521,6 +525,8 @@ public class RichTextToolbar extends Composite {
|
|||
|
||||
String strikeThrough();
|
||||
|
||||
String structureView();
|
||||
|
||||
String ul();
|
||||
|
||||
String underline();
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 3.9 KiB |
Reference in New Issue