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 = ""; } | ||
− | console.log( jQuery( this ).attr( 'data-showlink' ) ); | + | //console.log( jQuery( this ).attr( 'data-showlink' ) ); |
− | + | if ( typeof jQuery( this ).attr( 'data-showlink' ) == 'undefined' ) { | |
//console.log( 'sd' ); | //console.log( 'sd' ); | ||
memo.showlink = false; | 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 136: | Rivi 136: | ||
console.log( memo ); | console.log( memo ); | ||
// add or hide footer | // add or hide footer | ||
− | if ( memo.caption == '' && !memo. | + | if ( memo.caption == '' && !memo.showlink ) { |
memo.footerEl.hide(); | memo.footerEl.hide(); | ||
} else { | } else { | ||
− | console.log( memo ); | + | //console.log( memo ); |
if ( memo.caption != '' ) { | if ( memo.caption != '' ) { | ||
memo.footerEl.append( memo.caption ); | memo.footerEl.append( memo.caption ); | ||
} | } | ||
− | if ( memo. | + | if ( memo.showlink ) { |
memo.footerEl.append( '<a href="#"><i class="fa-solid fa-location-dot"></i></a>' ); | memo.footerEl.append( '<a href="#"><i class="fa-solid fa-location-dot"></i></a>' ); | ||
} | } |