mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-02 12:54:18 +01:00
42 lines
1.4 KiB
HTML
42 lines
1.4 KiB
HTML
|
<!DOCTYPE html>
|
||
|
<head>
|
||
|
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
|
||
|
<title>Template control</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 src="../common/testdata.js" type="text/javascript" charset="utf-8"></script>
|
||
|
<style>
|
||
|
#title1{
|
||
|
padding-left:35px;
|
||
|
color:black;
|
||
|
font-weight:bold;
|
||
|
}
|
||
|
#title2{
|
||
|
padding-left:15px;
|
||
|
color:black;
|
||
|
font-weight:bold;
|
||
|
}
|
||
|
</style>
|
||
|
<body>
|
||
|
<div id="gantt_here" style='width:1000px; height:400px;'></div>
|
||
|
|
||
|
<script type="text/javascript">
|
||
|
gantt.locale.labels.section_template = "Details";
|
||
|
gantt.config.lightbox.sections = [
|
||
|
{name: "description", height: 38, map_to: "text", type: "textarea", focus: true},
|
||
|
{name:"template", height:16, type:"template", map_to:"my_template"},
|
||
|
{name: "time", height: 72, type: "duration", map_to: "auto"}
|
||
|
];
|
||
|
|
||
|
gantt.attachEvent("onBeforeLightbox", function(id) {
|
||
|
var task = gantt.getTask(id);
|
||
|
task.my_template = "<span id='title1'>Holders: </span>"+ task.users+"<span id='title2'>Progress: </span>"+ task.progress*100 +" %";
|
||
|
return true;
|
||
|
});
|
||
|
|
||
|
gantt.init("gantt_here");
|
||
|
gantt.parse(users_data);
|
||
|
gantt.showLightbox(1);
|
||
|
</script>
|
||
|
</body>
|