Ero sivun ”Widget:JwObsCharts” versioiden välillä
Järvi-meriwikistä
Rivi 608: | Rivi 608: | ||
jQuery( '[data-toggle="tooltip"]' ).tooltip(); | jQuery( '[data-toggle="tooltip"]' ).tooltip(); | ||
} | } | ||
− | + | ||
− | |||
} | } | ||
Rivi 640: | Rivi 639: | ||
// sort according to obs date | // sort according to obs date | ||
memo.obsesA.sort( function( a, b ) { return b.obsdatetime - a.obsdatetime; }); | memo.obsesA.sort( function( a, b ) { return b.obsdatetime - a.obsdatetime; }); | ||
+ | |||
+ | if ( typeof memo.info != 'undefined' ) { | ||
+ | addToTitle = ' <button style="padding: 0 0.25em; font-size: 13px; margin-bottom: 3px;" type="button" class="btn btn-secondary btn-info" data-toggle="tooltip" data-placement="top" title="' + memo.info + '"><span class="fontawesome"></span></button>'; | ||
+ | } else { | ||
+ | addToTitle = ''; | ||
+ | } | ||
if ( memo.obscode == 'level' ) { | if ( memo.obscode == 'level' ) { | ||
Rivi 712: | Rivi 717: | ||
memo.widgetEl.html(''); | memo.widgetEl.html(''); | ||
− | memo.widgetEl.append( '<h3 style="text-align: center; font-size: 18px; margin-top: 0;">Vedenkorkeus</h3>' ); | + | memo.widgetEl.append( '<h3 style="text-align: center; font-size: 18px; margin-top: 0;">Vedenkorkeus' + addToTitle + '</h3>' ); |
memo.widgetEl.append( '<div style="width: 120px; height: 120px; margin: 12px auto; padding: 10px; border-radius: 6px; Xborder: 3px solid rgba( 213, 218, 38, 0.5 );">' + levelsvg + '</div>'); | memo.widgetEl.append( '<div style="width: 120px; height: 120px; margin: 12px auto; padding: 10px; border-radius: 6px; Xborder: 3px solid rgba( 213, 218, 38, 0.5 );">' + levelsvg + '</div>'); | ||
memo.widgetEl.append( '<p style="text-align: center; line-height: 20px;" class="huomio">' + diffStr + '<br /><span class="Xsmall">(' + obs.obsdatetime.inRelationToToday(memo.lang).toLowerCase() + ')</span></p>' ); | memo.widgetEl.append( '<p style="text-align: center; line-height: 20px;" class="huomio">' + diffStr + '<br /><span class="Xsmall">(' + obs.obsdatetime.inRelationToToday(memo.lang).toLowerCase() + ')</span></p>' ); | ||
Rivi 800: | Rivi 805: | ||
memo.widgetEl.html(''); | memo.widgetEl.html(''); | ||
− | memo.widgetEl.append( '<h3 style="text-align: center; font-size: 18px; margin-top: 0;">Pintaveden lämpötila</h3>' ); | + | memo.widgetEl.append( '<h3 style="text-align: center; font-size: 18px; margin-top: 0;">Pintaveden lämpötila' + addToTitle + '</h3>' ); |
memo.widgetEl.append( '<div style="width: 120px; height: 120px; margin: 10px auto; padding: 10px; border-radius: 6px; Xborder: 3px solid rgba( 213, 218, 38, 0.5 );">' + tsvg + '</div>'); | memo.widgetEl.append( '<div style="width: 120px; height: 120px; margin: 10px auto; padding: 10px; border-radius: 6px; Xborder: 3px solid rgba( 213, 218, 38, 0.5 );">' + tsvg + '</div>'); | ||
memo.widgetEl.append( '<p style="text-align: center; line-height: 22px;" class="huomio">' + tstr + '</p>' ); | memo.widgetEl.append( '<p style="text-align: center; line-height: 22px;" class="huomio">' + tstr + '</p>' ); | ||
Rivi 854: | Rivi 859: | ||
memo.widgetEl.html(''); | memo.widgetEl.html(''); | ||
− | memo.widgetEl.append( '<h3 style="text-align: center; font-size: 18px; margin-top: 0;">Sinilevätilanne</h3>' ); | + | memo.widgetEl.append( '<h3 style="text-align: center; font-size: 18px; margin-top: 0;">Sinilevätilanne' + addToTitle + '</h3>' ); |
memo.widgetEl.append( '<div style="width: 120px; height: 120px; margin: 10px auto; padding: 10px; border-radius: 6px; Xborder: 3px solid rgba( 213, 218, 38, 0.5 );">' + asvg + '</div>'); | memo.widgetEl.append( '<div style="width: 120px; height: 120px; margin: 10px auto; padding: 10px; border-radius: 6px; Xborder: 3px solid rgba( 213, 218, 38, 0.5 );">' + asvg + '</div>'); | ||
memo.widgetEl.append( '<p style="text-align: center; line-height: 22px;" class="huomio">' + astr + '</p>' ); | memo.widgetEl.append( '<p style="text-align: center; line-height: 22px;" class="huomio">' + astr + '</p>' ); |