ref 18753: Add menu to Accounting Dashboard pages

https://support.d4science.org/issues/18753

Fixed TOC menu behavior in reports
This commit is contained in:
Giancarlo Panichi 2020-04-14 12:33:03 +02:00
parent 464022838a
commit a027c3aefd
3 changed files with 10 additions and 2 deletions

View File

@ -117,7 +117,7 @@ public class ReportAreaView extends ViewWithUiHandlers<ReportAreaPresenter>
//navLinkText.append("["); //navLinkText.append("[");
//navLinkText.append(reData.getCategory()); //navLinkText.append(reData.getCategory());
//navLinkText.append("]"); //navLinkText.append("]");
NavLink navLink=new NavLink(navLinkText.toString(),"#"+chart.getName()); NavLink navLink=new NavLink(navLinkText.toString(),"#"+chart.getWrapperName());
navLink.setIcon(IconType.BAR_CHART); navLink.setIcon(IconType.BAR_CHART);
navLink.addStyleName(resources.uiDataCss().uiDataReportTocNavLink()); navLink.addStyleName(resources.uiDataCss().uiDataReportTocNavLink());
toc.add(navLink); toc.add(navLink);

View File

@ -14,6 +14,7 @@ import com.google.gwt.user.client.ui.HTMLPanel;
public class Chart extends HTMLPanel { public class Chart extends HTMLPanel {
private String name; private String name;
private String wrapperName;
private ReportElementData reportElementData; private ReportElementData reportElementData;
@ -30,7 +31,9 @@ public class Chart extends HTMLPanel {
+ "</ul>" + "</div>" + "<canvas id=" + name + " class='" + resources.uiDataCss().uiDataChartCanvas() + "</ul>" + "</div>" + "<canvas id=" + name + " class='" + resources.uiDataCss().uiDataChartCanvas()
+ "'></canvas>"); + "'></canvas>");
this.name = name; this.name = name;
this.wrapperName="wrapper_"+name;
this.reportElementData = reportElementData; this.reportElementData = reportElementData;
this.getElement().setId(wrapperName);
this.addStyleName(resources.uiDataCss().uiDataChartWrapper()); this.addStyleName(resources.uiDataCss().uiDataChartWrapper());
addAttachHandler(new AttachEvent.Handler() { addAttachHandler(new AttachEvent.Handler() {
@ -50,6 +53,10 @@ public class Chart extends HTMLPanel {
return name; return name;
} }
public String getWrapperName() {
return wrapperName;
}
public ReportElementData getReportElementData() { public ReportElementData getReportElementData() {
return reportElementData; return reportElementData;
} }

View File

@ -87,6 +87,7 @@
/* Chart */ /* Chart */
.uiDataChartWrapper { .uiDataChartWrapper {
width: 800px; width: 800px;
padding-top: 50px;
/*border: solid 1px;*/ /*border: solid 1px;*/
} }