-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex_alt.html
More file actions
215 lines (175 loc) · 7.15 KB
/
index_alt.html
File metadata and controls
215 lines (175 loc) · 7.15 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
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
204
205
206
207
208
209
210
211
212
213
214
215
<!DOCTYPE html>
<html>
<head>
<script src="answer_modules.js"></script>
<script src="data_sources.js"></script>
<script src="https://code.jquery.com/jquery-2.1.1.min.js"></script>
<link href="http://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.1/css/materialize.min.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.1/js/materialize.min.js"></script>
<title>openPDS</title>
</head>
<script>
$(document).ready(function () {
getAllAnswerModules();
getAllDataSources();
// the "href" attribute of .modal-trigger must specify the modal ID that wants to be triggered
$('.modal-trigger').leanModal({
in_duration: 100,
out_duration: 80,
dismissible: true
}
);
});
</script>
<script id="answerModulesList" type="text/template">
<ul class="collapsible">
{{#answerModules}}
<li>
<div class="collapsible-header">
<i class="material-icons circle">perm_identity</i>
<span class="title">{{name}}</span>
- <strong>Uses: </strong>
{{#requiredDataTypes}}
{{.}}
{{/requiredDataTypes}}
</div>
<div class="collapsible-body">
<p>
Description: {{description}}
<br/>
Dropbox folder: {{dropboxDirectory}}
<br/>
<br/>
<a href="#" class='waves-effect waves-light btn' onclick="runAnswerModule('{{name}}');">
<i class="material-icons left">play_arrow</i>
Run module
</a>
</p>
</div>
</li>
{{/answerModules}}
</ul>
</script>
<script id="answerModuleConsent" type="text/template">
<h4>{{name}} wants to access: </h4>
{{#requiredDataTypes}}
<p><strong>{{name}}</strong> - {{description}}</p>
{{/requiredDataTypes}}
</script>
<script id="dataSourcesList" type="text/template">
<ul class="collapsible">
{{#dataSources}}
<li>
<div class="collapsible-header">
<span class="title">{{name}}</span>
</div>
<div class="collapsible-body">
<p>
<strong>Data types: </strong>
{{#dataTypes}}
{{name}}
{{/dataTypes}}
<br/>
<strong>Description</strong>: {{description}}
<br/>
<strong>Dropbox folder</strong>: {{dropboxFileLocation}}
<br/>
<br/>
<a href="#" class="waves-effect waves-light btn" onclick="processRawDataSourceByName('{{name}}');">
Parse raw files
</a>
</p>
</div>
</li>
{{/dataSources}}
</ul>
</script>
<body>
<!--<nav class="red" role="navigation">-->
<!--<div class="nav-wrapper container">-->
<!--<a id="logo-container" href="#" class="brand-logo">openPDS</a>-->
<!--</div>-->
<!--</nav>-->
<ul class="tabs">
<li class="tab col s3 "><a href="#answerModules" class="active red-text"><strong>Answer modules</strong></a></li>
<li class="tab col s3"><a href="#dataSources" class="red-text"><strong>Data sources</strong></a></li>
</ul>
<div class="section no-pad-bot" id="index-banner">
<div id="dataSources" class="container">
<br><br>
<h3 class="header center red-text">Data sources</h3>
<div id="dataSourcesContainer">
</div>
<button data-target="addDataSourceModal" class="btn-large waves-effect waves-light red modal-trigger">Install
new...
</button>
<div id="addDataSourceModal" class="modal">
<div class="modal-content">
<h4>Add new data source</h4>
<form id="newDataSourceForm">
<h5>Install local source</h5>
<div class="file-field input-field">
<div class="btn">
<span>File</span>
<input id="testPath" type="file" nwfile>
</div>
<div class="file-path-wrapper">
<input class="file-path validate" type="text"
placeholder="Select data source config directory">
</div>
</div>
<div class="modal-footer">
<button type="submit" href="#!"
class="modal-action modal-close waves-effect waves-green btn-flat"
onclick="submitDataSourceForm()">Create
</button>
</div>
</form>
</div>
</div>
<br><br>
</div>
<div id="answerModules" class="container">
<br><br>
<h3 class="header center red-text">Answer modules</h3>
<div id="answerModulesContainer">
</div>
<button data-target="addAnswerModuleModal" class="btn-large waves-effect waves-light red modal-trigger">Install
new...
</button>
<div id="answerModuleConsentModal" class="modal">
<div id="answerModuleConsentContent" class="modal-content">
<h4>Answer module wants to: </h4>
<p>A bunch of text</p>
</div>
<div class="modal-footer">
<button type="button" href="answer_modules.html" class=" modal-action modal-close waves-effect waves-green btn-flat" onclick="$('.lean-overlay').remove();agreedCallback();">Agree</button>
<button type="button" href="#" class=" modal-action modal-close waves-effect waves-green btn-flat" onclick="$('.lean-overlay').remove();">Disagree</button>
</div>
</div>
<div id="addAnswerModuleModal" class="modal">
<div class="modal-content">
<h4>Add new answer module</h4>
<form id="newAnswerModuleForm">
<h5>Install local module</h5>
<div class="file-field input-field">
<div class="btn">
<span>File</span>
<input id="configPath" type="file" nwfile>
</div>
<div class="file-path-wrapper">
<input class="file-path validate" type="text" placeholder="Select data source config directory">
</div>
</div>
<div class="modal-footer">
<button type="button" href="#" class="modal-action modal-close waves-effect waves-green btn-flat modal-trigger" onclick="submitAnswerModuleForm();">Create</button>
</div>
</form>
</div>
</div>
<br><br>
</div>
</div>
</body>
</html>