Project

General

Profile

1
$(function() {
2
	altair_gantt.init();
3
});
4

    
5
altair_gantt = {
6
    init: function() {
7
        var $gantt_chart = $('#gantt_chart');
8
        if($gantt_chart.length) {
9
            $gantt_chart.ganttView({
10
                data: ganttData, // gantt data
11
                startDate: '07/24/2018',
12
                endDate: '11/30/2018',
13
                // showToday: true, // highlight today
14
                // startToday: true, // scroll to today
15
                behavior: {
16
                    onClick: function (data) {
17
                        console.log("You clicked on an event: "+"\n", data);
18
                    },
19
                    onResize: function (data) {
20
                        console.log('You resized an event: '+"\n", data);
21
                    },
22
                    onDrag: function (data) {
23
                        console.log("You dragged an event: "+"\n", data);
24
                    }
25
                }
26
            });
27

    
28
            $gantt_chart.find('[title]').each(function() {
29
                $(this).attr('data-uk-tooltip',"{offset:4}");
30
            })
31

    
32
        }
33
    }
34
};
(95-95/114)