Ero sivun ”Widget:JwObsCharts2” versioiden välillä
Järvi-meriwikistä
Rivi 84: | Rivi 84: | ||
memo.info = jQuery( this ).attr( 'data-info' ); if ( typeof memo.info == 'undefined' ) { memo.info = ""; } | memo.info = jQuery( this ).attr( 'data-info' ); if ( typeof memo.info == 'undefined' ) { memo.info = ""; } | ||
memo.caption = jQuery( this ).attr( 'data-caption' ); if ( typeof memo.caption == 'undefined' ) { memo.caption = ""; } | memo.caption = jQuery( this ).attr( 'data-caption' ); if ( typeof memo.caption == 'undefined' ) { memo.caption = ""; } | ||
+ | if ( typeof jQuery( this ).attr( 'data-showlink' ) == 'undefined' ) { memo.showlink = false; } | ||
+ | else { memo.showlink = ( jQuery( this ).attr( 'data-showlink' ).toLowerCase() == 'true' ); } | ||
if ( typeof jQuery( this ).attr( 'data-min' ) != 'undefined' ) { i18n[memo.obscode]['min'] = parseInt( jQuery( this ).attr( 'data-min' ) ); } | if ( typeof jQuery( this ).attr( 'data-min' ) != 'undefined' ) { i18n[memo.obscode]['min'] = parseInt( jQuery( this ).attr( 'data-min' ) ); } | ||
Rivi 129: | Rivi 131: | ||
// add or hide footer | // add or hide footer | ||
− | if ( memo.caption == '' ) { | + | if ( memo.caption == '' && !memo.showsitelink ) { |
memo.footerEl.hide(); | memo.footerEl.hide(); | ||
} else { | } else { | ||
− | memo.footerEl.append( memo.caption ); | + | if ( memo.caption != '' ) { |
+ | memo.footerEl.append( memo.caption ); | ||
+ | } | ||
+ | if ( memo.showsitelink ) { | ||
+ | memo.footerEl.append( '<a href="#"><i class="fa-solid fa-location-dot"></i></a>' ); | ||
+ | } | ||
+ | //memo.footerEl.append(''); | ||
} | } | ||