Author: nathangray
New Revision: 49026
URL: http://svn.stylite.de/viewvc/egroupware?rev=49026&view=rev
Log:
Show planned times on gantt chart while editing real times
Modified:
trunk/etemplate/js/et2_widget_gantt.js
trunk/etemplate/templates/default/etemplate2.css
trunk/projectmanager/inc/class.projectmanager_gantt.inc.php
Modified: trunk/etemplate/js/et2_widget_gantt.js
URL: http://svn.stylite.de/viewvc/egroupware/trunk/etemplate/js/et2_widget_gantt.js?rev=49026&r1=49025&r2=49026&view=diff
— trunk/etemplate/js/et2_widget_gantt.js (original)
+++ trunk/etemplate/js/et2_widget_gantt.js Thu Oct 16 00:22:49 2014
@@ -1011,6 +1011,31 @@
}
};
- gantt.templates.leftside_text = function(start, end, task) {
-
var text = ''; -
if(task.planned_start) -
{ -
if(typeof task.planned_start == 'string') task.planned_start = new Date(task.planned_start); -
var p_start = gantt.posFromDate(task.planned_start) - gantt.posFromDate(start); -
text = "<div class='gantt_task_line gantt_task_planned' style='width:"+Math.abs(p_start)+"px; right:"+(p_start > 0 ? -p_start : 0)+"px; height:100%'><span>" -
+ gantt.date.date_to_str(gantt.config.api_date)(task.planned_start) -
+ "</span></div>"; -
} -
return text; - };
- gantt.templates.rightside_text = function(start, end, task) {
-
var text = ''; -
if(task.planned_end) -
{ -
if(typeof task.planned_end == 'string') task.planned_end = new Date(task.planned_end); -
var p_end = gantt.posFromDate(task.planned_end) - gantt.posFromDate(end); -
text = "<div class='gantt_task_line gantt_task_planned' style='left:"+p_end +"px; height:100%'><span>" -
+ gantt.date.date_to_str(gantt.config.api_date)(task.planned_end) -
+ "</span></div>"; -
} -
return text; - };
- // Link styling
gantt.templates.link_class = function(link) {
var link_class = ‘’;
Modified: trunk/etemplate/templates/default/etemplate2.css
URL: http://svn.stylite.de/viewvc/egroupware/trunk/etemplate/templates/default/etemplate2.css?rev=49026&r1=49025&r2=49026&view=diff
— trunk/etemplate/templates/default/etemplate2.css (original)
+++ trunk/etemplate/templates/default/etemplate2.css Thu Oct 16 00:22:49 2014
@@ -1510,7 +1510,10 @@
{
background-size: 18px;
}
+.et2_gantt .gantt_side_content
+{
- overflow: visible;
+}
.et2_gantt .gantt_task_progress
{
text-align: left;
@@ -1543,6 +1546,36 @@
.et2_gantt .gantt_task_link.invalid_constraint .gantt_link_arrow_right
{
border-left-color: red;
+}
+.et2_gantt .gantt_task_planned
+{ - margin-top: 7px;
- position: absolute;
- opacity: 0.3;
- border-style: outset;
- border-width: 2px;
- border-top: none;
- border-bottom: none;
- width: 2px;
+}
+.et2_gantt .gantt_task_planned:hover span { - display:inline;
+}
+.et2_gantt .gantt_task_planned span
+{ - z-index: 10;
- display: none;
- background: white;
- position: relative;
- top: 2em;
+}
+.et2_gantt .gantt_left .gantt_task_planned
+{ - border-right: none;
+}
+.et2_gantt .gantt_right .gantt_task_planned
+{ - border-left: none;
}
/**
Modified: trunk/projectmanager/inc/class.projectmanager_gantt.inc.php
URL: http://svn.stylite.de/viewvc/egroupware/trunk/projectmanager/inc/class.projectmanager_gantt.inc.php?rev=49026&r1=49025&r2=49026&view=diff
— trunk/projectmanager/inc/class.projectmanager_gantt.inc.php (original)
+++ trunk/projectmanager/inc/class.projectmanager_gantt.inc.php Thu Oct 16 00:22:49 2014
@@ -246,6 +246,15 @@
{
$project[‘duration’] = $params[‘planned_times’] ? $this->project->data[‘pm_planned_time’] : 1;
}
-
// Add in planned start & end, if different -
if($project['pm_planned_start'] && $project['pm_planned_start'] != egw_time::to($project['start_date'],egw_time::DATABASE)) -
{ -
$project['planned_start'] = egw_time::to((int)$project['pm_planned_start'], egw_time::DATABASE); -
} -
if($project['pm_planned_end'] && $project['pm_planned_start'] != egw_time::to($project['start_date'],egw_time::DATABASE)) -
{ -
$project['planned_end'] = egw_time::to((int)$project['pm_planned_end'], egw_time::DATABASE); -
} // Not sure how it happens, but it causes problems if($project['start'] && $project['start'] < 10) $project['start'] = 0;
@@ -389,11 +398,21 @@
$pe[‘text’] = $this->prefs[‘gantt_element_title_length’] ? substr($pe[‘pe_title’], 0, $this->prefs[‘gantt_element_title_length’]) : $pe[‘pe_title’];
$pe[‘parent’] = ‘projectmanager::’.$pm_id;
$pe[‘start_date’] = egw_time::to((int)$pe[‘pe_start’],egw_time::DATABASE);
-
if($pe['pe_planned_start'] && $pe['pe_planned_start'] != $pe['pe_start']) -
{ -
$pe['start_date'] = egw_time::to($pe['pe_real_start'], egw_time::DATABASE); -
$pe['planned_start'] = egw_time::to((int)$pe['pe_planned_start'], egw_time::DATABASE); -
} $pe['duration'] = self::get_duration($data,(float)($params['planned_times'] ? $pe['pe_planned_time'] : $pe['pe_used_time'])); if($pe['pe_end']) { // Make sure we don't kill the gantt chart with too large a time span - limit to 10 years $pe['end_date'] = egw_time::to(min($pe['pe_end'],strtotime('+10 years',$pe['pe_start'])),egw_time::DATABASE ); -
} -
if($pe['pe_planned_end'] && $pe['pe_planned_end'] != $pe['pe_end']) -
{ -
$pe['end_date'] = egw_time::to($pe['pe_real_end'], egw_time::DATABASE); -
$pe['planned_end'] = egw_time::to((int)$pe['pe_planned_end'], egw_time::DATABASE); } $pe['progress'] = ((int)substr($this->project->data['pe_completion'],0,-1))/100; $pe['edit'] = $this->check_acl(EGW_ACL_EDIT, $pe);
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://p.sf.net/sfu/Zoho
eGroupWare-cvs mailing list
eGroupWare-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/egroupware-cvs