Ero sivun ”Widget:JwObsCharts” versioiden välillä
Järvi-meriwikistä
Rivi 42: | Rivi 42: | ||
memo.lang = memo.widgetEl.attr( 'data-lang' ); if (typeof memo.lang == 'undefined') { memo.lang = 'fi'; } | memo.lang = memo.widgetEl.attr( 'data-lang' ); if (typeof memo.lang == 'undefined') { memo.lang = 'fi'; } | ||
memo.height = memo.widgetEl.attr( 'data-height' ); if (typeof memo.height == 'undefined') { memo.height = 450; } | memo.height = memo.widgetEl.attr( 'data-height' ); if (typeof memo.height == 'undefined') { memo.height = 450; } | ||
− | memo.widgetEl.height( memo.height ); | + | //memo.widgetEl.height( memo.height ); |
memo.siteid = jQuery( this ).attr( 'data-jw-siteid' ); | memo.siteid = jQuery( this ).attr( 'data-jw-siteid' ); | ||
Rivi 66: | Rivi 66: | ||
memo.widgetEl.append( '<div class="card JwCard mb-2" style="position: relative; width: 100%; height: 100%;"><div class="card-header"></div><div class="card-body p-2" style="position: relative; width: 100%; height: 100%;"><div class="chart-container" style="position: relative; z-index: 110; width: 100%; height: 100%;"></div></div></div>' ); | memo.widgetEl.append( '<div class="card JwCard mb-2" style="position: relative; width: 100%; height: 100%;"><div class="card-header"></div><div class="card-body p-2" style="position: relative; width: 100%; height: 100%;"><div class="chart-container" style="position: relative; z-index: 110; width: 100%; height: 100%;"></div></div></div>' ); | ||
memo.chartEl = jQuery( this ).find( '.chart-container' ); | memo.chartEl = jQuery( this ).find( '.chart-container' ); | ||
− | + | memo.chartEl.height( memo.height ); | |
memo.headerEl = jQuery( this ).find( '.card-header' ); | memo.headerEl = jQuery( this ).find( '.card-header' ); | ||
Rivi 138: | Rivi 138: | ||
document.msExitFullscreen(); | document.msExitFullscreen(); | ||
} | } | ||
− | + | ||
+ | memo.chartEl.css( 'height', '100%' ); | ||
memo.fullscreenEl.find( 'button' ).html( '<i class="fas fa-expand"></i>' ); | memo.fullscreenEl.find( 'button' ).html( '<i class="fas fa-expand"></i>' ); | ||
Rivi 153: | Rivi 154: | ||
} | } | ||
+ | memo.chartEl.css( 'height', memo.height + 'px' ); | ||
memo.fullscreenEl.find( 'button' ).html( '<i class="fas fa-compress"></i>' ); | memo.fullscreenEl.find( 'button' ).html( '<i class="fas fa-compress"></i>' ); | ||