Ei muokkausyhteenvetoa |
p (Tekstin korvaus – ”|limit=1000” muotoon ”|limit=2000”) |
||
| (5 välissä olevaa versiota samalta käyttäjältä ei näytetä) | |||
| Rivi 4: | Rivi 4: | ||
<script type="text/javascript"> | <script type="text/javascript"> | ||
function <!--{$id|default:drawIfzChart|escape:'html'}-->_jQueryTest() { | |||
if ( typeof window.jQuery == 'undefined' ) { | |||
setTimeout( function(){ <!--{$id|default:drawIfzChart|escape:'html'}-->_jQueryTest() }, 300); | |||
} else { | |||
google.charts.load( 'current', { 'packages':[ 'corechart' ], 'language': 'fi' } ); | |||
google.charts.setOnLoadCallback(<!--{$id|default:drawIfzChart|escape:'html'}-->_func); | |||
} | |||
} | |||
setTimeout( function(){ <!--{$id|default:drawIfzChart|escape:'html'}-->_jQueryTest() }, 300); | |||
function <!--{$id|default:drawIfzChart|escape:'html'}-->_func() { | |||
var siteName = '<!--{$page|escape:'urlpathinfo'}-->'; | var siteName = '<!--{$page|escape:'urlpathinfo'}-->'; | ||
| Rivi 17: | 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 75: | 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 128: | 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 154: | 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 166: | 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>'; | ||


