From 24b577921080efb63e4063677b381210df782d53 Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Fri, 17 Oct 2014 17:17:23 +0000 Subject: [PATCH] Better styling for planned times so early tasks can be seen too. --- etemplate/js/et2_widget_gantt.js | 9 +++++---- etemplate/templates/default/etemplate2.css | 3 ++- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/etemplate/js/et2_widget_gantt.js b/etemplate/js/et2_widget_gantt.js index dcb51a7701..db6b6342d7 100644 --- a/etemplate/js/et2_widget_gantt.js +++ b/etemplate/js/et2_widget_gantt.js @@ -73,6 +73,7 @@ var et2_gantt = et2_valueWidget.extend([et2_IResizeable,et2_IInput], show_progress: true, order_branch: true, min_column_width: 30, + task_height: 25, fit_tasks: true, autosize: '', // Date rounding happens either way, but this way it rounds to the displayed grid resolution @@ -1015,9 +1016,9 @@ $j(function() { var text = ''; if(task.planned_start) { - if(typeof task.planned_start == 'string') task.planned_start = new Date(task.planned_start); + if(typeof task.planned_start == 'string') task.planned_start = gantt.date.parseDate(task.planned_start, "xml_date"); var p_start = gantt.posFromDate(task.planned_start) - gantt.posFromDate(start); - text = "
" + text = "
" + gantt.date.date_to_str(gantt.config.api_date)(task.planned_start) + "
"; } @@ -1027,9 +1028,9 @@ $j(function() { var text = ''; if(task.planned_end) { - if(typeof task.planned_end == 'string') task.planned_end = new Date(task.planned_end); + if(typeof task.planned_end == 'string') task.planned_end = gantt.date.parseDate(task.planned_end, "xml_date"); var p_end = gantt.posFromDate(task.planned_end) - gantt.posFromDate(end); - text = "
" + text = "
" + gantt.date.date_to_str(gantt.config.api_date)(task.planned_end) + "
"; } diff --git a/etemplate/templates/default/etemplate2.css b/etemplate/templates/default/etemplate2.css index ef4b35a1fb..3d7225eee8 100644 --- a/etemplate/templates/default/etemplate2.css +++ b/etemplate/templates/default/etemplate2.css @@ -1549,7 +1549,7 @@ div.ui-toolbar-menulist{ } .et2_gantt .gantt_task_planned { - margin-top: 7px; + height: 10px; position: absolute; opacity: 0.3; border-style: outset; @@ -1576,6 +1576,7 @@ div.ui-toolbar-menulist{ .et2_gantt .gantt_right .gantt_task_planned { border-left: none; + top: 25px; } /**