Ero sivun ”Widget:Ice freezing graph” versioiden välillä
Järvi-meriwikistä
p (Tekstin korvaus – ”|limit=1000” muotoon ”|limit=2000”) |
|||
(4 välissä olevaa versiota samalta käyttäjältä ei näytetä) | |||
Rivi 8: | Rivi 8: | ||
setTimeout( function(){ <!--{$id|default:drawIfzChart|escape:'html'}-->_jQueryTest() }, 300); | setTimeout( function(){ <!--{$id|default:drawIfzChart|escape:'html'}-->_jQueryTest() }, 300); | ||
} else { | } else { | ||
− | google.load(' | + | google.charts.load( 'current', { 'packages':[ 'corechart' ], 'language': 'fi' } ); |
− | google.setOnLoadCallback(<!--{$id|default:drawIfzChart|escape:'html'}-->_func); | + | google.charts.setOnLoadCallback(<!--{$id|default:drawIfzChart|escape:'html'}-->_func); |
} | } | ||
} | } | ||
Rivi 24: | Rivi 24: | ||
searchStr += encodeURI("[[Tyyppi::Jäätilanne]][[Jäätilanne::2]]"); | searchStr += encodeURI("[[Tyyppi::Jäätilanne]][[Jäätilanne::2]]"); | ||
− | searchStr += encodeURI("|?Päivämäärä|?Tiedosto|?Lisätiedot|limit= | + | searchStr += encodeURI("|?Päivämäärä|?Tiedosto|?Lisätiedot|limit=20000"); |
searchStr += '&format=json'; | searchStr += '&format=json'; | ||
jQuery.ajax({ | jQuery.ajax({ | ||
Rivi 82: | Rivi 82: | ||
zi++; | zi++; | ||
resultItem = request.query.results[i].printouts; | resultItem = request.query.results[i].printouts; | ||
− | obsDate = new Date(toDateFromSecsSince1970(resultItem.Päivämäärä[0])); | + | obsDate = new Date(toDateFromSecsSince1970(resultItem.Päivämäärä[0].timestamp)); |
obsYear = obsDate.getFullYear(); | obsYear = obsDate.getFullYear(); | ||
Rivi 135: | Rivi 135: | ||
zi++; | zi++; | ||
resultItem = request.query.results[i].printouts; | resultItem = request.query.results[i].printouts; | ||
− | obsDate = new Date(toDateFromSecsSince1970(resultItem.Päivämäärä[0])); | + | obsDate = new Date(toDateFromSecsSince1970(resultItem.Päivämäärä[0].timestamp)); |
if (obsDate.getMonth() < 8) { | if (obsDate.getMonth() < 8) { | ||
iceMonth = obsDate.getMonth() + 4; | iceMonth = obsDate.getMonth() + 4; | ||
Rivi 161: | Rivi 161: | ||
zi++; | zi++; | ||
resultItem = request.query.results[i].printouts; | resultItem = request.query.results[i].printouts; | ||
− | obsDate = new Date(toDateFromSecsSince1970(resultItem.Päivämäärä[0])); | + | obsDate = new Date(toDateFromSecsSince1970(resultItem.Päivämäärä[0].timestamp)); |
if (obsDate.getMonth() < 8) { | if (obsDate.getMonth() < 8) { | ||
iceMonth = obsDate.getMonth() + 4; | iceMonth = obsDate.getMonth() + 4; | ||
Rivi 173: | Rivi 173: | ||
dataRow[0] = obsWinter; | dataRow[0] = obsWinter; | ||
dataRow[1] = obsDate.getDayOfIceYear(); | dataRow[1] = obsDate.getDayOfIceYear(); | ||
− | dataRow[2] = '<div style="padding: 8px;">' + obsDate.toLocaleDateString(); | + | dataRow[2] = '<div style="padding: 8px; white-space: nowrap;">' + obsDate.toLocaleDateString() + '</div>'; |
if (imagesArr[i]) { | if (imagesArr[i]) { | ||
dataRow[2] += '<br />' + '<div class="ibuTooltipDiv" id="ibuTooltipDiv_' + zi + '" style="width: 144px; height: 144px;"><img class="ibuTooltipImg" id="ibuTooltipImg_' + zi + '" style="max-width: 144px; max-height: 144px;" src="' + imagesArr[zi] + '" /></div>'; | dataRow[2] += '<br />' + '<div class="ibuTooltipDiv" id="ibuTooltipDiv_' + zi + '" style="width: 144px; height: 144px;"><img class="ibuTooltipImg" id="ibuTooltipImg_' + zi + '" style="max-width: 144px; max-height: 144px;" src="' + imagesArr[zi] + '" /></div>'; |