Ei muokkausyhteenvetoa |
Ei muokkausyhteenvetoa |
||
| (16 välissä olevaa versiota samalta käyttäjältä ei näytetä) | |||
| Rivi 144: | Rivi 144: | ||
// add chart container | // add chart container | ||
memo.widgetEl.append( '<div class="card JwCard mb-2" style="position: relative; width: 100%; height: 100%;"><div class="card-header" style="min-height: 49px;"></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 class="card-footer"></div>' ); | memo.widgetEl.append( '<div class="card JwCard mb-2" style="position: relative; width: 100%; height: 100%;"><div class="card-header" style="min-height: 49px;"></div><div id="' + memo.id + '_collapsible" class="card-body p-2 collapse" style="position: relative; width: 100%; height: 100%;"><div class="chart-container" style="position: relative; z-index: 110; width: 100%; height: 100%;"></div></div><div class="card-footer"></div>' ); | ||
memo.chartEl = jQuery( this ).find( '.chart-container' ); | memo.chartEl = jQuery( this ).find( '.chart-container' ); | ||
memo.chartEl.css( 'height', memo.height + 'px' ); | memo.chartEl.css( 'height', memo.height + 'px' ); | ||
| Rivi 151: | Rivi 151: | ||
// add title | // add title | ||
memo.headerEl.append( '<div class="obscharttitle" style="float: left;"></div>' ); | memo.headerEl.append( '<a class="card-link" data-toggle="collapse" aria-expanded="false" href="#' + memo.id + '_collapsible' + '"><div class="obscharttitle" style="float: left;"></div></a>' ); | ||
memo.titleEl = jQuery( this ).find( '.obscharttitle' ); | memo.titleEl = jQuery( this ).find( '.obscharttitle' ); | ||
// add or hide footer | // add or hide footer | ||
| Rivi 203: | Rivi 203: | ||
// add edit button | // add edit button | ||
if ( memo.editUrl != '-' ) { | if ( memo.editUrl != '-' ) { | ||
memo.headerEl.append( '<div class="obschartbutton edit-button" style="display: none; margin-left: 10px; float: right; font-size: 18.72px;"><button title="' + i18n['edit'][memo.lang] + '" style=" | memo.headerEl.append( '<div class="obschartbutton edit-button" style="display: none; margin-left: 10px; float: right; font-size: 18.72px;"><button title="' + i18n['edit'][memo.lang] + '" style=""><i class="fas fa-edit"></i></button></div>' ); | ||
memo.editEl = jQuery( this ).find( '.edit-button' ); | memo.editEl = jQuery( this ).find( '.edit-button' ); | ||
memo.editEl.on( 'click', function() { window.location.href = memo.editUrl; }); | memo.editEl.on( 'click', function() { window.location.href = memo.editUrl; }); | ||
| Rivi 210: | Rivi 210: | ||
// add download data button | // add download data button | ||
if ( memo.download ) { | if ( memo.download ) { | ||
memo.headerEl.append( '<div class="obschartbutton download-button" style="display: none; margin-left: 10px; float: right; font-size: 18.72px;"><button title="' + i18n['download'][memo.lang] + '" style=" | memo.headerEl.append( '<div class="obschartbutton download-button" style="display: none; margin-left: 10px; float: right; font-size: 18.72px;"><button title="' + i18n['download'][memo.lang] + '" style=""><i class="fas fa-download"></i></button></div>' ); | ||
memo.downloadEl = jQuery( this ).find( '.download-button' ); | memo.downloadEl = jQuery( this ).find( '.download-button' ); | ||
| Rivi 749: | Rivi 749: | ||
if ( memo.siteid != '-' ) { | if ( memo.siteid != '-' ) { | ||
memo.info += i18n[ 'siteinfostring' ][ memo.lang] + ': ' + memo.jw.site[ memo.siteid ].name; | memo.info += i18n[ 'siteinfostring' ][ memo.lang] + ': ' + memo.jw.site[ memo.siteid ].name; | ||
} | } | ||
if ( depthcats.length == 1 ) { | if ( depthcats.length == 1 ) { | ||
if ( memo.depthsO[ depthcats[0] ].valstring != '' ) { | if ( memo.depthsO[ depthcats[0] ].valstring != '' ) { | ||
if ( memo.info != '' ) { memo.info += "<br />"; } | |||
memo.info += i18n[ 'depthinfostring' ][ memo.lang] + ': ' + memo.depthsO[ depthcats[0] ].valstring; | memo.info += i18n[ 'depthinfostring' ][ memo.lang] + ': ' + memo.depthsO[ depthcats[0] ].valstring; | ||
} | } | ||
| Rivi 761: | Rivi 760: | ||
if ( memo.info != '' ) { | if ( memo.info != '' ) { | ||
memo.titleEl.append( ' <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>' ); | memo.titleEl.append( ' <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" data-html="true" title="' + memo.info + '"><span class="fontawesome"></span></button>' ); | ||
jQuery( '[data-toggle="tooltip"]' ).tooltip(); | jQuery( '[data-toggle="tooltip"]' ).tooltip(); | ||
} | } | ||
| Rivi 1 384: | Rivi 1 383: | ||
// do average | // do average | ||
console.log( memo ); | |||
if (memo.trendType == 'gaussian') { | if (memo.trendType == 'gaussian') { | ||
| Rivi 2 059: | Rivi 2 059: | ||
'season': 'summer', | 'season': 'summer', | ||
'min': 0, | 'min': 0, | ||
'max': 110, | |||
'direction': 1, | 'direction': 1, | ||
'trend': { 'type': 'gaussian', 'layout': 'line' }, | 'trend': { 'type': 'gaussian', 'layout': 'line' }, | ||
| Rivi 2 182: | Rivi 2 183: | ||
'long': { 'fi': 'Elokuu', 'en': 'August', 'sv': 'Augusti', 'ru': '???' }, | 'long': { 'fi': 'Elokuu', 'en': 'August', 'sv': 'Augusti', 'ru': '???' }, | ||
'short': { 'fi': 'Elo', 'en': 'Aug', 'sv': 'Aug', 'ru': '???' }, | 'short': { 'fi': 'Elo', 'en': 'Aug', 'sv': 'Aug', 'ru': '???' }, | ||
'roman': ' | 'roman': 'VIII' | ||
}, | }, | ||
8: { | 8: { | ||


