Add initial implementation of Simple Gantt chart and sample names list
- Created index.html for the Gantt chart with sample tasks and configurations. - Added styles for the Gantt chart and linked necessary CSS and JS files. - Introduced a names.txt file containing a list of names for potential use in the application.
This commit is contained in:
105
libraries/Simple-Gant-master/index.html
Normal file
105
libraries/Simple-Gant-master/index.html
Normal file
@@ -0,0 +1,105 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Simple Gantt</title>
|
||||
<style>
|
||||
body {
|
||||
font-family: sans-serif;
|
||||
background: #ccc;
|
||||
}
|
||||
.container {
|
||||
width: 80%;
|
||||
margin: 0 auto;
|
||||
}
|
||||
/* custom class */
|
||||
.gantt .bar-milestone .bar {
|
||||
fill: tomato;
|
||||
}
|
||||
</style>
|
||||
<link rel="stylesheet" href="frappe-gantt.css" />
|
||||
<script src="frappe-gantt.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<h2>Interactive Gantt </h2>
|
||||
<div class="gantt-target"></div>
|
||||
</div>
|
||||
<script>
|
||||
var tasks = [
|
||||
{
|
||||
start: '2018-10-01',
|
||||
end: '2018-10-08',
|
||||
name: 'Redesign website',
|
||||
id: "Task 0",
|
||||
progress: 91
|
||||
},
|
||||
{
|
||||
start: '2018-10-03',
|
||||
end: '2018-10-06',
|
||||
name: 'Write new content',
|
||||
id: "Task 1",
|
||||
progress: 55,
|
||||
dependencies: 'Task 0'
|
||||
},
|
||||
{
|
||||
start: '2018-10-04',
|
||||
end: '2018-10-08',
|
||||
name: 'Apply new styles',
|
||||
id: "Task 2",
|
||||
progress: 40,
|
||||
dependencies: 'Task 1'
|
||||
},
|
||||
{
|
||||
start: '2018-10-08',
|
||||
end: '2018-10-09',
|
||||
name: 'Review',
|
||||
id: "Task 3",
|
||||
progress: 20,
|
||||
dependencies: 'Task 2'
|
||||
},
|
||||
{
|
||||
start: '2018-10-08',
|
||||
end: '2018-10-10',
|
||||
name: 'Deploy',
|
||||
id: "Task 4",
|
||||
progress: 50,
|
||||
dependencies: 'Task 2'
|
||||
},
|
||||
{
|
||||
start: '2018-10-11',
|
||||
end: '2018-10-11',
|
||||
name: 'Go Live!',
|
||||
id: "Task 5",
|
||||
progress: 10,
|
||||
dependencies: 'Task 4',
|
||||
custom_class: 'bar-milestone'
|
||||
},
|
||||
// {
|
||||
// start: '2014-01-05',
|
||||
// end: '2019-10-12',
|
||||
// name: 'Long term task',
|
||||
// id: "Task 6",
|
||||
// progress: 0
|
||||
// }
|
||||
]
|
||||
var gantt_chart = new Gantt(".gantt-target", tasks, {
|
||||
on_click: function (task) {
|
||||
console.log(task);
|
||||
},
|
||||
on_date_change: function(task, start, end) {
|
||||
console.log(task, start, end);
|
||||
},
|
||||
on_progress_change: function(task, progress) {
|
||||
console.log(task, progress);
|
||||
},
|
||||
on_view_change: function(mode) {
|
||||
console.log(mode);
|
||||
},
|
||||
view_mode: 'Week',
|
||||
language: 'en'
|
||||
});
|
||||
console.log(gantt_chart);
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user