* Merge from 18.x

This commit is contained in:
王怡栋
2024-04-17 10:44:18 +08:00
parent 72c54223de
commit 890c88b07b
18 changed files with 107 additions and 59 deletions
+34 -1
View File
@@ -86,6 +86,7 @@ form {display: block; margin-top: 0em; margin-block-end: 1em;}
#mainContent > .pull-right > .button-group .text{margin-left: 0px;}
.pull-right .icon-plus.icon-sm:before{vertical-align: 4%;}
#ganttView .gantt_resizer{min-width: unset !important;}
div.delayed {background: #FFEBEB; color: #FB2B2B;}
</style>
<?php js::set('customUrl', $this->createLink('programplan', 'ajaxCustom'));?>
<?php js::set('dateDetails', $dateDetails);?>
@@ -627,9 +628,41 @@ $(function()
if(showFields.indexOf('realBegan') != -1) gantt.config.columns.push({name: 'realBegan', align: 'center', resize: true, width: 80});
if(showFields.indexOf('realEnd') != -1) gantt.config.columns.push({name: 'realEnd', align: 'center', resize: true, width: 80});
if(showFields.indexOf('consumed') != -1) gantt.config.columns.push({name: 'consumed', align: 'center', resize: true, width: 60});
if(showFields.indexOf('delay') != -1) gantt.config.columns.push({name: 'delay', align: 'center', resize: true, width: 60});
if(showFields.indexOf('delay') != -1)
{
gantt.config.columns.push({name: 'delay', align: 'center', resize: true, width: 60, template:function(item)
{
if(item.delayDays > 0) return "<div class='delayed'>" + item.delay + "</div>";
return item.delay;
}});
}
if(showFields.indexOf('delayDays') != -1) gantt.config.columns.push({name: 'delayDays', align: 'center', resize: false, width: 60});
gantt.config.layout =
{
css: "gantt_container",
cols:
[
{
width:600,
rows:
[
{view: "grid", scrollX: "gridScroll", scrollable: true, scrollY: "scrollVer"},
{view: "scrollbar", id: "gridScroll", group:"horizontal"}
]
},
{resizer: true, width: 1},
{
rows:
[
{view: "timeline", scrollX: "scrollHor", scrollY: "scrollVer"},
{view: "scrollbar", id: "scrollHor", group:"horizontal"}
]
},
{view: "scrollbar", id: "scrollVer"}
]
};
function getDeadlineBtn(task)
{
var date = task.deadline;