-
Notifications
You must be signed in to change notification settings - Fork 3
/
index.html
executable file
·256 lines (204 loc) · 10.3 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
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Survey Editor</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap-theme.min.css">
<script src="https://code.jquery.com/jquery-2.1.1.min.js"></script>
<script src="https://code.jquery.com/ui/1.11.2/jquery-ui.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/js/bootstrap.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mustache.js/0.8.1/mustache.min.js"></script>
<script src="js/validator.min.js"></script>
<!-- Switch widget -->
<script type="text/javascript" src="js/bootstrap-switch.min.js"></script>
<link rel="stylesheet" href="css/bootstrap-switch.min.css">
<!--
<script src="https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.7.0/underscore-min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/backbone.js/1.1.2/backbone-min.js"></script>
-->
<!-- ohmage client -->
<script src="js/ohmage.js"></script>
<script src="js/jquery-cookie.js"></script>
<link href="css/jasny-bootstrap.min.css" rel="stylesheet">
<script src="js/beautify.js"></script>
<script src="js/bootbox.min.js"></script>
<!-- tagit plugin -->
<!-- <link href="css/jquery.tagit.css" rel="stylesheet"> -->
<script src="js/tag-it.min.js"></script>
<!-- Validator -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jquery.bootstrapvalidator/0.5.3/css/bootstrapValidator.min.css"/>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery.bootstrapvalidator/0.5.3/js/bootstrapValidator.min.js"></script>
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.4/styles/vs.min.css">
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.4/highlight.min.js"></script>
<!-- Custom styles for this template -->
<link href="css/app.css" rel="stylesheet">
<script src="js/templates.js"></script>
<script src="js/app.js"></script>
</head>
<body>
<div class="container">
<div class="row">
<div class="col-md-12 page-header">
<h1>Campaign Editor</h1>
</div>
<div class="col-md-5 col-lg-4">
<div class="affixwrap" data-offset-top="565"> <!-- data-spy="affix" -->
<div class="panel panel-default">
<div class="panel-heading"><h3 class="panel-title">Campaign Info</h3></div>
<form data-toggle="validator" class="panel-body campaign_form" role="form">
<div class="disabled form-group">
<label class="control-label">Campaign Name</label>
<input type="text" class="form-control campaign_info_field" id="campaign_name_field" placeholder="My Campaign" disabled="disabled" required>
</div>
<div class="form-group">
<label class="control-label">Class</label>
<select class="form-control campaign_info_field" id="class_urn_field" placeholder="Select a class" disabled="disabled" required>
<option></option>
</select>
</div>
<div class="form-group">
<label class="control-label">Description</label>
<textarea class="form-control campaign_info_field" id="campaign_description" placeholder="What your campaign is about..."></textarea>
</div>
<div class="row">
<div class="form-group col-xs-6" data-toggle="tooltip" data-placement="top" title="Users can only submit data to 'running' campaigns.">
<label class="control-label">Campaign Status</label>
<br />
<input id="campaign_running" type="checkbox">
</div>
</div>
<div class="row">
<div class="form-group col-xs-6" data-toggle="tooltip" data-placement="top" title="If allowed, users can see other users' shared data.">
<label class="control-label">Data Sharing</label>
<br />
<input id="campaign_privacy" type="checkbox" checked>
</div>
<div class="form-group col-xs-6 nomobilize" data-toggle="tooltip" data-placement="top" title="Allow for survey responses to be edited.">
<label class="control-label">Editable Responses</label>
<br />
<input id="campaign_editable" type="checkbox">
</div>
</div>
<button type="button" id="new_survey_button" class="btn btn-sm btn-primary pull-right">
<span class="glyphicon glyphicon-plus"></span> Add Survey
</button>
</form>
</div>
<div class="panel-group" id="surveygroup" role="tablist"> </div>
</div>
<!-- <button id="trash-can" class="btn pull-right">Trash can</ul> -->
</div>
<div class="col-md-7 col-lg-8 right-col">
<div class="btn-toolbar" role="toolbar">
<div class="btn-group" role="group" >
<div class="fileinput fileinput-new" data-provides="fileinput">
<span class="btn btn-sm btn-default btn-file">
<span class="fileinput-new"><span class="glyphicon glyphicon-folder-open"></span> Import XML</span>
<input type="file" id="upload_xml_button" name="campaign XML">
</span>
</div>
</div>
<div class="btn-group" role="group" >
<a target="_blank" href="#" type="button" id="download_xml_button" download="campaign.xml" class="btn btn-sm btn-default">
<span class="glyphicon glyphicon-save"></span> Save XML to File
</a>
</div>
<div class="btn-group pull-right" role="group" >
<a target="_blank" href="#" type="button" id="create_campaign_button" class="hide btn btn-primary pull-right btn-sm">
<span class="glyphicon glyphicon-upload"></span> Submit Campaign
</a>
</div>
<div class="btn-group pull-right" role="group" >
<a target="_blank" href="#" type="button" id="update_campaign_button" class="hide btn btn-primary pull-right btn-sm">
<span class="glyphicon glyphicon-upload"></span> Update Campaign
</a>
</div>
</div>
<div class="form-group">
<div class="input-group">
<div class="input-group-addon"><b>ID</b></div>
<input type="text" class="form-control" id="campaign_urn_field" placeholder="A unique ID" disabled>
</div>
</div>
<div class="checkbox syntax_highlight_button_checkbox">
<label><input type="checkbox" id="syntax_highlight_button"> <b><i>Color XML</i></b></label>
</div>
<pre><code></code></pre>
</div>
</div>
</div>
<!-- templating stuff -->
<div id="prompttemplate" class="hidden">
<div class="prompt_field_list">
<form role="form" class="prompt_form"></form>
</div>
</div>
<div id="surveytemplate" class="hidden">
<div class="survey_content panel panel-default">
<div class="panel-heading" role="tab">
<h4 class="panel-title">
<a class="accordion-toggle collapsed" data-toggle="collapse" data-parent="#surveygroup">Survey: ___ </a>
<span class="remove_survey_button pull-right glyphicon glyphicon-remove"></span>
</h4>
</div>
<div class="panel-collapse collapse">
<div class="panel-body">
<form class="survey_form" role="form">
<div class="form-group">
<label class="control-label">Title</label>
<input type="text" class="form-control survey_title_field" placeholder="My Survey" required>
</div>
<div class="form-group">
<label class="control-label">ID</label>
<input type="text" class="form-control survey_id_field" placeholder="Unique ID" required>
</div>
<div class="form-group">
<label class="control-label">Description</label>
<textarea rows="2" class="form-control survey_description_field" placeholder="What your survey is about..." required></textarea>
</div>
<div class="form-group">
<label class="control-label">Submission Message</label>
<input type="text" class="form-control survey_submit_field" placeholder="Thank you for participating." required>
</div>
<div class="checkbox hide">
<label class="control-label">
<input type="checkbox" class="survey_anytime_field" checked> Any time
</label>
</div>
<div class="form-group">
<label>Prompts</label>
<div class="survey_prompt_list list-group">
<!--<a class="list-group-item">Welcome<span class="badge">message</span></a>-->
</div>
</div>
<div class="btn-group pull-right">
<button type="button" class="btn btn-sm btn-primary dropdown-toggle" data-toggle="dropdown">
<span class="glyphicon glyphicon-plus"></span> Add Prompt <span class="caret"></span>
</button>
<ul class="dropdown-menu" role="menu">
<li><a data-type="number" href="#"><span class="glyphicon glyphicon-sound-5-1"></span> Number</a></li>
<li><a data-type="text" href="#"><span class="glyphicon glyphicon-text-size"></span> Text</a></li>
<li><a data-type="photo" href="#"><span class="glyphicon glyphicon-picture"></span> Photo</a></li>
<li><a data-type="timestamp" href="#"><span class="glyphicon glyphicon-time"></span> Time</a></li>
<li><a data-type="single_choice" href="#"><span class="glyphicon glyphicon-menu-hamburger"></span> Single-choice</a></li>
<li hidden><a data-type="multi_choice" href="#"><span class="glyphicon glyphicon-th"></span> Multi-choice</a></li>
<li class="divider"></li>
<li hidden><a class="nomobilize" data-type="audio" href="#"><span class="glyphicon glyphicon-music"></span> Audio</a></li>
<li hidden><a class="nomobilize" data-type="video" href="#"><span class="glyphicon glyphicon-facetime-video"></span> Video</a></li>
<li hidden><a class="nomobilize" data-type="file" href="#"><span class="glyphicon glyphicon-file"></span> File</a></li>
<li hidden><a class="nomobilize" data-type="single_choice_custom" href="#"><span class="glyphicon glyphicon-menu-hamburger"></span> Single-choice (custom)</a></li>
<li hidden><a class="nomobilize" data-type="multi_choice_custom" href="#"><span class="glyphicon glyphicon-th"></span> Multi-choice (custom)</a></li>
<li class="divider nomobilize"></li>
<li><a data-type="message" href="#"><span class="glyphicon glyphicon-info-sign"></span> Message</a></li>
</ul>
</div>
</form>
</div>
</div>
</div>
</div>
</body>
</html>