Ei muokkausyhteenvetoa |
Ei muokkausyhteenvetoa |
||
| (6 välissä olevaa versiota samalta käyttäjältä ei näytetä) | |||
| Rivi 56: | Rivi 56: | ||
catsum: 0, | catsum: 0, | ||
catcount: 0, | catcount: 0, | ||
catmean: -1, | catmean: -1, | ||
type: 'absolute', | |||
obses: [] | obses: [] | ||
}; | }; | ||
| Rivi 108: | Rivi 109: | ||
if ( ot == 'level' ) { | if ( ot == 'level' ) { | ||
console.log( data ); | |||
if ( typeof data.inreltodateavg != 'undefined' ) { | if ( typeof data.inreltodateavg != 'undefined' ) { | ||
jw.wbody[ wb ][ot].mean = data.inreltodateavg; | jw.wbody[ wb ][ot].mean = data.inreltodateavg; | ||
| Rivi 114: | Rivi 116: | ||
jw.wbody[ wb ][ot].mean = data.inreltomwl; | jw.wbody[ wb ][ot].mean = data.inreltomwl; | ||
jw.wbody[ wb ][ot].type = 'inreltomwl'; | jw.wbody[ wb ][ot].type = 'inreltomwl'; | ||
} else{ | } else { | ||
jw.wbody[ wb ][ot].mean = null; | jw.wbody[ wb ][ot].mean = null; | ||
jw.wbody[ wb ][ot].type = ' | jw.wbody[ wb ][ot].type = 'absolute'; | ||
} | } | ||
| Rivi 146: | Rivi 148: | ||
out = '<div style="display: none;" class="jwcurobsheader">'; | out = '<div style="display: none;" class="jwcurobsheader">'; | ||
var otstrings1 = { 'temp': 'pintaveden lämpötilasta', 'alg': 'sinilevätilanteesta', 'ice': 'jäätilanteesta', 'level': 'vedenpinnan korkeudesta', 'secchi': 'näkösyvyydestä' }; | var otstrings1 = { 'temp': 'pintaveden lämpötilasta', 'alg': 'sinilevätilanteesta', 'ice': 'jäätilanteesta', 'level': 'vedenpinnan korkeudesta', 'secchi': 'näkösyvyydestä' }; | ||
if ( jw.obsorder.length > 0 ) { | if ( jw.obsorder.length > 0 ) { | ||
jw.obsorder = jw.obsorder.slice( 0, 4 ); | |||
out += '<div class="row">'; | out += '<div class="row">'; | ||
| Rivi 159: | Rivi 162: | ||
ot = jw.obsorder[ i ].obstype; | ot = jw.obsorder[ i ].obstype; | ||
if ( ot != 'level' || jw.wbody[ wb ][ ot ].type != 'absolute' ) { | |||
out += '<div class="col col-6 col-sm- | out += '<div class="col col-6 col-sm-4 col-md-3 text-center">'; | ||
out += '<div style="height: 40px; display: flex; justify-content: center; align-items: center; flex-direction: column;">'; | out += '<div style="height: 40px; display: flex; justify-content: center; align-items: center; flex-direction: column;">'; | ||
| Rivi 195: | Rivi 198: | ||
out += '<button style="padding: 0 0.25em; font-size: 14px; margin-bottom: 3px;" type="button" class="btn btn-secondary btn-info" data-toggle="tooltip" data-placement="top" data-trigger="click" title="' + tooltip + '">'; | out += '<button style="padding: 0 0.25em; font-size: 14px; margin-bottom: 3px;" type="button" class="btn btn-secondary btn-info" data-toggle="tooltip" data-placement="top" data-trigger="click" title="' + tooltip + '">'; | ||
if ( shownames ) { | if ( shownames ) { | ||
out += wb + ' '; | out += wb + ' ' + jw.wbody[ wb ][ ot ].newest.inRelationToToday().replace( 'päivää', 'vrk' ).toLowerCase(); | ||
} else { | |||
out += jw.wbody[ wb ][ ot ].newest.inRelationToToday().replace( 'päivää', 'vrk' ); | |||
} | } | ||
out += '</button>'; | out += '</button>'; | ||
| Rivi 286: | Rivi 290: | ||
out += '</div>'; | out += '</div>'; | ||
} | |||
} | } | ||


