Ei muokkausyhteenvetoa |
p (Tekstin korvaus – ”/w/images/” muotoon ”/images/”) |
||
| (46 välissä olevaa versiota samalta käyttäjältä ei näytetä) | |||
| Rivi 1: | Rivi 1: | ||
<includeonly><div id="<!--{$id|default:JwAlgalTable|escape:'html'}-->_container">Ladataan tietoja, odota..</div> | <includeonly> | ||
<div id="<!--{$id|default:JwAlgalTable|escape:'html'}-->_container"><p class="ingressi">Ladataan tietoja, odota...</p></div> | |||
<script type="text/javascript"> | <script type="text/javascript"> | ||
| Rivi 14: | Rivi 15: | ||
var vuosi = "<!--{$vuosi|default:1998|escape:'html'}-->"; | var vuosi = "<!--{$vuosi|default:1998|escape:'html'}-->"; | ||
var | var alue = "<!--{$alue|escape:'html'}-->"; | ||
ely = ely.replace('ELY', 'elinkeino-, liikenne- ja ympäristökeskus'); | var ely, meri; | ||
if ( alue == 'Sisävedet' ) { | |||
ely = 'ei'; | |||
meri = 0; | |||
} else if ( alue == 'Merialue' ) { | |||
ely = 'ei'; | |||
meri = 1; | |||
} else { | |||
ely = alue.replace( 'ELY', 'elinkeino-, liikenne- ja ympäristökeskus' ); | |||
meri = 2; | |||
} | |||
var kunta = "<!--{$kunta|default:ei|escape:'html'}-->"; | var kunta = "<!--{$kunta|default:ei|escape:'html'}-->"; | ||
| Rivi 43: | Rivi 52: | ||
else if (meri == "1") { searchStr += encodeURI("[[Vesistö::Meri]]"); } | else if (meri == "1") { searchStr += encodeURI("[[Vesistö::Meri]]"); } | ||
searchStr += encodeURI("|? | searchStr += encodeURI("|?SiteID|?SiteName|?Vesistö|?Alue|?Järvi|?Vesistöalue|?Kunta|?Viikko|?Levätilanne|limit=20000"); | ||
searchStr += '&format=json'; | searchStr += '&format=json'; | ||
| Rivi 53: | Rivi 62: | ||
dataType: 'jsonp' | dataType: 'jsonp' | ||
}); | }); | ||
function progressIndicator(d) { | function progressIndicator(d) { | ||
jQuery('#<!--{$id|default:JwAlgalTable|escape:'html'}-->_container').html('Ladataan tietoja (' + (maxRows-d) + '/' + maxRows + ')'); | jQuery('#<!--{$id|default:JwAlgalTable|escape:'html'}-->_container').html('Ladataan tietoja (' + (maxRows-d) + '/' + maxRows + ')'); | ||
| Rivi 59: | Rivi 68: | ||
function success(request) { | function success(request) { | ||
console.log(request); | console.log(request); | ||
reqSuccess = true; | reqSuccess = true; | ||
if (request.query. | if ( request.query.meta.count > 0 ) { | ||
var output = ""; | var output = ""; | ||
| Rivi 68: | Rivi 77: | ||
var lastWeek = 0; | var lastWeek = 0; | ||
output += '<div class="mw-content-ltr">' | output += '<div class="mw-content-ltr">' | ||
output += '<table width="100%" class="tablesorter sortable jquery-tablesorter wikitable smwtable | output += '<table width="100%" class="tablesorter sortable jquery-tablesorter wikitable smwtable Xsmalltable2 tablecompact" id="<!--{$id|default:JwAlgalTable|escape:'html'}-->" >'; | ||
output += '<thead><tr>'; | output += '<thead><tr>'; | ||
output += '<th class="headerSort" style="text-align: left;"></th>'; | output += '<th class="headerSort " style="text-align: left;"></th>'; | ||
output += '<th class="headerSort" style="text-align: left;">Vesistö</th>'; | output += '<th class="headerSort" style="text-align: left;">Vesistö</th>'; | ||
output += '<th class="headerSort" style="text-align: left;">Nimi</th>'; | output += '<th class="headerSort" style="text-align: left;">Nimi</th>'; | ||
output += '<th class="headerSort" style="text-align: left;">Kunta</th>'; | output += '<th class="headerSort" style="text-align: left;">Kunta</th>'; | ||
output += '<th class="headerSort headerSortSmall" style="text-align: center;">23</th>'; | output += '<th class="headerSort headerSortSmall" style="text-align: center;">23</th>'; | ||
output += '<th class="headerSort | output += '<th class="headerSort headerSort-compact" style="text-align: center;">24</th>'; | ||
output += '<th class="headerSort | output += '<th class="headerSort headerSort-compact" style="text-align: center;">25</th>'; | ||
output += '<th class="headerSort | output += '<th class="headerSort headerSort-compact" style="text-align: center;">26</th>'; | ||
output += '<th class="headerSort | output += '<th class="headerSort headerSort-compact" style="text-align: center;">27</th>'; | ||
output += '<th class="headerSort | output += '<th class="headerSort headerSort-compact" style="text-align: center;">28</th>'; | ||
output += '<th class="headerSort | output += '<th class="headerSort headerSort-compact" style="text-align: center;">29</th>'; | ||
output += '<th class="headerSort | output += '<th class="headerSort headerSort-compact" style="text-align: center;">30</th>'; | ||
output += '<th class="headerSort | output += '<th class="headerSort headerSort-compact" style="text-align: center;">31</th>'; | ||
output += '<th class="headerSort | output += '<th class="headerSort headerSort-compact" style="text-align: center;">32</th>'; | ||
output += '<th class="headerSort | output += '<th class="headerSort headerSort-compact" style="text-align: center;">33</th>'; | ||
output += '<th class="headerSort | output += '<th class="headerSort headerSort-compact" style="text-align: center;">34</th>'; | ||
output += '<th class="headerSort | output += '<th class="headerSort headerSort-compact" style="text-align: center;">35</th>'; | ||
output += '<th class="headerSort | output += '<th class="headerSort headerSort-compact" style="text-align: center;">36</th>'; | ||
output += '<th class="headerSort | output += '<th class="headerSort headerSort-compact" style="text-align: center;">37</th>'; | ||
output += '<th class="headerSort | output += '<th class="headerSort headerSort-compact" style="text-align: center;">38</th>'; | ||
output += '<th class="headerSort | output += '<th class="headerSort headerSort-compact" style="text-align: center;">39</th>'; | ||
output += '</tr></thead><tbody>'; | output += '</tr></thead><tbody>'; | ||
| Rivi 104: | Rivi 113: | ||
resultItem = request.query.results[i].printouts; | resultItem = request.query.results[i].printouts; | ||
resultPage = resultItem.SiteID[0]; | resultPage = resultItem.SiteID[0]; | ||
if (dataArr[resultPage] == undefined) { | if (dataArr[resultPage] == undefined) { | ||
| Rivi 111: | Rivi 118: | ||
dataArr[resultPage] = new Object(); | dataArr[resultPage] = new Object(); | ||
dataArr[resultPage].url = "//www.jarviwiki.fi/wiki/index.php?curid=" + resultPage; | dataArr[resultPage].url = "//www.jarviwiki.fi/wiki/index.php?curid=" + resultPage; | ||
dataArr[resultPage].SiteName = resultItem.SiteName[0].fulltext; | |||
if (resultItem.Vesistö[0] == 'Meri') { | if (resultItem.Vesistö[0] == 'Meri') { | ||
dataArr[resultPage].sea = true; | dataArr[resultPage].sea = true; | ||
| Rivi 135: | Rivi 143: | ||
resultWeek = resultItem.Viikko[0]; | resultWeek = resultItem.Viikko[0]; | ||
dataArr[resultPage].weeks[resultWeek] = resultItem.Levätilanne[0]; | dataArr[resultPage].weeks[resultWeek] = resultItem.Levätilanne[0]; | ||
} | } | ||
| Rivi 150: | Rivi 159: | ||
output += '<td data-sort-value="1" valign="middle" class="smwtype_qty">'; | output += '<td data-sort-value="1" valign="middle" class="smwtype_qty">'; | ||
output += '<a href="' + site.url + '" title="' + site.title + '">'; | output += '<a href="' + site.url + '" title="' + site.title + '">'; | ||
output += '<img alt="Merialue" src="//www.jarviwiki.fi | output += '<img alt="Merialue" src="//www.jarviwiki.fi/images/a/ac/Pm_hp_asiantuntija_1_27x27.png" width="27" height="27" style="vertical-align: middle" />'; | ||
output += '</a></td>'; | output += '</a></td>'; | ||
} else { | } else { | ||
output += '<td data-sort-value="0" valign="middle" class="smwtype_qty">'; | output += '<td data-sort-value="0" valign="middle" class="smwtype_qty">'; | ||
output += '<a href="' + site.url + '" title="' + site.title + '">'; | output += '<a href="' + site.url + '" title="' + site.title + '">'; | ||
output += '<img alt="Sisävesi" src="//www.jarviwiki.fi | output += '<img alt="Sisävesi" src="//www.jarviwiki.fi/images/f/f3/Pm_hp_asiantuntija_2_27x27.png" width="27" height="27" style="vertical-align: middle" />'; | ||
output += '</a></td>'; | output += '</a></td>'; | ||
} | } | ||
output += '<td class="smwtype_wpg"><a href="' + site.wBodyUrl + '">' + site.wBody + '</a></td>'; | output += '<td class="smwtype_wpg"><a href="' + site.wBodyUrl + '">' + site.wBody + '</a></td>'; | ||
nimi = site.title.substr(site.title.lastIndexOf('/')); | |||
nimi = site.SiteName.substr(site.SiteName.lastIndexOf('/')); //site.title.substr(site.title.lastIndexOf('/')); | |||
if (nimi.indexOf('(') != -1) { | if (nimi.indexOf('(') != -1) { | ||
nimi = nimi.substr(nimi.indexOf('(')); | nimi = nimi.substr(nimi.indexOf('(')); | ||
| Rivi 197: | Rivi 208: | ||
output += '</tbody><tfoot></tfoot></table></div>'; | output += '</tbody><tfoot></tfoot></table></div>'; | ||
if (meripaikkoja) { | if (meripaikkoja) { | ||
output += '<div style="border: 0; float: left; margin-left: 13px;"><p class="kuvateksti"><a href=" | //output += '<div style="border: 0; float: left; margin-left: 13px;"><p class="kuvateksti"><a href="/images/a/ac/Pm_hp_asiantuntija_1_27x27.png"><img alt="Merialue" src="/images/thumb/a/ac/Pm_hp_asiantuntija_1_27x27.png/21px-Pm_hp_asiantuntija_1_27x27.png" width="21" height="21" /></a> = Merialueen havaintopaikka</p></div>'; | ||
} | } | ||
output += '</div>'; | output += '</div>'; | ||
| Rivi 207: | Rivi 216: | ||
} | } | ||
doRows(); | |||
} else { | |||
jQuery("#<!--{$id|default:JwAlgalTable|escape:'html'}-->_container").html( '<p class="ingressi">Hakuehtojen mukaisia tietoja ei löytynyt.</p>' ); | |||
jQuery( | |||
} | } | ||
//alert(exportCsv); | //alert(exportCsv); | ||
| Rivi 262: | Rivi 235: | ||
//window.open('data:text/csv;charset=utf-8,' + escape(exportCsv)); | //window.open('data:text/csv;charset=utf-8,' + escape(exportCsv)); | ||
} | } | ||
} | } | ||
</script></includeonly> | </script> | ||
</includeonly> | |||


