Ero sivun ”Widget:JwObsCharts2” versioiden välillä
Järvi-meriwikistä
Rivi 336: | Rivi 336: | ||
memo.headerEl.append( '<div class="obschartbutton sitelink-button" style="display: none; margin-left: 10px; float: right; Xbackground-color: rgba( 255, 255, 255, 1 ); border-radius: 50%; Xborder: 1px solid rgba( 0, 0, 0, 0.5 ); Xpadding: 1px;"><button title="' + i18n['sitelink'][memo.lang] + '" style="width: 24px; height: 24px; padding: 0; margin: 0; color: #1B599B; background: none; border: none; "><i class="fas fa-map-marked"></i></button></div>' ); | memo.headerEl.append( '<div class="obschartbutton sitelink-button" style="display: none; margin-left: 10px; float: right; Xbackground-color: rgba( 255, 255, 255, 1 ); border-radius: 50%; Xborder: 1px solid rgba( 0, 0, 0, 0.5 ); Xpadding: 1px;"><button title="' + i18n['sitelink'][memo.lang] + '" style="width: 24px; height: 24px; padding: 0; margin: 0; color: #1B599B; background: none; border: none; "><i class="fas fa-map-marked"></i></button></div>' ); | ||
memo.sitelinkEl = jQuery( this ).find( '.sitelink-button' ); | memo.sitelinkEl = jQuery( this ).find( '.sitelink-button' ); | ||
+ | memo.sitelinkEl.on( 'click', function() { | ||
+ | var elem = memo.widgetEl[0]; | ||
+ | window.location.href = 'https://www.jarviwiki.fi/w/index.php?curid=' + memo.siteid; | ||
+ | }); | ||
} | } | ||
− | |||
− | |||
− | |||
− | |||
} | } |