Repository navigation
Expand file tree
/
Copy pathCaseInactiveItems.html
More file actions
165 lines (147 loc) · 7.72 KB
/
Copy pathCaseInactiveItems.html
File metadata and controls
165 lines (147 loc) · 7.72 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>Incative items usage in layout</title>
<script type="text/javascript" src="../../primitives.js"></script>
<link href="../../css/primitives.css" media="screen" rel="stylesheet" type="text/css" />
<script type='text/javascript'>
var control;
document.addEventListener('DOMContentLoaded', function () {
var options = new primitives.OrgConfig();
var items = [
new primitives.OrgItemConfig({
id: 0,
parent: null,
title: "James Smith",
description: "VP, Public Sector",
image: "../images/photos/a.png"
}),
new primitives.OrgItemConfig({ id: 1, parent: 0, hasSelectorCheckbox: false, templateName: "DepartmentTitleTemplate", title: "Finance", itemTitleColor: "Green" }),
new primitives.OrgItemConfig({
id: 2,
parent: 1,
title: "Ted Lucas",
description: "VP, Human Resources",
image: "../images/photos/b.png"
}),
new primitives.OrgItemConfig({ id: 3, parent: 0, hasSelectorCheckbox: false, templateName: "DepartmentTitleTemplate", title: "Sales", itemTitleColor: "Navy" }),
new primitives.OrgItemConfig({
id: 4,
parent: 3,
title: "Fritz Stuger",
description: "VP, Human Resources",
image: "../images/photos/b.png"
}),
new primitives.OrgItemConfig({ id: 5, parent: 0, hasSelectorCheckbox: false, templateName: "DepartmentTitleTemplate", title: "Operations", itemTitleColor: "Magenta" }),
new primitives.OrgItemConfig({
id: 6,
parent: 5,
title: "Brad Whitt",
description: "VP, Human Resources",
image: "../images/photos/b.png"
}),
new primitives.OrgItemConfig({ id: 7, parent: 0, hasSelectorCheckbox: false, templateName: "DepartmentTitleTemplate", title: "IT", itemTitleColor: "Orange" }),
new primitives.OrgItemConfig({
id: 8,
parent: 7,
title: "Ted Whitt",
description: "VP, Human Resources",
image: "../images/photos/b.png"
}),
new primitives.OrgItemConfig({
id: 18,
parent: 7,
title: "Ted Whitt 2",
description: "VP, Human Resources",
image: "../images/photos/b.png"
}),
{ id: 19, parent: 2, isVisible: true, description: "VP, Security Technology Unit (STU)", email: "[email protected]", groupTitleColor: "#4169e1", image: "../images/photos/y.png", itemTitleColor: "#4b0082", phone: "308-532-6548", title: "Robert Morgan" },
{ id: 20, parent: 2, isVisible: true, description: "GM, Software Serviceability", email: "[email protected]", groupTitleColor: "#4169e1", image: "../images/photos/a.png", itemTitleColor: "#4b0082", phone: "765-723-1327", title: "Ida Benefield" },
{ id: 21, parent: 4, isVisible: true, description: "GM, Core Operating System Test", email: "[email protected]", groupTitleColor: "#4169e1", image: "../images/photos/d.png", itemTitleColor: "#4b0082", phone: "303-333-9215", title: "Vada Duhon" },
{ id: 22, parent: 4, isVisible: true, description: "GM, Global Platform Technologies and Services", email: "[email protected]", groupTitleColor: "#4169e1", image: "../images/photos/f.png", itemTitleColor: "#4b0082", phone: "585-309-6253", title: "William Loyd" },
{ id: 23, parent: 6, isVisible: true, description: "Sr. VP, NAME & Personal Services Division", email: "[email protected]", groupTitleColor: "#4169e1", image: "../images/photos/g.png", itemTitleColor: "#4b0082", phone: "915-355-4705", title: "Craig Blue" },
{ id: 24, parent: 6, isVisible: true, description: "VP, NAME Communications Services and Member Platform", email: "[email protected]", groupTitleColor: "#4169e1", image: "../images/photos/h.png", itemTitleColor: "#4b0082", phone: "650-623-3302", title: "Joel Crawford" },
{ id: 25, parent: 8, isVisible: true, description: "VP & CFO, NAME", email: "[email protected]", groupTitleColor: "#4169e1", image: "../images/photos/o.png", itemTitleColor: "#4b0082", phone: "618-822-7345", title: "Barbara Lang" },
{ id: 26, parent: 8, isVisible: true, description: "VP, NAME Operations", email: "[email protected]", groupTitleColor: "#4169e1", image: "../images/photos/d.png", itemTitleColor: "#4b0082", phone: "641-678-7646", title: "Barbara Faulk" },
{ id: 27, parent: 18, isVisible: true, description: "VP, NAME Global Sales & Marketing", email: "[email protected]", groupTitleColor: "#4169e1", image: "../images/photos/z.png", itemTitleColor: "#4b0082", phone: "803-746-8733", title: "Stewart Williams" },
{ id: 28, parent: 18, isVisible: true, description: "Sr. VP, NAME Information Services & Merchant Platform", email: "[email protected]", groupTitleColor: "#4169e1", image: "../images/photos/y.png", itemTitleColor: "#4b0082", phone: "425-590-4308", title: "Robert Lemieux" }
];
options.items = items;
options.cursorItem = 0;
options.templates = [getDepartmentTitleTemplate()];
options.onItemRender = onTemplateRender;
options.hasSelectorCheckbox = primitives.Enabled.True;
options.normalLevelShift = 20;
options.dotLevelShift = 20;
options.lineLevelShift = 10;
options.normalItemsInterval = 10;
options.dotItemsInterval = 10;
options.lineItemsInterval = 4;
control = primitives.OrgDiagram(document.getElementById("basicdiagram"), options);
});
function onTemplateRender(event, data) {
switch (data.renderingMode) {
case primitives.RenderingMode.Create:
/* Initialize template content here */
break;
case primitives.RenderingMode.Update:
/* Update template content here */
break;
}
var itemConfig = data.context;
var element = data.element;
if (data.templateName == "DepartmentTitleTemplate") {
element.firstChild.style.backgroundColor = itemConfig.itemTitleColor || primitives.Colors.RoyalBlue;
element.firstChild.firstChild.textContent = itemConfig.title;
}
}
function getDepartmentTitleTemplate() {
var result = new primitives.TemplateConfig();
result.name = "DepartmentTitleTemplate";
result.isActive = false;
result.itemSize = new primitives.Size(200, 30);
result.minimizedItemSize = new primitives.Size(3, 3);
/* the following example demonstrates JSONML template see http://http://www.jsonml.org/ for details: */
result.itemTemplate = ["div",
{
"style": {
width: result.itemSize.width + "px",
height: result.itemSize.height + "px"
},
"class": ["bp-item", "bp-corner-all", "bt-item-frame"]
},
["div",
{
"name": "titleBackground",
"style": {
top: "2px",
left: "2px",
width: "196px",
height: "25px"
},
"class": ["bp-item", "bp-corner-all", "bt-title-frame"]
},
["div",
{
name: "title",
"class": ["bp-item", "bp-title"],
style: {
top: "3px",
left: "6px",
width: "188px",
height: "23px",
textAlign: "center"
}
}
]
]
];
return result;
}
</script>
</head>
<body>
<div id="basicdiagram" style="width: 640px; height: 480px; border-style: dotted; border-width: 1px;"></div>
</body>
</html>