forked from marklogic-community/bitemp-explorer
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathview.html
More file actions
393 lines (349 loc) · 12.8 KB
/
view.html
File metadata and controls
393 lines (349 loc) · 12.8 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
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
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Bitemporal Demo</title>
<link href="http://code.jquery.com/ui/1.10.4/themes/ui-lightness/jquery-ui.css" rel="stylesheet">
<link href='http://fonts.googleapis.com/css?family=Muli' rel='stylesheet' type='text/css'>
<link rel="shortcut icon" href="http://owwgdpc6ll4w6eh4717xd1x4.wpengine.netdna-cdn.com/wp-content/mu-plugins/images/favicon.ico?cache=2">
<style>
body {
background: #CCE9F1;
background-image: url("http://www.marklogic.com/wp-content/uploads/2015/05/on-demand-token.svg");
background-size: 100px 100px;
background-position: right top;
background-repeat: no-repeat;
font-family: 'Muli', sans-ser
if;
font-size: 12px;
}
h1 {
text-align: center;
font-style: italic;
font-size: 23px;
font-family: 'Muli', sans-serif;
}
#instructions {
position: absolute;
left: 850px;
top: 275px;
font-size: 15px;
width: 24em;
word-wrap: normal;
font-family: 'Muli', sans-serif;
}
input[type=button], button {
-moz-box-shadow:inset 0px 1px 0px 0px #54a3f7;
-webkit-box-shadow:inset 0px 1px 0px 0px #54a3f7;
box-shadow:inset 0px 1px 0px 0px #54a3f7;
background:-webkit-gradient(linear, left top, left bottom, color-stop(0.05, #007dc1), color-stop(1, #0061a7));
background:-moz-linear-gradient(top, #007dc1 5%, #0061a7 100%);
background:-webkit-linear-gradient(top, #007dc1 5%, #0061a7 100%);
background:-o-linear-gradient(top, #007dc1 5%, #0061a7 100%);
background:-ms-linear-gradient(top, #007dc1 5%, #0061a7 100%);
background:linear-gradient(to bottom, #007dc1 5%, #0061a7 100%);
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#007dc1', endColorstr='#0061a7',GradientType=0);
background-color:#007dc1;
-moz-border-radius:3px;
-webkit-border-radius:3px;
border-radius:3px;
border:1px solid #124d77;
display:inline-block;
cursor:pointer;
color:#ffffff;
font-family:Arial;
font-size:13px;
text-decoration:none;
text-shadow:0px 1px 0px #154682;
text-align: center;
}
input[type=button]:hover , button:hover {
background:-webkit-gradient(linear, left top, left bottom, color-stop(0.05, #0061a7), color-stop(1, #007dc1));
background:-moz-linear-gradient(top, #0061a7 5%, #007dc1 100%);
background:-webkit-linear-gradient(top, #0061a7 5%, #007dc1 100%);
background:-o-linear-gradient(top, #0061a7 5%, #007dc1 100%);
background:-ms-linear-gradient(top, #0061a7 5%, #007dc1 100%);
background:linear-gradient(to bottom, #0061a7 5%, #007dc1 100%);
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#0061a7', endColorstr='#007dc1',GradientType=0);
background-color:#0061a7;
}
input[type=button]:active, button:active {
position:relative;
top:1px;
}
input[type=button]:disabled, button[disabled] {
background: SlateGray;
background-color: SlateGray;
margin-top: none;
cursor: default;
text-align: center;
-webkit-box-shadow:inset 0px 1px 0px 0px SlateGray;
box-shadow:inset 0px 0px 0px 0px SlateGray;
border:1px solid SlateGray;
}
#sysTimeBoxes {
width: 25em;
word-wrap: normal;
font-size: 13px;
font-style: italic;
font-family: 'Muli', sans-serif;
}
#homeURL {
position: absolute;
left: 5px;
top: 4px;
font-size: 13px;
color: MediumBlue;
font-family: 'Muli', sans-serif;
}
#homeURL:hover {
color: #000080;
}
#editDocDiv{
position: absolute;
left:850px;
top: 375px;
width: 30em;
}
.hideSysTimeBoxes {
visibility: hidden;
}
.svg-chart .background {
shape-rendering: crispEdges;
stroke: #ccc;
fill: #fdfdfd;
stroke-width: 1px;
z-index: 2;
}
.svg-chart .g { fill: #4682B4; }
#bar-chart-large {
position: absolute;
left: 0px;
top: 100px;
}
.tooltip-txt {
font-family: Helvetica;
font-size: 18px;
font-weight: bold;
pointer-events: none;
font-family: 'Muli', sans-serif;
}
.tick text {
font-size: 15px;
stroke-width: 0;
font-family: 'Muli', sans-serif;
}
.axis-label {
font-size: 17px;
font-weight: bold;
font-family: 'Muli', sans-serif;
}
#alignBoxes {
float: right;
width: 270px;
height: 100px
}
select:hover:not([disabled]) {
cursor: pointer;
}
#alignText {
float: left;
width: 230px;
height: 100px;
text-align: right;
}
#newDocContents {
display: block;
margin-left: auto;
margin-right: auto;
resize: none;
font-family: 'Muli', sans-serif;
}
.tick {
stroke: black;
stroke-width: 1;
}
.definition {
background-color: white;
opacity: 1px;
display: inline-block;
font-weight: bold;
opacity: .7;
cursor: pointer;
color: black;
}
.definition:hover {
background-color: #3399FF;
color: black;
}
.muliFont, #newUri, #docFormat {
font-family: 'Muli', sans-serif;
}
#textBoxForSelectingURI, #changeDocProp, #sysStartBox {
background-repeat:repeat-x;
border:1px solid black;
width: 140px;
color: black;
padding:3px;
margin-right:4px;
margin-bottom:8px;
font-size: 13px;
}
#time {
font-size: 14px;
font-family: 'Muli', sans-serif;
position: absolute;
top: 40px;
left: 10px;
}
#select-prop {
position: absolute;
display: block;
padding: 0 5px;
width: 170px;
cursor: pointer;
background: #fff;
font-size: .8em;
color: #000000;
font-weight: normal;
-webkit-box-shadow: 1px 1px 2px rgba(0,0,0,0.3);
-webkit-transition: all 0.15s linear;
-moz-box-shadow: 1px 1px 2px rgba(0,0,0,0.3);
box-shadow: 1px 1px 2px rgba(0,0,0,0.3);
-moz-transition: all 0.15s linear;
-ms-transition: all 0.15s linear;
-o-transition: all 0.15s linear;
transition: all 0.15s linear;
font-family: 'Muli', sans-serif;
top: 14px;
left: 132px;
}
.enterInstruct, #contents, #sysStartTxt {
font-size: 15px;
}
#editViewDelButtons {
position: absolute;
top: -40px;
left: 0px;
}
#display {
position: absolute;
left: 850px;
top: 85px;
width: 1000px;
font-family: 'Muli', sans-serif;
font-size: 15px;
}
</style>
</head>
<body>
<h1>MarkLogic <span class="definition" title="Bitemporal: Handles historical data along two different time lines, making it possible to rewind the information “as it actually was” in combination with “as it was recorded” at some point in time">Bitemporal</span> Visualization Demo</h1>
<a href="/" id="homeURL">Home</a>
<div id="instructions">
<p>Select a Property:</p>
<select id="select-prop"></select>
</div>
<div id='display'>
<p class="definition" title="Temporal Collection: A logical grouping of temporal documents that share the same axes with
timestamps defined by the same range indices. You can create additional temporal collections if
you have documents that require a different schema for the timestamps.">Temporal Collection: </p>
<p id="collection" style="display:inline"></p></br>
<p id="uriEnteredText" class="definition" title="Logical URI: The name of a logical document which represents the structure and
meaning of a document, with only suggested renderings for their appearance
which may or may not be followed by various browsers under various system configurations">Logical URI:</p>
<p id="uriEntered" style="display:inline"></p></br>
<p id="selectedURIText" class="definition" title="Physical URI: The name of a physical document which represents
specific visual effects which are intended to be reproduced in a
precise manner, and carry no connotation as to their semantic meaning">Selected URI:</p>
<p id="selectedURI" style="display:inline"></p></br>
<p class="definition" title ="LSQT (Last Stable Query Time): Allows a user to use custom times for creating, editing, and deleting a document">LSQT: </p>
<p id="lsqt" style="display:inline"></p></br>
</div>
<br></br>
<div id="tooltip-txt" class="hidden">
<p><span id="value"></span></p>
</div>
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="http://code.jquery.com/ui/1.10.4/jquery-ui.min.js"></script>
<script type="text/javascript" src="public/moment.min.js"></script>
<script type="text/javascript" src="public/d3.min.js"></script>
<script type="text/javascript" src="public/bitemp_graph.js"></script>
<script type="text/javascript" src="public/input_text_load_data.js"></script>
<script type="text/javascript" src="public/bitemp_graph_helper.js"></script>
<div id="bar-chart-large"> </div>
<div id="editDocDiv">
<div id="dialogCreateDoc" hidden title="Create a New Document">
<!-- Add contents of creating a document. -->
<div class="muliFont" id="createDocStuff" hidden="true">
<div id="alignText">
<b> Temporal Collection: </b>
<br></br>
<b> URI: </b>
<br></br>
<b>Format: </b>
</div>
<div id="alignBoxes">
<select id="selectTempColl" class="dialogue">
<option>Choose a temporal collection</option>
</select>
<br class="break"></br>
<input type="text" id="newUri" placeholder="A custom uri here" class="dialogue">
<br class="break"></br>
<select id="docFormat" title="Format" class="dialogue">
<option>JSON</option>
<option>XML</option>
</select>
</div>
<p align="center"> These will be the document's contents, choose to your liking! </p>
<textarea class="muliFont" rows="14" cols="45" id="newDocContents"> </textarea>
</div>
<link rel="shortcut icon" href="http://marklogic.com" />
</div>
<div id="editViewDelButtons">
<button id="editButton" disabled> Edit </button>
<button id="viewButton" disabled> View </button>
<button id="deleteButton" disabled> Delete </button>
<p id="deleteErrMessage"> </p>
<button id="saveButton" hidden="true"> Save </button>
<button id="cancelButton" hidden="true"> Cancel </button>
<textarea class="muliFont" rows="12" cols="40" id="contents" hidden = "true"> </textarea>
<div id="sysTimeDiv" class="hideSysTimeBoxes" class="muliFont">
<p id="sysStartTxt"> <b> sysStart: </b> <input spellcheck="false" class="muliFont" type="text" id="sysStartBox">
</div>
<div id="sysEndDiv" class="hideSysTimeBoxes" class="muliFont">
<p id="sysEndTxt"> <b> sysEnd: </b> <input spellcheck="false" class="muliFont" type="text" id="sysEndBox">
</div>
<div id="deleteButtonsDiv" class="hideSysTimeBoxes">
<button id="deleteOKButton"> OK </button>
<button id="deleteCancelButton"> Cancel </button>
</div>
</div>
</div> <!-- End editDocDiv -->
<p id="time"></p>
<script type="text/javascript">
function updateTime() {
var currentTime = new Date().toISOString();
setTimeout("updateTime()",1000);
document.getElementById('time').innerHTML = 'Current Time: '.bold() + currentTime.substring(0, currentTime.indexOf('.'));
}
updateTime();
</script>
<script type="text/javascript">
$('#saveButton').hide();
$('#cancelButton').hide();
//found from http://stackoverflow.com/questions/19491336/get-url-parameter-jquery
$.urlParam = function(name) {
var results = new RegExp("[\?&]" + name + "=([^&#]*)").exec(window.location.href);
if (results === null) {
return null;
}
else {
return results[1] || 0;
}
};
var uri = $.urlParam("collection");
loadData(uri); //May be null
</script>
</body>
</html>