Ei muokkausyhteenvetoa |
Ei muokkausyhteenvetoa |
||
| Rivi 42: | Rivi 42: | ||
memo.service = jQuery( this ).attr( 'data-coo311-service_code' ); | memo.service = jQuery( this ).attr( 'data-coo311-service_code' ); | ||
memo.graphType = jQuery( this ).attr( 'data-graph-type' ); | memo.graphType = jQuery( this ).attr( 'data-graph-type' ); | ||
memo.editUrl = jQuery( this ).attr( 'data-edit-url' ); | memo.editUrl = jQuery( this ).attr( 'data-edit-url' ); if (typeof memo.editUrl == 'undefined') { memo.editUrl = '-'; } | ||
memo.id = jQuery( this ).attr( 'id' ); if (typeof memo.id == 'undefined') { memo.id = 'jwsitegraph_' + Math.random() + '_container'; jQuery( this ).attr( 'id', memo.id ); } | memo.id = jQuery( this ).attr( 'id' ); if (typeof memo.id == 'undefined') { memo.id = 'jwsitegraph_' + Math.random() + '_container'; jQuery( this ).attr( 'id', memo.id ); } | ||
| Rivi 68: | Rivi 68: | ||
// add edit button | // add edit button | ||
if ( memo.editUrl != '-' ) { | |||
memo.headerEl.append( '<div class="obschartbutton edit-button" style="Xdisplay: 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['edit'][memo.lang] + '" style="width: 24px; height: 24px; padding: 0; margin: 0; color: #1B599B; background: none; border: none;"><i class="fas fa-edit"></i></button></div>' ); | |||
memo.editEl = jQuery( this ).find( '.edit-button' ); | |||
} | |||
// add download data button | // add download data button | ||
| Rivi 1 026: | Rivi 1 027: | ||
}); | }); | ||
memo.editEl.on( 'click', function() { | |||
window.location.href = memo.editUrl; | |||
}); | |||
memo.fullscreenEl.on( 'click', function() { | memo.fullscreenEl.on( 'click', function() { | ||


