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"
|
||||
date="${buildDate}">
|
||||
<Change>Task #17165</Change>
|
||||
<Change>Task #17166 Release Synoptic table functionality</Change>
|
||||
</Changeset>
|
||||
<Changeset
|
||||
component="org.gcube.portlets-user.performfish-analytics-portlet.0-1-0"
|
||||
|
|
|
@ -225,11 +225,13 @@ public class PerformFishAnalyticsController {
|
|||
//viewController.resetBatchIdStatus();
|
||||
viewController.setBatchIdStatus(ControlGroupType.INFO);
|
||||
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.enableAllAlgorithmsForSubmit(false);
|
||||
|
||||
}else {
|
||||
viewController.enableLoadBatches(false);
|
||||
viewController.enableSynopticTable(false);
|
||||
viewController.enableAllAlgorithmsForSubmit(false);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -579,7 +579,13 @@ public class PerformFishAnalyticsViewController {
|
|||
batchIDAndListKPI.showAlert(msg, type, closable);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 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 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.ControlGroup;
|
||||
import com.github.gwtbootstrap.client.ui.ListBox;
|
||||
|
@ -93,6 +94,8 @@ public class PerformFishAnalitycsFormView extends Composite {
|
|||
CheckBox uib_check_all_area;
|
||||
@UiField
|
||||
CheckBox uib_check_all_quarter;
|
||||
@UiField
|
||||
Button uib_button_load_synoptic_table;
|
||||
|
||||
// @UiField
|
||||
// Fieldset fieldset_add_catalogue_bean;
|
||||
|
@ -128,10 +131,17 @@ public class PerformFishAnalitycsFormView extends Composite {
|
|||
|
||||
@Override
|
||||
public void onChange(ChangeEvent event) {
|
||||
|
||||
|
||||
String populatioTypeSelected = field_select_population_type.getSelectedValue();
|
||||
GWT.log("Selected population type: " + 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));
|
||||
fillSpecies(opt.getListSpecies());
|
||||
fillQuarter(opt.getListQuarter());
|
||||
|
@ -210,8 +220,27 @@ 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.
|
||||
*
|
||||
|
@ -357,6 +386,7 @@ public class PerformFishAnalitycsFormView extends Composite {
|
|||
}
|
||||
// field_select_population_type.setSelectedValue(thCatalogueBean.getName());
|
||||
field_select_population_type.setSelectedValue(result.get(0).getName());
|
||||
|
||||
DomEvent.fireNativeEvent(
|
||||
Document.get().createChangeEvent(),
|
||||
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">
|
||||
<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>
|
||||
.noBorder {
|
||||
border: 0px;
|
||||
|
@ -12,7 +13,8 @@
|
|||
</ui:style>
|
||||
<g:HTMLPanel>
|
||||
<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>
|
||||
<b:Form type="HORIZONTAL">
|
||||
<b:Fieldset styleName="{style.noBorder}">
|
||||
|
@ -20,8 +22,10 @@
|
|||
<b:ControlGroup ui:field="cg_select_population_type">
|
||||
<b:ControlLabel for="cl_select_population_type">Batch Type</b:ControlLabel>
|
||||
<b:Controls>
|
||||
<b:ListBox name="Select a Population Type..." b:id="field_select_population_type"
|
||||
ui:field="field_select_population_type" addStyleNames="the_select_custom">
|
||||
<b:ListBox name="Select a Population Type..."
|
||||
b:id="field_select_population_type"
|
||||
ui:field="field_select_population_type"
|
||||
addStyleNames="the_select_custom">
|
||||
</b:ListBox>
|
||||
</b:Controls>
|
||||
</b:ControlGroup>
|
||||
|
@ -29,8 +33,10 @@
|
|||
<b:ControlGroup ui:field="cg_select_population">
|
||||
<b:ControlLabel for="cl_select_population">Level</b:ControlLabel>
|
||||
<b:Controls>
|
||||
<b:ListBox name="Select a Population..." b:id="field_select_population"
|
||||
ui:field="field_select_population" addStyleNames="the_select_custom">
|
||||
<b:ListBox name="Select a Population..."
|
||||
b:id="field_select_population"
|
||||
ui:field="field_select_population"
|
||||
addStyleNames="the_select_custom">
|
||||
</b:ListBox>
|
||||
</b:Controls>
|
||||
</b:ControlGroup>
|
||||
|
@ -38,8 +44,9 @@
|
|||
<b:ControlGroup ui:field="cg_select_species">
|
||||
<b:ControlLabel for="cl_select_species">Species</b:ControlLabel>
|
||||
<b:Controls>
|
||||
<b:ListBox name="Select Species..." b:id="field_select_species"
|
||||
ui:field="field_select_species" addStyleNames="the_select_custom">
|
||||
<b:ListBox name="Select Species..."
|
||||
b:id="field_select_species" ui:field="field_select_species"
|
||||
addStyleNames="the_select_custom">
|
||||
</b:ListBox>
|
||||
</b:Controls>
|
||||
</b:ControlGroup>
|
||||
|
@ -48,12 +55,13 @@
|
|||
<b:ControlLabel for="cl_select_quarter">Quarter</b:ControlLabel>
|
||||
<b:Controls>
|
||||
<b:InputAddOn>
|
||||
<b:ListBox name="Select Quarter..." b:id="field_select_quarter"
|
||||
ui:field="field_select_quarter" multipleSelect="true"
|
||||
addStyleNames="the_select_custom">
|
||||
<b:ListBox name="Select Quarter..."
|
||||
b:id="field_select_quarter" ui:field="field_select_quarter"
|
||||
multipleSelect="true" addStyleNames="the_select_custom">
|
||||
</b:ListBox>
|
||||
<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:InputAddOn>
|
||||
</b:Controls>
|
||||
|
@ -63,12 +71,13 @@
|
|||
<b:ControlLabel for="cl_select_area">Area</b:ControlLabel>
|
||||
<b:Controls>
|
||||
<b:InputAddOn>
|
||||
<b:ListBox name="Select Area..." b:id="field_select_area"
|
||||
ui:field="field_select_area" multipleSelect="true"
|
||||
addStyleNames="the_select_custom">
|
||||
<b:ListBox name="Select Area..."
|
||||
b:id="field_select_area" ui:field="field_select_area"
|
||||
multipleSelect="true" addStyleNames="the_select_custom">
|
||||
</b:ListBox>
|
||||
<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:InputAddOn>
|
||||
</b:Controls>
|
||||
|
@ -79,17 +88,25 @@
|
|||
<b:ControlLabel for="cl_select_period">Period</b:ControlLabel>
|
||||
<b:Controls>
|
||||
<b:InputAddOn>
|
||||
<b:ListBox name="Select Period..." b:id="field_select_period"
|
||||
ui:field="field_select_period" multipleSelect="true"
|
||||
addStyleNames="the_select_custom">
|
||||
<b:ListBox name="Select Period..."
|
||||
b:id="field_select_period" ui:field="field_select_period"
|
||||
multipleSelect="true" addStyleNames="the_select_custom">
|
||||
</b:ListBox>
|
||||
<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:InputAddOn>
|
||||
</b:Controls>
|
||||
</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:Form>
|
||||
</g:HTMLPanel>
|
||||
|
|
Loading…
Reference in New Issue