Hi, I have problem with passing function for event area onlick method.
Main file:
<?
dp.events.load("../system/TL_sys_bloki.php");
?>
TL_sys_bloki.php file:
{
"id": "<?=$dane_timeline[$ix]['id'];?>",
"text": "<?=$dane_timeline[$ix]['text'];?>",
"start": "<?=$dane_timeline[$ix]['start'];?>",
"end": "<?=$dane_timeline[$ix]['stop'];?>",
"resource": "<?=$dane_timeline[$ix]['resource'];?>",
"color": "<?=$dane_timeline[$ix]['color'];?>",
"join": "1",
"bubbleHtml": "Testing bubble",
"areas": [{
"onClick": function (args) {
DayPilot.Modal.alert(args.source.text());
},
"bottom": "9",
"width": "60",
"html": "<i class='mdi mdi-alert'></i> <?=$dane_timeline[$ix]['id'];?>",
"top": "3",
"left": "2",
"visibility": "Hover",
"backColor": "yellow"
}]
}
None of the option works (with or without " '):
""onClick": function (args) { DayPilot.Modal.alert(args.source.text()); },"
pls help