-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
203 lines (198 loc) · 8.26 KB
/
index.html
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
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
<meta charset="utf-8" />
<title>SharePoint Org Chart</title>
<!-- Third Party Style Sheets -->
<link rel="stylesheet" type="text/css" href="lib/foundation/css/foundation.css" />
<link rel="stylesheet" type="text/css" href="lib/orgchart/jquery.orgchart.css" />
<!-- Our Style Sheets -->
<link rel="stylesheet" href="css/style.css" />
<!-- Third Party JavaScript -->
<script src="lib/jquery.js"></script>
<script type="text/javascript" src="lib/underscore.js"></script>
<script type="text/javascript" src="lib/backbone.js"></script>
<script type="text/javascript" src="lib/foundation/js/foundation.min.js"></script>
<script type="text/javascript" src="lib/foundation/js/vendor/modernizr.js"></script>
<script type="text/javascript" src="lib/d3.js"></script>
</head>
<body>
<div class="nav contain-to-grid sticky">
<nav class="top-bar" data-topbar role="navigation">
<ul class="title-area">
<li class="name">
<h1><a href="#">Org Chart</a></h1>
</li>
<!-- Remove the class "menu-icon" to get rid of menu icon. Take out "Menu" to just have icon alone -->
<li class="toggle-topbar menu-icon"><a><span>Menu</span></a>
</li>
</ul>
<section class="top-bar-section">
<ul class="left">
<li class="active notification-container"><a class="notification"></a></li>
</ul>
<!-- Right Nav Section -->
<ul class="right">
<li class="has-dropdown">
<a>Departments</a>
<ul class="dropdown departments">
<li><a href="#">All</a></li>
</ul>
</li>
</ul>
</section>
</nav>
</div>
<div id="main"></div>
<!-- TEMPLATES -->
<script type="text/template" id="org-chart-template">
<div id="org-chart"></div>
<div class="reveal-modal" data-reveal aria-labelledby="modalTitle" aria-hidden="true" role="dialog">
<div class="content"></div>
<a class="close-reveal-modal" aria-label="Close">×</a>
</div>
</script>
<script type="text/template" id="item-template">
<div class='node' node-id="<%=id%>">
<h5><%=firstName%> <%=lastName%></h5>
<h5 class="subheader"><a href="#department/<%=encodeURIComponent(department)%>"><%=department%></a></h5>
<h6 class="subheader"><%=title%></h6>
<div class="context vcard">
<a class="add">Add</a>
<a class="edit">Edit</a>
<a class="swap">Swap</a>
<a class="<%=(parent == 0 ? 'disabled' : 'move')%>">Move</a>
<a class="<%=(children.length > 0 ? 'disabled' : 'delete')%>">Delete</a>
</div>
</div>
</script>
<script type="text/template" id="item-blank-template">
<div class='node' node-id="<%=id%>">
<h5>BLANK</h5>
<h5 class="subheader"><a href="#department/<%= encodeURIComponent(department)%>"><%=department%></a></h5>
<h6 class="subheader"><%=title%></h6>
<div class="context vcard">
<a class="link">Link</a>
<a class="new">New</a>
<a class="<%=(parent == 0 ? 'disabled' : 'move')%>">Move</a>
<a class="<%=(parent == 0 ? 'disabled' : 'delete')%>">Delete</a>
</div>
</div>
</script>
<script type="text/template" id="item-collection-template">
</script>
<script type="text/template" id="item-list-template">
<a>
<%=firstName%> <%=lastName%>
<% if(app.config.showTitle){%>
<br/><span class="label secondary radius"><%=title%></span>
<%}%>
</a>
<div class="context vcard">
<a class="add">Add</a>
<a class="edit">Edit</a>
<a class="swap">Swap</a>
<a class="<%=(parent == 0 ? 'disabled' : 'move')%>">Move</a>
<a class="delete">Delete</a>
</div>
</script>
<script type="text/template" id="details-item-template">
<form>
<div class="row">
<div class="large-12 columns">
<label>First Name
<input type="text" class="firstName" value="<%=firstName%>" <%=( app.config.editing ? '': 'disabled' ) %>/>
</label>
</div>
<div class="large-12 columns">
<label>Last Name
<input type="text" class="lastName" value="<%=lastName%>" <%=( app.config.editing ? '': 'disabled' ) %>/>
</label>
</div>
<div class="large-12 columns">
<label>Email
<input type="email" class="email" value="<%=email%>" <%=( app.config.editing ? '': 'disabled' ) %>/>
</label>
</div>
<div class="large-12 columns">
<label>Phone
<input type="tel" class="phone" value="<%=phone%>" <%=( app.config.editing ? '': 'disabled' ) %>/>
</label>
</div>
<div class="large-12 columns">
<label>Department
<input type="text" class="department" value="<%=department%>" <%=( app.config.editing ? '' : 'disabled' ) %>/>
</label>
</div>
<div class="large-12 columns">
<label>Title
<input type="text" class="title" value="<%=title%>" <%=( app.config.editing ? '': 'disabled' ) %>/>
</label>
</div>
</div>
<% if(app.config.editing){%>
<a class="button save">Save</a>
<a class="button close-reveal-modal">Cancel</a>
<%}%>
</form>
</script>
<script type="text/template" id="instructionsTemplate">
<div class="instructions">
<p>
<kbd>Left Click</kbd> node to edit
<br>
<kbd>Left Click</kbd> node <strong>Department</strong> to apply filter
<br>
<kbd>Right Click</kbd> node for context menu
<br>
<kbd>Esc</kbd> to cancel move
<br>
<kbd>Ctrl</kbd> +
<kbd>E</kbd> to toggle <strong>Edit</strong> mode
</p>
</div>
</script>
<script type="text/template" id="fetchingDataTemplate">
<div class="text-center library-message">
<p>Fetching data<span class="ellipsis"></span></p>
</div>
</script>
<script type="text/template" id="errorTemplate">
<div class="text-center library-message">
<h1>Error</h1>
<h1 class="subheader">Sorry, but the requested page does not exist :(</h1>
</div>
</script>
<script type="text/javascript" id="noItemsTemplate">
</script>
<!-- Models -->
<script src="js/models/item.js"></script>
<script src="js/models/library.js"></script>
<!-- Views -->
<script src="js/views/item.js"></script>
<script src="js/views/list-item.js"></script>
<script src="js/views/details.js"></script>
<script src="js/views/library.js"></script>
<script src="js/views/libraryD3.js"></script>
<script src="js/views/library-item.js"></script>
<script src="js/views/fetchingData.js"></script>
<script src="js/views/error.js"></script>
<script src="js/views/instructions.js"></script>
<script src="js/views/app.js"></script>
<!-- Application -->
<script src="js/data.js"></script>
<script src="js/data.test.js"></script>
<script src="js/utility.js"></script>
<script src="js/config.js"></script>
<script src="js/app.js"></script>
<!-- Router -->
<script src="js/routes/routes.js"></script>
<script>
$(document).foundation();
$('body').on('click', function(e) {
Backbone.pubSub.trigger('context');
});
</script>
</body>
</html>