Starting work on Task #17166 Release Synoptic table functionality
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/performfish-analytics-portlet@181202 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
39382d8e51
commit
5efabf2bc9
|
@ -3,6 +3,7 @@
|
||||||
component="org.gcube.portlets-user.performfish-analytics-portlet.0-2-0"
|
component="org.gcube.portlets-user.performfish-analytics-portlet.0-2-0"
|
||||||
date="${buildDate}">
|
date="${buildDate}">
|
||||||
<Change>Task #17165</Change>
|
<Change>Task #17165</Change>
|
||||||
|
<Change>Task #17166 Release Synoptic table functionality</Change>
|
||||||
</Changeset>
|
</Changeset>
|
||||||
<Changeset
|
<Changeset
|
||||||
component="org.gcube.portlets-user.performfish-analytics-portlet.0-1-0"
|
component="org.gcube.portlets-user.performfish-analytics-portlet.0-1-0"
|
||||||
|
|
|
@ -225,11 +225,13 @@ public class PerformFishAnalyticsController {
|
||||||
//viewController.resetBatchIdStatus();
|
//viewController.resetBatchIdStatus();
|
||||||
viewController.setBatchIdStatus(ControlGroupType.INFO);
|
viewController.setBatchIdStatus(ControlGroupType.INFO);
|
||||||
viewController.enableLoadBatches(true);
|
viewController.enableLoadBatches(true);
|
||||||
|
viewController.enableSynopticTable(true);
|
||||||
viewController.showAlertForLoadBatches("Please load your batches corresponding to the selected options, by pressing the 'Load Batches' button", AlertType.INFO, false);
|
viewController.showAlertForLoadBatches("Please load your batches corresponding to the selected options, by pressing the 'Load Batches' button", AlertType.INFO, false);
|
||||||
viewController.enableAllAlgorithmsForSubmit(false);
|
viewController.enableAllAlgorithmsForSubmit(false);
|
||||||
|
|
||||||
}else {
|
}else {
|
||||||
viewController.enableLoadBatches(false);
|
viewController.enableLoadBatches(false);
|
||||||
|
viewController.enableSynopticTable(false);
|
||||||
viewController.enableAllAlgorithmsForSubmit(false);
|
viewController.enableAllAlgorithmsForSubmit(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -580,6 +580,12 @@ public class PerformFishAnalyticsViewController {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Enable synoptic table.
|
||||||
|
*
|
||||||
|
* @param b the b
|
||||||
|
*/
|
||||||
|
public void enableSynopticTable(boolean b) {
|
||||||
|
form.setEnableSynopticTable(b);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,6 +18,7 @@ import org.gcube.portlets.user.performfishanalytics.shared.Quarter;
|
||||||
import org.gcube.portlets.user.performfishanalytics.shared.Species;
|
import org.gcube.portlets.user.performfishanalytics.shared.Species;
|
||||||
|
|
||||||
import com.github.gwtbootstrap.client.ui.Alert;
|
import com.github.gwtbootstrap.client.ui.Alert;
|
||||||
|
import com.github.gwtbootstrap.client.ui.Button;
|
||||||
import com.github.gwtbootstrap.client.ui.CheckBox;
|
import com.github.gwtbootstrap.client.ui.CheckBox;
|
||||||
import com.github.gwtbootstrap.client.ui.ControlGroup;
|
import com.github.gwtbootstrap.client.ui.ControlGroup;
|
||||||
import com.github.gwtbootstrap.client.ui.ListBox;
|
import com.github.gwtbootstrap.client.ui.ListBox;
|
||||||
|
@ -93,6 +94,8 @@ public class PerformFishAnalitycsFormView extends Composite {
|
||||||
CheckBox uib_check_all_area;
|
CheckBox uib_check_all_area;
|
||||||
@UiField
|
@UiField
|
||||||
CheckBox uib_check_all_quarter;
|
CheckBox uib_check_all_quarter;
|
||||||
|
@UiField
|
||||||
|
Button uib_button_load_synoptic_table;
|
||||||
|
|
||||||
// @UiField
|
// @UiField
|
||||||
// Fieldset fieldset_add_catalogue_bean;
|
// Fieldset fieldset_add_catalogue_bean;
|
||||||
|
@ -132,6 +135,13 @@ public class PerformFishAnalitycsFormView extends Composite {
|
||||||
String populatioTypeSelected = field_select_population_type.getSelectedValue();
|
String populatioTypeSelected = field_select_population_type.getSelectedValue();
|
||||||
GWT.log("Selected population type: " + populatioTypeSelected);
|
GWT.log("Selected population type: " + populatioTypeSelected);
|
||||||
PopulationType opt = mapPopulationType.get(populatioTypeSelected);
|
PopulationType opt = mapPopulationType.get(populatioTypeSelected);
|
||||||
|
|
||||||
|
if(opt.getName().equalsIgnoreCase("GROW_OUT_INDIVIDUAL_CLOSED_BATCHES")) {
|
||||||
|
uib_button_load_synoptic_table.setVisible(true);
|
||||||
|
}else {
|
||||||
|
uib_button_load_synoptic_table.setVisible(false);
|
||||||
|
}
|
||||||
|
|
||||||
PerformFishAnalyticsController.eventBus.fireEvent(new SelectedPopulationTypeEvent(opt));
|
PerformFishAnalyticsController.eventBus.fireEvent(new SelectedPopulationTypeEvent(opt));
|
||||||
fillSpecies(opt.getListSpecies());
|
fillSpecies(opt.getListSpecies());
|
||||||
fillQuarter(opt.getListQuarter());
|
fillQuarter(opt.getListQuarter());
|
||||||
|
@ -210,7 +220,26 @@ public class PerformFishAnalitycsFormView extends Composite {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
uib_button_load_synoptic_table.addClickHandler(new ClickHandler() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onClick(ClickEvent event) {
|
||||||
|
// boolean isValidForm = vivalidatePerformFishInputFields();
|
||||||
|
//PerformFishAnalyticsController.eventBus.fireEvent(new PerformFishFieldFormChangedEvent(uib_button_load_synoptic_table));
|
||||||
}
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the enable synoptic table.
|
||||||
|
*
|
||||||
|
* @param b the new enable synoptic table
|
||||||
|
*/
|
||||||
|
public void setEnableSynopticTable(boolean b) {
|
||||||
|
uib_button_load_synoptic_table.setEnabled(b);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Select all fields.
|
* Select all fields.
|
||||||
|
@ -357,6 +386,7 @@ public class PerformFishAnalitycsFormView extends Composite {
|
||||||
}
|
}
|
||||||
// field_select_population_type.setSelectedValue(thCatalogueBean.getName());
|
// field_select_population_type.setSelectedValue(thCatalogueBean.getName());
|
||||||
field_select_population_type.setSelectedValue(result.get(0).getName());
|
field_select_population_type.setSelectedValue(result.get(0).getName());
|
||||||
|
|
||||||
DomEvent.fireNativeEvent(
|
DomEvent.fireNativeEvent(
|
||||||
Document.get().createChangeEvent(),
|
Document.get().createChangeEvent(),
|
||||||
field_select_population_type);
|
field_select_population_type);
|
||||||
|
@ -511,4 +541,5 @@ public class PerformFishAnalitycsFormView extends Composite {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
<!DOCTYPE ui:UiBinder SYSTEM "http://dl.google.com/gwt/DTD/xhtml.ent">
|
<!DOCTYPE ui:UiBinder SYSTEM "http://dl.google.com/gwt/DTD/xhtml.ent">
|
||||||
<ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder"
|
<ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder"
|
||||||
xmlns:g="urn:import:com.google.gwt.user.client.ui" xmlns:b="urn:import:com.github.gwtbootstrap.client.ui">
|
xmlns:g="urn:import:com.google.gwt.user.client.ui"
|
||||||
|
xmlns:b="urn:import:com.github.gwtbootstrap.client.ui">
|
||||||
<ui:style>
|
<ui:style>
|
||||||
.noBorder {
|
.noBorder {
|
||||||
border: 0px;
|
border: 0px;
|
||||||
|
@ -12,7 +13,8 @@
|
||||||
</ui:style>
|
</ui:style>
|
||||||
<g:HTMLPanel>
|
<g:HTMLPanel>
|
||||||
<g:HTMLPanel ui:field="form_unit_fields">
|
<g:HTMLPanel ui:field="form_unit_fields">
|
||||||
<g:VerticalPanel ui:field="errorPanel" styleName="{style.marginToError}">
|
<g:VerticalPanel ui:field="errorPanel"
|
||||||
|
styleName="{style.marginToError}">
|
||||||
</g:VerticalPanel>
|
</g:VerticalPanel>
|
||||||
<b:Form type="HORIZONTAL">
|
<b:Form type="HORIZONTAL">
|
||||||
<b:Fieldset styleName="{style.noBorder}">
|
<b:Fieldset styleName="{style.noBorder}">
|
||||||
|
@ -20,8 +22,10 @@
|
||||||
<b:ControlGroup ui:field="cg_select_population_type">
|
<b:ControlGroup ui:field="cg_select_population_type">
|
||||||
<b:ControlLabel for="cl_select_population_type">Batch Type</b:ControlLabel>
|
<b:ControlLabel for="cl_select_population_type">Batch Type</b:ControlLabel>
|
||||||
<b:Controls>
|
<b:Controls>
|
||||||
<b:ListBox name="Select a Population Type..." b:id="field_select_population_type"
|
<b:ListBox name="Select a Population Type..."
|
||||||
ui:field="field_select_population_type" addStyleNames="the_select_custom">
|
b:id="field_select_population_type"
|
||||||
|
ui:field="field_select_population_type"
|
||||||
|
addStyleNames="the_select_custom">
|
||||||
</b:ListBox>
|
</b:ListBox>
|
||||||
</b:Controls>
|
</b:Controls>
|
||||||
</b:ControlGroup>
|
</b:ControlGroup>
|
||||||
|
@ -29,8 +33,10 @@
|
||||||
<b:ControlGroup ui:field="cg_select_population">
|
<b:ControlGroup ui:field="cg_select_population">
|
||||||
<b:ControlLabel for="cl_select_population">Level</b:ControlLabel>
|
<b:ControlLabel for="cl_select_population">Level</b:ControlLabel>
|
||||||
<b:Controls>
|
<b:Controls>
|
||||||
<b:ListBox name="Select a Population..." b:id="field_select_population"
|
<b:ListBox name="Select a Population..."
|
||||||
ui:field="field_select_population" addStyleNames="the_select_custom">
|
b:id="field_select_population"
|
||||||
|
ui:field="field_select_population"
|
||||||
|
addStyleNames="the_select_custom">
|
||||||
</b:ListBox>
|
</b:ListBox>
|
||||||
</b:Controls>
|
</b:Controls>
|
||||||
</b:ControlGroup>
|
</b:ControlGroup>
|
||||||
|
@ -38,8 +44,9 @@
|
||||||
<b:ControlGroup ui:field="cg_select_species">
|
<b:ControlGroup ui:field="cg_select_species">
|
||||||
<b:ControlLabel for="cl_select_species">Species</b:ControlLabel>
|
<b:ControlLabel for="cl_select_species">Species</b:ControlLabel>
|
||||||
<b:Controls>
|
<b:Controls>
|
||||||
<b:ListBox name="Select Species..." b:id="field_select_species"
|
<b:ListBox name="Select Species..."
|
||||||
ui:field="field_select_species" addStyleNames="the_select_custom">
|
b:id="field_select_species" ui:field="field_select_species"
|
||||||
|
addStyleNames="the_select_custom">
|
||||||
</b:ListBox>
|
</b:ListBox>
|
||||||
</b:Controls>
|
</b:Controls>
|
||||||
</b:ControlGroup>
|
</b:ControlGroup>
|
||||||
|
@ -48,12 +55,13 @@
|
||||||
<b:ControlLabel for="cl_select_quarter">Quarter</b:ControlLabel>
|
<b:ControlLabel for="cl_select_quarter">Quarter</b:ControlLabel>
|
||||||
<b:Controls>
|
<b:Controls>
|
||||||
<b:InputAddOn>
|
<b:InputAddOn>
|
||||||
<b:ListBox name="Select Quarter..." b:id="field_select_quarter"
|
<b:ListBox name="Select Quarter..."
|
||||||
ui:field="field_select_quarter" multipleSelect="true"
|
b:id="field_select_quarter" ui:field="field_select_quarter"
|
||||||
addStyleNames="the_select_custom">
|
multipleSelect="true" addStyleNames="the_select_custom">
|
||||||
</b:ListBox>
|
</b:ListBox>
|
||||||
<b:appendWidget>
|
<b:appendWidget>
|
||||||
<b:CheckBox ui:field="uib_check_all_quarter" title="Select/Unselect All" />
|
<b:CheckBox ui:field="uib_check_all_quarter"
|
||||||
|
title="Select/Unselect All" />
|
||||||
</b:appendWidget>
|
</b:appendWidget>
|
||||||
</b:InputAddOn>
|
</b:InputAddOn>
|
||||||
</b:Controls>
|
</b:Controls>
|
||||||
|
@ -63,12 +71,13 @@
|
||||||
<b:ControlLabel for="cl_select_area">Area</b:ControlLabel>
|
<b:ControlLabel for="cl_select_area">Area</b:ControlLabel>
|
||||||
<b:Controls>
|
<b:Controls>
|
||||||
<b:InputAddOn>
|
<b:InputAddOn>
|
||||||
<b:ListBox name="Select Area..." b:id="field_select_area"
|
<b:ListBox name="Select Area..."
|
||||||
ui:field="field_select_area" multipleSelect="true"
|
b:id="field_select_area" ui:field="field_select_area"
|
||||||
addStyleNames="the_select_custom">
|
multipleSelect="true" addStyleNames="the_select_custom">
|
||||||
</b:ListBox>
|
</b:ListBox>
|
||||||
<b:appendWidget>
|
<b:appendWidget>
|
||||||
<b:CheckBox ui:field="uib_check_all_area" title="Select/Unselect All"/>
|
<b:CheckBox ui:field="uib_check_all_area"
|
||||||
|
title="Select/Unselect All" />
|
||||||
</b:appendWidget>
|
</b:appendWidget>
|
||||||
</b:InputAddOn>
|
</b:InputAddOn>
|
||||||
</b:Controls>
|
</b:Controls>
|
||||||
|
@ -79,17 +88,25 @@
|
||||||
<b:ControlLabel for="cl_select_period">Period</b:ControlLabel>
|
<b:ControlLabel for="cl_select_period">Period</b:ControlLabel>
|
||||||
<b:Controls>
|
<b:Controls>
|
||||||
<b:InputAddOn>
|
<b:InputAddOn>
|
||||||
<b:ListBox name="Select Period..." b:id="field_select_period"
|
<b:ListBox name="Select Period..."
|
||||||
ui:field="field_select_period" multipleSelect="true"
|
b:id="field_select_period" ui:field="field_select_period"
|
||||||
addStyleNames="the_select_custom">
|
multipleSelect="true" addStyleNames="the_select_custom">
|
||||||
</b:ListBox>
|
</b:ListBox>
|
||||||
<b:appendWidget>
|
<b:appendWidget>
|
||||||
<b:CheckBox ui:field="uib_check_all_period" title="Select/Unselect All" />
|
<b:CheckBox ui:field="uib_check_all_period"
|
||||||
|
title="Select/Unselect All" />
|
||||||
</b:appendWidget>
|
</b:appendWidget>
|
||||||
</b:InputAddOn>
|
</b:InputAddOn>
|
||||||
</b:Controls>
|
</b:Controls>
|
||||||
</b:ControlGroup>
|
</b:ControlGroup>
|
||||||
|
|
||||||
|
<b:ControlGroup>
|
||||||
|
<b:Controls>
|
||||||
|
<b:Button ui:field="uib_button_load_synoptic_table"
|
||||||
|
visible="false" enabled="false">Synoptic Table</b:Button>
|
||||||
|
</b:Controls>
|
||||||
|
</b:ControlGroup>
|
||||||
|
|
||||||
</b:Fieldset>
|
</b:Fieldset>
|
||||||
</b:Form>
|
</b:Form>
|
||||||
</g:HTMLPanel>
|
</g:HTMLPanel>
|
||||||
|
|
Loading…
Reference in New Issue