Ero sivun ”Widget:CitobsDBcounter” versioiden välillä
Järvi-meriwikistä
(2 välissä olevaa versiota samalta käyttäjältä ei näytetä) | |||
Rivi 28: | Rivi 28: | ||
var citobs = new CitobsOpen311(); | var citobs = new CitobsOpen311(); | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
var today = new Date(); | var today = new Date(); | ||
var weekago = new Date(); weekago.setDate( weekago.getDate() - 7 ); | var weekago = new Date(); weekago.setDate( weekago.getDate() - 7 ); | ||
− | if ( start_date == 'x' ) { start_date = weekago.toISOString().split( 'T' )[0] | + | if ( start_date == 'x' ) { start_date = weekago.toISOString().split( 'T' )[0]; } |
− | if ( end_date == 'x' ) { end_date = today.toISOString().split( 'T' )[0] | + | if ( end_date == 'x' ) { end_date = today.toISOString().split( 'T' )[0]; } |
citobs.loadRequests( { 'service_code': service_code, 'keyword': keyword, 'start_date': start_date, 'end_date': end_date }, function() { | citobs.loadRequests( { 'service_code': service_code, 'keyword': keyword, 'start_date': start_date, 'end_date': end_date }, function() { | ||
Rivi 56: | Rivi 47: | ||
if ( lang == 'fi' ) { | if ( lang == 'fi' ) { | ||
− | out = 'Lisäksi Vesi.fi-palvelun kautta on | + | out = 'Lisäksi Vesi.fi-palvelun kautta on valittuna ajanjaksona lähetetty ' + c1 + ' havaintoa sinilevätilanteesta. Näistä ' + c2 + ' kappaleessa havaittiin sinilevää.'; |
} else { | } else { | ||
− | out = 'In addition, ' + c1 + ' observations about the blue-green algae situation have been sent through the Vesi.fi service | + | out = 'In addition, ' + c1 + ' observations about the blue-green algae situation have been sent through the Vesi.fi service during the selected period. In ' + c2 + ' of these observations, algae had been detected.'; |
} | } | ||
jQuery( "#<!--{$id|default:vesificounter|escape:'html'}-->_container" ).html ( out ); | jQuery( "#<!--{$id|default:vesificounter|escape:'html'}-->_container" ).html ( out ); |