egroupware/phpgwapi/js/dhtmlxGantt/samples/04_customization/07_progress_text.html

35 lines
995 B
HTML
Raw Normal View History

<!DOCTYPE html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<title>Text in the Progress bar</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>
.gantt_task_progress{
text-align:left;
padding-left:10px;
box-sizing: border-box;
color:white;
font-weight: bold;
}
html, body{
width: 100%;
height: 100%;
margin: 0;
}
</style>
<body>
<div id="gantt_here" style='width:100%; height:100%;'></div>
<script type="text/javascript">
gantt.templates.progress_text = function(start, end, task){
return "<span style='text-align:left;'>"+Math.round(task.progress*100)+ "% </span>";
};
gantt.init("gantt_here");
gantt.parse(demo_tasks);
</script>
</body>