This commit is contained in:
Faris Ansari 2018-09-23 19:47:43 +05:30
parent 8447e15225
commit 9e3c490196
3 changed files with 25 additions and 6 deletions

27
dist/frappe-gantt.js vendored
View File

@ -1016,7 +1016,14 @@ class Gantt {
header_height: 50, header_height: 50,
column_width: 30, column_width: 30,
step: 24, step: 24,
view_modes: ['Quarter Day', 'Half Day', 'Day', 'Week', 'Month', 'Year'], view_modes: [
'Quarter Day',
'Half Day',
'Day',
'Week',
'Month',
'Year'
],
bar_height: 20, bar_height: 20,
bar_corner_radius: 3, bar_corner_radius: 3,
arrow_curve: 5, arrow_curve: 5,
@ -1192,7 +1199,11 @@ class Gantt {
} else if (this.view_is('Month')) { } else if (this.view_is('Month')) {
cur_date = date_utils.add(cur_date, 1, 'month'); cur_date = date_utils.add(cur_date, 1, 'month');
} else { } else {
cur_date = date_utils.add(cur_date, this.options.step, 'hour'); cur_date = date_utils.add(
cur_date,
this.options.step,
'hour'
);
} }
} }
this.dates.push(cur_date); this.dates.push(cur_date);
@ -1418,8 +1429,16 @@ class Gantt {
last_date = date_utils.add(date, 1, 'year'); last_date = date_utils.add(date, 1, 'year');
} }
const date_text = { const date_text = {
'Quarter Day_lower': date_utils.format(date, 'HH', this.options.language), 'Quarter Day_lower': date_utils.format(
'Half Day_lower': date_utils.format(date, 'HH', this.options.language), date,
'HH',
this.options.language
),
'Half Day_lower': date_utils.format(
date,
'HH',
this.options.language
),
Day_lower: Day_lower:
date.getDate() !== last_date.getDate() date.getDate() !== last_date.getDate()
? date_utils.format(date, 'D', this.options.language) ? date_utils.format(date, 'D', this.options.language)

File diff suppressed because one or more lines are too long

View File

@ -1,6 +1,6 @@
{ {
"name": "frappe-gantt", "name": "frappe-gantt",
"version": "0.2.0", "version": "0.3.0",
"description": "A simple, modern, interactive gantt library for the web", "description": "A simple, modern, interactive gantt library for the web",
"main": "src/index.js", "main": "src/index.js",
"scripts": { "scripts": {