|
|
|
@ -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);
|
|
|
|
|
|
|
|
|
|