Task #17166 Fixing CSS for synoptic table and fixing allyears for FARM

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/performfish-analytics-portlet@181223 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Francesco Mangiacrapa 2019-07-12 16:07:03 +00:00
parent 5d7d5711f6
commit 7f6b6b858e
4 changed files with 80 additions and 17 deletions

View File

@ -170,9 +170,11 @@ public class PerformFishAnnualAnalyticsController {
//boolean isKPIsSelected = viewAnnualController.validateKPIFields();
int selectedKPIsSize = viewAnnualController.getSelectedKPIs().size();
viewAnnualController.manageAlgorithmsSubmit(selectedKPIsSize);
viewAnnualController.enableSynopticTable(true);
}else {
//viewController.enableLoadBatches(false);
viewAnnualController.enableAllAlgorithmsForSubmit(false);
viewAnnualController.enableSynopticTable(false);
}
}
});
@ -285,7 +287,6 @@ public class PerformFishAnnualAnalyticsController {
List<KPI> selectedKPI = viewAnnualController.getSelectedKPIs();
viewAnnualController.manageAlgorithmsSubmit(selectedKPI.size());
if(theFocusValue!=null) {
if(isValidKPI){
@ -303,7 +304,6 @@ public class PerformFishAnnualAnalyticsController {
public void onLoadSynopticTable(LoadSynopticTableEvent loadSynopticTableEvent) {
callAlgorithmSynopticTableFarm();
}
});
@ -325,7 +325,17 @@ public class PerformFishAnnualAnalyticsController {
dataInputsFormatter = appendDMInputTable(performFishResponseMap, dataInputsFormatter, PerformFishAnalyticsConstant.PFSERVICE_TO_DM_MAPPING_TABLE.AnnualTable);
dataInputsFormatter = appendDMInputTable(performFishResponseMap, dataInputsFormatter, PerformFishAnalyticsConstant.PFSERVICE_TO_DM_MAPPING_TABLE.AntibioticsTable);
dataInputsFormatter = appendDMInputTable(performFishResponseMap, dataInputsFormatter, PerformFishAnalyticsConstant.PFSERVICE_TO_DM_MAPPING_TABLE.AntiparasiticTable);
dataInputsFormatter.append(PerformFishAnalyticsConstant.DM_ALLYEARS_PARAM+"="+ PerformFishAnalyticsConstant.DM_VALUE_ALL +";");
String yearsValue = "";
for (String year : viewAnnualController.getSelectedYears()) {
yearsValue+=year+"#";
}
yearsValue = yearsValue.substring(0, yearsValue.length()-1);
dataInputsFormatter.append(PerformFishAnalyticsConstant.DM_ALLYEARS_PARAM+"="+ yearsValue +";");
//dataInputsFormatter.append(PerformFishAnalyticsConstant.DM_ALLYEARS_PARAM+"="+ PerformFishAnalyticsConstant.DM_VALUE_ALL +";");
//dataInputsFormatter.append(PerformFishAnalyticsConstant.DM_ALLYEARS_PARAM+"=2016;");
String dataInParameters = dataInputsFormatter.toString();
@ -825,7 +835,7 @@ public class PerformFishAnnualAnalyticsController {
case DEA_CHART:
break;
case PERFORMFISH_SYNOPTIC_TABLE_FARM:
cssTableStyle = "synoptictable";
cssTableStyle = "synoptictable-farm";
break;
}

View File

@ -211,10 +211,10 @@ public class PerformFishAnnualAnalyticsViewController {
if (populationType.getName().equalsIgnoreCase(PerformFishAnalyticsConstant.BATCH_LEVEL.GROW_OUT_AGGREGATED_CLOSED_BATCHES.name())) {
visibleSynopticTable(true);
enableSynopticTable(true);
//enableSynopticTable(true);
} else {
visibleSynopticTable(false);
enableSynopticTable(false);
//enableSynopticTable(false);
}
}
}

View File

@ -765,7 +765,7 @@ public class PerformFishAnalyticsController {
case DEA_CHART:
break;
case PERFORMFISH_SYNOPTICTABLE_BATCH:
cssTableStyle = "synoptictable";
cssTableStyle = "synoptictable-batch";
break;
}

View File

@ -189,7 +189,7 @@ the-central-table td {
padding: 2px;
}
table.synoptictable {
table.synoptictable-batch {
font-family: verdana, arial, sans-serif;
font-size: 16px;
border-collapse: collapse;
@ -198,45 +198,98 @@ table.synoptictable {
text-align: center;
}
table.synoptictable td {
table.synoptictable-batch td {
padding: 5px;
border-left: 1px solid #e3e3e3;
border-right: 1px solid #e3e3e3;
font-size: 16px;
}
table.synoptictable tr:first-child td {
table.synoptictable-batch tr:first-child td {
border-left: none;
border-right: none;
font-size: 16px
}
table.synoptictable tr:first-child {
table.synoptictable-batch tr:first-child {
font-weight: bold;
border-left: none;
border-right: none;
}
table.synoptictable tr:nth-child(4n+0) {
table.synoptictable-batch tr:nth-child(4n+0) {
background-color: #f2f2f2;
}
table.synoptictable td:nth-child(3) {
table.synoptictable-batch td:nth-child(3) {
font-weight: bold;
}
table.synoptictable tr:nth-child(2) {
table.synoptictable-batch tr:nth-child(2) {
font-weight: bold;
}
table.synoptictable tr:nth-child(3) {
table.synoptictable-batch tr:nth-child(3) {
font-weight: bold;
}
table.synoptictable td:first-child {
table.synoptictable-batch td:first-child {
border-left: none;
}
table.synoptictable td:last-child {
table.synoptictable-batch td:last-child {
border-right: none;
}
table.synoptictable-farm {
font-family: verdana, arial, sans-serif;
font-size: 16px;
border-collapse: collapse;
margin-top: 20px;
background-color: #FFF;
text-align: center;
}
table.synoptictable-farm td {
padding: 5px;
border-left: 1px solid #e3e3e3;
border-right: 1px solid #e3e3e3;
font-size: 16px;
}
table.synoptictable-farm tr:first-child td {
border-left: none;
border-right: none;
font-size: 16px
}
table.synoptictable-farm tr:first-child {
font-weight: bold;
border-left: none;
border-right: none;
}
table.synoptictable-farm tr:nth-child(4n+0) {
background-color: #f2f2f2;
}
table.synoptictable-farm td:nth-child(1) {
font-weight: bold;
}
table.synoptictable-farm tr:nth-child(2) {
font-weight: bold;
}
table.synoptictable-farm tr:nth-child(3) {
font-weight: bold;
}
table.synoptictable-farm td:first-child {
border-left: none;
}
table.synoptictable-farm td:last-child {
border-right: none;
}