egroupware/phpgwapi/js/dhtmlxGantt/samples/04_customization/03_link_styles.html

70 lines
1.9 KiB
HTML
Executable File

<!DOCTYPE html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<title>Link styles</title>
</head>
<script src="../../codebase/dhtmlxgantt.js" type="text/javascript" charset="utf-8"></script>
<link rel="stylesheet" href="../../codebase/dhtmlxgantt.css" type="text/css" media="screen" title="no title" charset="utf-8">
<script type="text/javascript" src="../common/testdata.js"></script>
<style type="text/css">
html, body{ height:100%; padding:0px; margin:0px; overflow: hidden;}
.gantt_task_link.start_to_start .gantt_line_wrapper div{
background-color: #dd5640;
}
.gantt_task_link.start_to_start:hover .gantt_line_wrapper div{
box-shadow: 0 0 5px 0px #dd5640;
}
.gantt_task_link.start_to_start .gantt_link_arrow_right{
border-left-color: #dd5640;
}
.gantt_task_link.finish_to_start .gantt_line_wrapper div{
background-color: #7576ba;
}
.gantt_task_link.finish_to_start:hover .gantt_line_wrapper div{
box-shadow: 0 0 5px 0px #7576ba;
}
.gantt_task_link.finish_to_start .gantt_link_arrow_right{
border-left-color: #7576ba;
}
.gantt_task_link.finish_to_finish .gantt_line_wrapper div{
background-color: #55d822;
}
.gantt_task_link.finish_to_finish:hover .gantt_line_wrapper div{
box-shadow: 0 0 5px 0px #55d822;
}
.gantt_task_link.finish_to_finish .gantt_link_arrow_left{
border-right-color: #55d822;
}
</style>
<body>
<div id="gantt_here" style='width:100%; height:100%;'></div>
<script type="text/javascript">
gantt.init("gantt_here");
gantt.templates.link_class = function(link){
var types = gantt.config.links;
switch (link.type){
case types.finish_to_start:
return "finish_to_start";
break;
case types.start_to_start:
return "start_to_start";
break;
case types.finish_to_finish:
return "finish_to_finish";
break;
}
};
gantt.parse(demo_tasks);
</script>
</body>