Future/18815 #1
|
@ -8,6 +8,7 @@ import org.gcube.portlets.user.accountingdashboard.client.application.controller
|
|||
import org.gcube.portlets.user.accountingdashboard.client.application.event.ScopeDataEvent;
|
||||
import org.gcube.portlets.user.accountingdashboard.shared.data.RequestReportData;
|
||||
import org.gcube.portlets.user.accountingdashboard.shared.data.ScopeData;
|
||||
import org.gcube.portlets.user.accountingdashboard.shared.options.TreeOptions;
|
||||
|
||||
import com.google.gwt.i18n.client.DateTimeFormat;
|
||||
import com.google.inject.Inject;
|
||||
|
@ -48,7 +49,6 @@ public class FilterAreaPresenter extends PresenterWidget<FilterAreaPresenter.Fil
|
|||
|
||||
private void addProviders() {
|
||||
|
||||
|
||||
}
|
||||
|
||||
private void bindToEvent() {
|
||||
|
@ -71,9 +71,16 @@ public class FilterAreaPresenter extends PresenterWidget<FilterAreaPresenter.Fil
|
|||
controller.getTree();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateTreeOptions(TreeOptions treeOptions) {
|
||||
logger.fine("UpdateTreeOption: " + treeOptions);
|
||||
controller.setTreeOptions(treeOptions);
|
||||
controller.getTree();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getReport(RequestReportData requestReportData) {
|
||||
if(checkDate(requestReportData.getDateFrom(),requestReportData.getDateTo())){
|
||||
if (checkDate(requestReportData.getDateFrom(), requestReportData.getDateTo())) {
|
||||
controller.getReport(requestReportData);
|
||||
}
|
||||
|
||||
|
@ -92,7 +99,6 @@ public class FilterAreaPresenter extends PresenterWidget<FilterAreaPresenter.Fil
|
|||
return false;
|
||||
}
|
||||
|
||||
|
||||
Date dateEndD = null;
|
||||
try {
|
||||
logger.fine("DateTemp2: " + dateEnd);
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package org.gcube.portlets.user.accountingdashboard.client.application.mainarea.filter;
|
||||
|
||||
import org.gcube.portlets.user.accountingdashboard.shared.data.RequestReportData;
|
||||
import org.gcube.portlets.user.accountingdashboard.shared.options.TreeOptions;
|
||||
|
||||
import com.gwtplatform.mvp.client.UiHandlers;
|
||||
|
||||
|
@ -12,4 +13,6 @@ import com.gwtplatform.mvp.client.UiHandlers;
|
|||
public interface FilterAreaUiHandlers extends UiHandlers {
|
||||
|
||||
public void getReport(RequestReportData requestReportData);
|
||||
|
||||
public void updateTreeOptions(TreeOptions treeOptions);
|
||||
}
|
||||
|
|
|
@ -14,11 +14,15 @@ import org.gcube.portlets.user.accountingdashboard.client.resources.AppResources
|
|||
import org.gcube.portlets.user.accountingdashboard.client.resources.ScopeTreeResources;
|
||||
import org.gcube.portlets.user.accountingdashboard.shared.data.RequestReportData;
|
||||
import org.gcube.portlets.user.accountingdashboard.shared.data.ScopeData;
|
||||
import org.gcube.portlets.user.accountingdashboard.shared.options.TreeOptions;
|
||||
|
||||
import com.github.gwtbootstrap.client.ui.Button;
|
||||
import com.github.gwtbootstrap.client.ui.ListBox;
|
||||
import com.google.gwt.core.client.GWT;
|
||||
import com.google.gwt.event.dom.client.ChangeEvent;
|
||||
import com.google.gwt.event.dom.client.ChangeHandler;
|
||||
import com.google.gwt.event.dom.client.ClickEvent;
|
||||
import com.google.gwt.event.dom.client.ClickHandler;
|
||||
import com.google.gwt.i18n.client.DateTimeFormat;
|
||||
import com.google.gwt.i18n.client.DateTimeFormat.PredefinedFormat;
|
||||
import com.google.gwt.i18n.client.LocaleInfo;
|
||||
|
@ -62,6 +66,12 @@ public class FilterAreaView extends ViewWithUiHandlers<FilterAreaPresenter>
|
|||
@UiField(provided = true)
|
||||
ListBox monthEnd;
|
||||
|
||||
@UiField(provided = true)
|
||||
Button btnShowDetachedREs;
|
||||
|
||||
@UiField(provided = true)
|
||||
Button btnHideDetachedREs;
|
||||
|
||||
@UiField(provided = true)
|
||||
CellTree scopeTree;
|
||||
|
||||
|
@ -161,6 +171,30 @@ public class FilterAreaView extends ViewWithUiHandlers<FilterAreaPresenter>
|
|||
}
|
||||
});
|
||||
|
||||
|
||||
logger.log(Level.FINE, "Configuring buttons DetachedREs");
|
||||
btnShowDetachedREs=new Button();
|
||||
btnShowDetachedREs.addClickHandler(new ClickHandler() {
|
||||
|
||||
@Override
|
||||
public void onClick(ClickEvent event) {
|
||||
TreeOptions treeOptions=new TreeOptions(true);
|
||||
getUiHandlers().updateTreeOptions(treeOptions);
|
||||
}
|
||||
});
|
||||
|
||||
btnHideDetachedREs=new Button();
|
||||
btnHideDetachedREs.addClickHandler(new ClickHandler() {
|
||||
|
||||
@Override
|
||||
public void onClick(ClickEvent event) {
|
||||
TreeOptions treeOptions=new TreeOptions(false);
|
||||
getUiHandlers().updateTreeOptions(treeOptions);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
logger.log(Level.FINE, "Configuring DataProvider");
|
||||
dataProvider = new ListDataProvider<ScopeData>();
|
||||
|
||||
RequestReportEventHandler handler = new RequestReportEventHandler() {
|
||||
|
@ -177,10 +211,13 @@ public class FilterAreaView extends ViewWithUiHandlers<FilterAreaPresenter>
|
|||
ScopeTreeResources scopeTreeResources = GWT.create(ScopeTreeResources.class);
|
||||
scopeTree = new CellTree(scopeTreeModel, null, scopeTreeResources);
|
||||
scopeTree.setDefaultNodeSize(500);
|
||||
|
||||
logger.log(Level.FINE, "FilterAreaView init end");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void displayScopeData(ScopeData scopeData) {
|
||||
logger.log(Level.FINE, "displayScopeData()");
|
||||
ArrayList<ScopeData> scopeDataList = new ArrayList<>();
|
||||
scopeDataList.add(scopeData);
|
||||
this.scopeData = scopeData;
|
||||
|
@ -194,6 +231,7 @@ public class FilterAreaView extends ViewWithUiHandlers<FilterAreaPresenter>
|
|||
}
|
||||
|
||||
private void requestReport() {
|
||||
logger.log(Level.FINE, "requestReport()");
|
||||
String[] months = LocaleInfo.getCurrentLocale().getDateTimeFormatInfo().monthsFull();
|
||||
logger.log(Level.FINE, "Months: " + months.length);
|
||||
|
||||
|
|
|
@ -11,38 +11,50 @@
|
|||
|
||||
|
||||
<g:HTMLPanel styleName="{res.uiDataCss.uiDataFiltersPanel}">
|
||||
<b:Heading size="5" styleName="{res.uiDataCss.uiDataFiltersTitle}">Filters</b:Heading>
|
||||
<g:HTMLPanel ui:field="periodPanel"
|
||||
styleName="{res.uiDataCss.uiDataFiltersPeriodPanel}">
|
||||
<b:Form type="HORIZONTAL" styleName="{res.uiDataCss.uiDataFiltersFormPanel}">
|
||||
<b:Fieldset>
|
||||
<b:ControlGroup>
|
||||
<b:ControlLabel width="50px" for="fromPeriod">From:</b:ControlLabel>
|
||||
<b:Controls styleName="{res.uiDataCss.uiDataFiltersControls}">
|
||||
<b:ListBox ui:field="yearStart" width="104px" b:id="yearStart">
|
||||
</b:ListBox>
|
||||
<b:ListBox ui:field="monthStart" width="104px" b:id="monthStart">
|
||||
</b:ListBox>
|
||||
<b:HelpBlock>Select the start date</b:HelpBlock>
|
||||
</b:Controls>
|
||||
</b:ControlGroup>
|
||||
<b:ControlGroup>
|
||||
<b:ControlLabel width="50px" for="endPeriod">To:</b:ControlLabel>
|
||||
<b:Controls styleName="{res.uiDataCss.uiDataFiltersControls}">
|
||||
<b:ListBox ui:field="yearEnd" width="104px" b:id="yearEnd">
|
||||
</b:ListBox>
|
||||
<b:ListBox ui:field="monthEnd" width="104px" b:id="monthEnd">
|
||||
</b:ListBox>
|
||||
<b:HelpBlock>Select the end date</b:HelpBlock>
|
||||
</b:Controls>
|
||||
</b:ControlGroup>
|
||||
</b:Fieldset>
|
||||
</b:Form>
|
||||
</g:HTMLPanel>
|
||||
<g:HTMLPanel ui:field="explorePanel"
|
||||
styleName="{res.uiDataCss.uiDataFiltersExplorePanel}">
|
||||
<c:CellTree addStyleNames="{res.uiDataCss.uiDataExploreTree}"
|
||||
ui:field='scopeTree' />
|
||||
</g:HTMLPanel>
|
||||
<b:Heading size="5" styleName="{res.uiDataCss.uiDataFiltersTitle}">Filters</b:Heading>
|
||||
<g:HTMLPanel ui:field="periodPanel"
|
||||
styleName="{res.uiDataCss.uiDataFiltersPeriodPanel}">
|
||||
<b:Form type="HORIZONTAL" styleName="{res.uiDataCss.uiDataFiltersFormPanel}">
|
||||
<b:Fieldset>
|
||||
<b:ControlGroup>
|
||||
<b:ControlLabel width="50px" for="fromPeriod">From:</b:ControlLabel>
|
||||
<b:Controls styleName="{res.uiDataCss.uiDataFiltersControls}">
|
||||
<b:ListBox ui:field="yearStart" width="104px" b:id="yearStart">
|
||||
</b:ListBox>
|
||||
<b:ListBox ui:field="monthStart" width="104px" b:id="monthStart">
|
||||
</b:ListBox>
|
||||
<b:HelpBlock>Select the start date</b:HelpBlock>
|
||||
</b:Controls>
|
||||
</b:ControlGroup>
|
||||
<b:ControlGroup>
|
||||
<b:ControlLabel width="50px" for="endPeriod">To:</b:ControlLabel>
|
||||
<b:Controls styleName="{res.uiDataCss.uiDataFiltersControls}">
|
||||
<b:ListBox ui:field="yearEnd" width="104px" b:id="yearEnd">
|
||||
</b:ListBox>
|
||||
<b:ListBox ui:field="monthEnd" width="104px" b:id="monthEnd">
|
||||
</b:ListBox>
|
||||
<b:HelpBlock>Select the end date</b:HelpBlock>
|
||||
</b:Controls>
|
||||
</b:ControlGroup>
|
||||
<b:ControlGroup>
|
||||
<b:ControlLabel width="50px" for="detachedREs">DetachedREs:</b:ControlLabel>
|
||||
<b:Controls styleName="{res.uiDataCss.uiDataFiltersControls}">
|
||||
<b:ButtonGroup toggle="radio">
|
||||
<b:Button ui:field="btnShowDetachedREs" text="Show" />
|
||||
<b:Button ui:field="btnHideDetachedREs" text="Hide" />
|
||||
</b:ButtonGroup>
|
||||
|
||||
<b:HelpBlock>Show DetachedREs</b:HelpBlock>
|
||||
</b:Controls>
|
||||
</b:ControlGroup>
|
||||
|
||||
</b:Fieldset>
|
||||
</b:Form>
|
||||
</g:HTMLPanel>
|
||||
<g:HTMLPanel ui:field="explorePanel"
|
||||
styleName="{res.uiDataCss.uiDataFiltersExplorePanel}">
|
||||
<c:CellTree addStyleNames="{res.uiDataCss.uiDataExploreTree}"
|
||||
ui:field='scopeTree' />
|
||||
</g:HTMLPanel>
|
||||
</g:HTMLPanel>
|
||||
</ui:UiBinder>
|
||||
|
|
Loading…
Reference in New Issue