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(reData.getCategory());
//navLinkText.append("]");
NavLink navLink=new NavLink(navLinkText.toString(),"#"+chart.getName());
NavLink navLink=new NavLink(navLinkText.toString(),"#"+chart.getWrapperName());
navLink.setIcon(IconType.BAR_CHART);
navLink.addStyleName(resources.uiDataCss().uiDataReportTocNavLink());
toc.add(navLink);

View File

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

View File

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