Skip to content

Commit

Permalink
Squashed commit of the following:
Browse files Browse the repository at this point in the history
commit c7e6a45
Author: Nicola Rizzo <[email protected]>
Date:   Sat Jul 26 19:51:30 2014 +0200

    corrects the year number, fixes #17835; test updated
  • Loading branch information
nicrizzo committed Aug 5, 2014
1 parent a429a46 commit 9b15b3f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions gantt/GanttChart.js
Original file line number Diff line number Diff line change
Expand Up @@ -788,7 +788,7 @@ define([
newMonth = date.getMonth();
lastYear = date.getFullYear();
if(newMonth != oldMonth){
this.addMonthInPanelTime(newMonthRow, mcount, oldMonth, lastYear);
this.addMonthInPanelTime(newMonthRow, mcount, oldMonth, oldMonth !== 11 ? lastYear : lastYear - 1);
mcount = 0;
oldMonth = newMonth;
}
Expand Down Expand Up @@ -857,7 +857,7 @@ define([
newMonth = date.getMonth();
lastYear = date.getFullYear();
if(newMonth != oldMonth){
this.addMonthInPanelTime(prows[1], mcount, oldMonth, lastYear);
this.addMonthInPanelTime(prows[1], mcount, oldMonth, oldMonth !== 11 ? lastYear : lastYear - 1);
mcount = 0;
oldMonth = newMonth;
}
Expand Down
22 changes: 11 additions & 11 deletions gantt/tests/test_Gantt.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,21 +29,21 @@
var projectDev = new GanttProjectItem({
id: 1,
name: "Development Project",
startDate: new Date(2012, 5, 11)
startDate: new Date(2012, 10, 11)
});

var taskRequirement = new GanttTaskItem({
id: 1,
name: "Requirement",
startTime: new Date(2012, 5, 11),
startTime: new Date(2012, 10, 11),
duration: 50,
percentage: 50,
taskOwner: "Jack"
});
var taskAnalysis = new GanttTaskItem({
id: 2,
name: "Analysis",
startTime: new Date(2012, 5, 18),
startTime: new Date(2012, 10, 18),
duration: 40,
percentage: 80,
previousTaskId: "1",
Expand All @@ -52,7 +52,7 @@
var taskDesign = new GanttTaskItem({
id: 3,
name: "Design",
startTime: new Date(2012, 5, 18),
startTime: new Date(2012, 10, 18),
duration: 60,
percentage: 80,
previousTaskId: "1",
Expand All @@ -61,7 +61,7 @@
var taskDetailDesign = new GanttTaskItem({
id: 4,
name: "Detail design",
startTime: new Date(2012, 5, 18),
startTime: new Date(2012, 10, 18),
duration: 30,
percentage: 50,
previousTaskId: "1",
Expand All @@ -70,7 +70,7 @@
var taskDevelopmentDoc = new GanttTaskItem({
id: 5,
name: "Development doc",
startTime: new Date(2012, 5, 20),
startTime: new Date(2012, 10, 20),
duration: 20,
percentage: 10,
previousTaskId: "1",
Expand All @@ -86,7 +86,7 @@
var taskSketch = new GanttTaskItem({
id: 6,
name: "Sketch",
startTime: new Date(2012, 6, 1),
startTime: new Date(2012, 11, 1),
duration: 20,
percentage: 50,
previousTaskId: "3",
Expand All @@ -95,7 +95,7 @@
var taskPrototype = new GanttTaskItem({
id: 7,
name: "Prototype",
startTime: new Date(2012, 6, 6),
startTime: new Date(2012, 11, 6),
duration: 60,
percentage: 80,
previousTaskId: "6",
Expand All @@ -104,7 +104,7 @@
var taskImplementation = new GanttTaskItem({
id: 8,
name: "Implementation",
startTime: new Date(2012, 6, 6),
startTime: new Date(2012, 11, 6),
duration: 30,
percentage: 80,
previousTaskId: "6",
Expand All @@ -113,7 +113,7 @@
var taskDetailImplement = new GanttTaskItem({
id: 9,
name: "Detail Implement",
startTime: new Date(2012, 6, 17),
startTime: new Date(2012, 11, 17),
duration: 120,
percentage: 50,
previousTaskId: "7",
Expand All @@ -122,7 +122,7 @@
var taskDeliver = new GanttTaskItem({
id: 10,
name: "Deliver",
startTime: new Date(2012, 6, 18),
startTime: new Date(2012, 11, 18),
duration: 100,
percentage: 30,
previousTaskId: "8",
Expand Down

0 comments on commit 9b15b3f

Please sign in to comment.