94 строки
3.8 KiB
HTML
94 строки
3.8 KiB
HTML
<!DOCTYPE html>
|
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
<head>
|
|
<title>Essential Studio for JavaScript : Project Tracker</title>
|
|
<meta charset="utf-8" />
|
|
<meta content="width=device-width, initial-scale=1.0" name="viewport"/>
|
|
<link href="../content/bootstrap.min.css" rel="stylesheet" />
|
|
<link href="../content/ejthemes/default-theme/ej.web.all.min.css" rel="stylesheet" />
|
|
<link href="../content/default.css" rel="stylesheet" />
|
|
<link href="../content/default-responsive.css" rel="stylesheet" />
|
|
<link href="../content/ejthemes/responsive-css/ej.responsive.css" rel="stylesheet" />
|
|
<!--[if lt IE 9]>
|
|
<script type="text/javascript" src="../scripts/jquery-1.11.3.min.js" ></script>
|
|
<![endif]-->
|
|
<!--[if gte IE 9]><!-->
|
|
<script src="../scripts/jquery-3.4.1.min.js" type="text/javascript"> </script>
|
|
<!--<![endif]-->
|
|
<script src="../scripts/jsrender.min.js"></script>
|
|
<script src="../scripts/ej.web.all.min.js" type="text/javascript"></script>
|
|
<script src="../scripts/properties.js" type="text/javascript"></script>
|
|
<script src="../scripts/jsonganttdata.js"></script>
|
|
</head>
|
|
<body>
|
|
|
|
<div class="content-container-fluid">
|
|
<div class="row">
|
|
<div class="cols-sample-area">
|
|
<div id="gantt" style="height:450px;width:100%;" />
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<script type="text/x-jsrender" id="columnTemplate">
|
|
{{if #data['resourceNames']}}
|
|
<div style="display:inline-block;position:relative;left:10px;top:1px">
|
|
<img src="../content/images/gantt/{{:#data['resourceNames']}}.png" height="40px" />
|
|
</div>
|
|
<div style='display:inline-block;width:100%;position:relative;left:10px;top:2px'>{{:#data['resourceNames']}}</div>
|
|
{{/if}}
|
|
</script>
|
|
<script type="text/javascript">
|
|
|
|
$(function () {
|
|
|
|
$("#gantt").ejGantt({
|
|
dataSource: columnTemplateData,
|
|
allowColumnResize: true,
|
|
allowSorting: true,
|
|
allowSelection: true,
|
|
isResponsive:true,
|
|
enableContextMenu:true,
|
|
taskIdMapping: "taskID",
|
|
taskNameMapping: "taskName",
|
|
startDateMapping: "startDate",
|
|
progressMapping: "progress",
|
|
durationMapping: "duration",
|
|
endDateMapping: "endDate",
|
|
childMapping: "subtasks",
|
|
enableVirtualization: false,
|
|
highlightWeekEnds: true,
|
|
includeWeekend: false,
|
|
taskbarHeight:40,
|
|
scheduleStartDate: new Date("02/01/2017"),
|
|
scheduleEndDate: new Date("03/016/2017"),
|
|
//Resources mapping
|
|
resourceInfoMapping: "resourceId",
|
|
resourceNameMapping: "resourceName",
|
|
resourceIdMapping: "resourceId",
|
|
resources: columnTemplateResource,
|
|
predecessorMapping: "predecessor",
|
|
showResourceNames:true,
|
|
showGridCellTooltip: false,
|
|
treeColumnIndex: 1,
|
|
splitterPosition: "50%",
|
|
rowHeight: 50,
|
|
allowGanttChartEditing: false,
|
|
load: load
|
|
});
|
|
});
|
|
function load(args)
|
|
{
|
|
var gantt = $("#gantt").ejGantt("instance");
|
|
var columns = gantt.getColumns();
|
|
columns[2].visible = columns[3].visible = false;
|
|
columns[4].isTemplateColumn = true;
|
|
columns[4].templateID = "columnTemplate";
|
|
columns[4].width = window.theme == "material" ? 220 : 172;
|
|
this.getColumns()[0].width = window.theme == "material" ? 60 : 30;
|
|
}
|
|
|
|
</script>
|
|
|
|
</body>
|
|
</html>
|