diff --git a/index.html b/index.html
index dd193db..d6170ee 100644
--- a/index.html
+++ b/index.html
@@ -1,4 +1,4 @@
-
+
jQuery.Gantt
@@ -71,6 +71,54 @@
+
@@ -482,6 +530,32 @@
"use strict";
+ makeGanttChart();
+
+ $('form#ganttControl').submit(function() {
+ makeGanttChart();
+ return false;
+ });
+
+ $(".gantt").popover({
+ selector: ".bar",
+ title: "I'm a popover",
+ content: "And I'm the content of said popover.",
+ trigger: "hover"
+ });
+
+ prettyPrint();
+
+ });
+
+ function makeGanttChart() {
+ var itemsPerPage = parseInt($('#itemsPerPage').val(), 10);
+ var navigate = $('#navigate').val();
+ var scale = $('#scale').val();
+ var minScale = $('#minScale').val();
+ var maxScale = $('#maxScale').val();
+ var scrollToToday = $('#scrollToToday').val() === "true" ? true : false;
+
$(".gantt").gantt({
source: [{
name: "Sprint 0",
@@ -561,12 +635,13 @@
customClass: "ganttOrange"
}]
}],
- navigate: "scroll",
- scale: "weeks",
- maxScale: "months",
- minScale: "hours",
- itemsPerPage: 10,
+ navigate: navigate, // "scroll"
+ scale: scale, // "weeks"
+ maxScale: maxScale, // "months"
+ minScale: minScale, // "hours"
+ itemsPerPage: itemsPerPage, // 10
useCookie: true,
+ scrollToToday: scrollToToday, // true
onItemClick: function(data) {
alert("Item clicked - show some details");
},
@@ -580,16 +655,7 @@
}
});
- $(".gantt").popover({
- selector: ".bar",
- title: "I'm a popover",
- content: "And I'm the content of said popover.",
- trigger: "hover"
- });
-
- prettyPrint();
-
- });
+ }