forked from leonard-thong/SciAnnotate
-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.xhtml
1145 lines (1128 loc) · 55.8 KB
/
index.xhtml
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
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!-- -*- Mode: XHTML; tab-width: 2; indent-tabs-mode: nil; -*- -->
<!-- vim:set ft=xhtml ts=2 sw=2 sts=2 autoindent: -->
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en-US" xml:lang="en-US" xmlns="https://www.w3.org/1999/xhtml">
<head>
<title>SciAnnotate</title>
<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8" />
<meta http-equiv="Access-Control-Allow-Origin" content="*" />
<meta name="google" value="notranslate" />
<link href="static/jquery-theme/jquery-ui.css" rel="stylesheet" type="text/css" />
<link href="static/jquery-theme/jquery-ui-redmond.css" rel="stylesheet" type="text/css" />
<!-- code mirror css -->
<link rel="stylesheet" href="codemirror/lib/codemirror.css" />
<link rel="stylesheet" href="codemirror/theme/xq-light.css" />
<!-- code mirror css -->
<script type="text/javascript" src="client/lib/head.load.min.js"></script>
<script type="text/javascript" src="client/lib/jquery.js"></script>
<script type="text/javascript">
head.js(
// libraries
'client/lib/jquery.min.js',
'client/lib/jquery-ui.min.js',
'client/lib/jquery-ui.combobox.js',
'client/lib/jquery.svg.min.js',
'client/lib/jquery.svgdom.min.js',
'client/lib/jquery.ba-bbq.min.js',
'client/lib/jquery.json.min.js',
'client/lib/sprintf.js',
'client/lib/webfont.js',
// brat helpers
'client/src/configuration.js',
'client/src/util.js',
'client/src/annotation_log.js',
// brat modules
'client/src/md5.js',
'client/src/dispatcher.js',
'client/src/url_monitor.js',
'client/src/ajax.js',
'client/src/visualizer.js',
'client/src/visualizer_ui.js',
'client/src/annotator_ui.js',
'client/src/spinner.js',
// code mirror
'codemirror/lib/codemirror.js',
'codemirror/mode/python/python.js',
'codemirror/src/display/autorefresh.js',
);
head.ready(function () {
// var dispatcher = new Dispatcher(); // XXX DEBUG
dispatcher = new Dispatcher();
var urlMonitor = new URLMonitor(dispatcher);
var ajax = new Ajax(dispatcher);
window.visualizer = new Visualizer(dispatcher, 'svg');
var svg = window.visualizer.svg;
var visualizerUI = new VisualizerUI(dispatcher, svg);
var annotatorUI = new AnnotatorUI(dispatcher, svg);
var spinner = new Spinner(dispatcher, '#spinner');
var logger = new AnnotationLog(dispatcher);
var label_function_editor = CodeMirror.fromTextArea(document.getElementById('add_labeling_function_textarea'), {
lineNumbers: true,
lineWrapping: true,
autoRefresh: true,
theme: "xq-light",
mode: "python",
});
var model_api_editor = CodeMirror.fromTextArea(document.getElementById('model_api_textarea'), {
lineNumbers: true,
autoRefresh: true,
lineWrapping: true,
theme: "xq-light",
mode: "shell",
});
// model_api_editor.setSize('auto','600px');
var create_document_editor = CodeMirror.fromTextArea(document.getElementById('create_document_textarea'), {
lineNumbers: true,
autoRefresh: true,
lineWrapping: true,
theme: "xq-light",
});
// Util.profileEnable();
dispatcher.post('init');
});
</script>
<link rel="stylesheet" type="text/css" href="static/style-vis.css" />
<link rel="stylesheet" type="text/css" href="static/style-ui.css" />
<link rel="shortcut icon" type="image/x-icon" href="favicon.ico" />
</head>
<body>
<!-- page-centered div following in part Billbad's answer at
https://stackoverflow.com/questions/396145/whats-the-best-way-of-centering-a-div-vertically-with-css
-->
<div class="center_wrapper" id="no_svg_wrapper">
<div>
<div>
<fieldset id="no_document_message">
<h1 class="unselectable">No document selected</h1>
<p class="unselectable">To select a document:</p>
<ul>
<li class="unselectable">press the <strong>TAB</strong> key, or</li>
<li class="unselectable">click on "<strong>Collection</strong>" in the blue menu bar
on top</li>
</ul>
</fieldset>
<fieldset id="loading_message" style="display:none">
<h1 class="unselectable">Loading ...</h1>
<p class="unselectable">This may take a while, in particular when loading a larger document
collection. Please wait.
</p>
</fieldset>
</div>
</div>
</div>
<div class="center_wrapper" id="no_js_wrapper">
<div>
<div>
<fieldset>
<h1 class="unselectable">No JavaScript</h1>
<p class="unselectable">Your browser has JavaScript disabled, or does not support it.</p>
<p class="unselectable">
<span class="logo">SciAnnotate</span> needs JavaScript in order to run.
</p>
<p class="unselectable">Please enable JavaScript or try a <a
href="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/Alpha-Monocerotis/SciAnnotate">supported browser</a>
</p>
</fieldset>
</div>
</div>
</div>
<script>
var njsw = document.getElementById('no_js_wrapper');
njsw.parentNode.removeChild(njsw);
</script>
<style type="text/css">
@keyframes blink{
0%{opacity: 1;}
50%{opacity: 0;}
100%{opacity: 1;}
}
/* 添加兼容性前缀 */
@-webkit-keyframes blink {
0%{opacity: 1;}
50%{opacity: 0;}
100%{opacity: 1;}
}
@-moz-keyframes blink {
0%{opacity: 1;}
50%{opacity: 0;}
100%{opacity: 1;}
}
@-ms-keyframes blink {
0%{opacity: 1;}
50%{opacity: 0;}
100%{opacity: 1;}
}
@-o-keyframes blink {
0%{opacity: 1;}
50%{opacity: 0;}
100%{opacity: 1;}
}
/* 定义blink类*/
.blink{
color: #f1490c;
animation: blink 3s linear infinite;
/* 其它浏览器兼容性前缀 */
-webkit-animation: blink 3s linear infinite;
-moz-animation: blink 3s linear infinite;
-ms-animation: blink 3s linear infinite;
-o-animation: blink 3s linear infinite;
}
</style>
<img id="spinner" src="static/img/spinner.gif" />
<div id="loading" style="position:fixed; top:0; left:0; opacity: .5; background-color:#000; display:none; width:100%; height:100%; z-index:105;">
<div style="display: flex; flex-direction: row;">
<canvas id="c" style="position:fixed; top:calc(50vh - 200px); left:calc(50vw - 400px)"></canvas>
<h1 style="position:fixed; top:calc(50vh - 65px); left:calc(50vw - 50px)" class="blink" id="loading-message">Loading Model Results.</h1>
</div>
</div>
<div id="messagepullup" class="messages" style="display: none" />
<div id="messages" class="messages" />
<div id="pulluptrigger" />
<div id="commentpopup" />
<div id="header" class="ui-widget">
<div id="mainHeader" class="ui-widget-header">
<div id="mainlogo" class="logo unselectable">SciAnnotate</div>
<span id="navbuttons">
<img id="prev" alt="Previous document (Cursor Left)" title="Previous document (Cursor Left)"
src="static/img/arrow-180.png" /><img id="next" alt="Next document (Cursor Right)"
title="Next document (Cursor Right)" src="static/img/arrow.png" />
</span>
<div id="document_name">
<input readonly="readonly" class="ui-widget-header" />
</div>
<!-- <span id="document_ctime"/> -->
</div>
<div id="pulldown" class="unselectable ui-widget-content">
<div id="pulldown_padder">
<div>
<input id="auth_button" type="button" value="Login" />
<input id="sign_up_button" type="button" value="Sign Up" tabindex="-1"/>
<input id="collection_browser_button" type="button" value="Collection" tabindex="-1"
title="Open Collection Browser (Tab)" />
<input id="data_button" type="button" value="Data" tabindex="-1"
title="Import, Export Data; Manage Collection" />
<input id="search_button" type="checkbox" class="login" value="true" tabindex="-1" />
<label id="search_button_label" for="search_button"
title="Search text and annotations">Search</label>
<input id="clear_search_button" type="button" value="✕" tabindex="-1" title="Clear search"
style="display: none" />
<input id="label_button" type="button" value="Label" tabindex="-1"
title="Label text document with labeling fucnction" />
<input id="connect_button" type="button" value="Connect" tabindex="-1"
title="Connect to machine learning model" />
<input id="unlock_type_button" type="button" value="Unlock" tabindex="-1"
title="Stop annotating with the locked type" />
<!--<input id="undo_button" type="button" class="login" value="Undo" tabindex="-1"/>-->
<input id="options_button" type="button" value="Options" tabindex="-1"
title="Set Visual, Annotation and Network Options" />
</div>
<!-- Dummy span, fixes visual glitch (issue #535). TODO: better fix -->
<span class="document_edit_time unselectable"> </span>
<div id="document_mtime" class="document_edit_time unselectable"> </div>
<a id="help_link" target="manual" href="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/Alpha-Monocerotis/SciAnnotate">Help <img
src="static/img/Fugue-shadowless-question.png" /></a>
</div>
</div>
</div>
<div id="svg"></div>
<form id="import_form" class="dialog" title="Import">
<fieldset id="import_form_docid">
<legend>Document ID</legend>
<input id="import_docid" class="borderless" />
</fieldset>
<fieldset id="import_form_text">
<legend>Document text</legend>
<textarea id="import_text" class="borderless" />
</fieldset>
</form>
<form id="import_coll_form" class="dialog" title="Import collection">
<fieldset id="import_coll_form_text">
<legend>Collection archive (.zip, .tar.gz)</legend>
<input type="file" id="import_coll" class="borderless" accept="application/zip,application/x-gzip" />
</fieldset>
</form>
<!-- Data dialog -->
<form id="data_form" class="dialog" title="Data">
<!-- Data dialog export section -->
<fieldset class="small-buttons">
<legend>Export</legend>
<div class="optionRow">
<span id="document_export" class="optionLabel">Document data</span>
<span id="source_files" />
</div>
<div id="document_visualization" class="optionRow">
<span class="optionLabel">Visualization</span>
<span id="stored_file_spinner" class="ui-button ui-widget ui-corner-all ui-state-default ui-button-text-only">
<span class="ui-button-text">
<img style="vertical-align:bottom" height="18" src="static/img/spinner.gif"/>
</span>
</span>
<span id="stored_file_regenerate" title="Regenerate static visualization of the current document">regenerate</span>
<span id="download_stored" />
</div>
<div class="optionRow">
<span class="optionLabel">Collection data</span>
<span id="source_collection" title="Download the entire current collection as a .tar.gz package" /> Conf files:
<span id="source_collection_conf">
<input type="radio" id="source_collection_conf_off" value="0"
name="source_collection_conf_radio"/>
<label for="source_collection_conf_off"
title="Do not include the configuration files">off</label>
<input type="radio" id="source_collection_conf_on" value="1"
name="source_collection_conf_radio" checked="checked"/>
<label for="source_collection_conf_on"
title="Do include the configuration files">on</label>
</span>
</div>
</fieldset>
<!-- Data dialog comparison section -->
<!-- <fieldset class="small-buttons">
<legend>Compare</legend>
<div class="optionRow">
<span class="optionLabel">Side-by-side</span>
<span id="side-by-side_cmp" title="Enter side-by-side comparison mode" />
</div>
</fieldset> -->
<!-- Data dialog automatic annotation section -->
<div id="auto_tagging_login_control" class="login">
<fieldset id="auto_tagging_fieldset" class="small-buttons">
<legend>Automatic annotation</legend>
<div class="optionRow">Automatically tag current document</div>
<div id="tagger_buttons" />
</fieldset>
<fieldset id="no_tagger_message" style="display:none">
<legend>Automatic annotation</legend>
<div style="color:gray; font-size:80%; text-align:center; margin:1em">(No tools set up. Please contact server administrator if needed.)</div>
</fieldset>
</div>
<!-- Data dialog import section -->
<fieldset class="login small-buttons">
<legend>Import</legend>
<div class="optionRow">
<span class="optionLabel">New document</span>
<input id="import_button" type="button" class="login ui-button-text" value="Enter text" tabindex="-1" title="Import a new document into the current collection" />
</div>
<!-- XXX Taken out until such time when serverside is
implemented, pending resolution of issues
raised in #216
<div class="optionRow">
<span class="optionLabel">New collection</span>
<input id="import_collection_button" type="button" class="login ui-button-text" value="Upload archive" tabindex="-1" title="Import an entire collection into the current installation"/>
</div>
-->
</fieldset>
<!-- Data dialog delete section -->
<div style="display: none;">
<fieldset class="login small-buttons">
<legend>Delete</legend>
<div class="optionRow">
<span class="optionLabel">Current document</span>
<input id="delete_document_button" type="button" class="login ui-button-text" value="Delete document" tabindex="-1" title="Permanently remove the current document and its annotations from the collection." />
</div>
<div class="optionRow">
<span class="optionLabel">Current collection</span>
<input id="delete_collection_button" type="button" class="login ui-button-text" value="Delete collection" tabindex="-1" title="Permanently remove the entire current collection and all documents in it." />
</div>
</fieldset>
</div>
</form>
<!-- Label dialog -->
<form id="label_form" class="dialog" title="Label">
<div id="label_tabs">
<ul>
<li><a id="label_tab_keyword_head" href="#label_tab_keyword">Keyword</a></li>
<li><a id="label_tab_select_head" href="#label_tab_select">Select</a></li>
<li><a id="label_tab_add_head" href="#label_tab_add">Add</a></li>
</ul>
<div id="label_tab_keyword">
<fieldset class="small-buttons">
<legend>Keyword Label</legend>
<div id="keyword_label">
<table class="fullwidth">
<tr>
<td>Keyword</td>
<td>
<input id="keyword_label_keyword_input" class="fullwidth" placeholder="Keyword to label" />
</td>
</tr>
<tr>
<td>Label</td>
<td>
<input id="keyword_label_label_input" class="fullwidth" placeholder="Label to add" />
</td>
</tr>
</table>
</div>
</fieldset>
<fieldset class="small-buttons">
<legend>Options</legend>
<div class="optionRow">
<span class="optionLabel">Match Case</span>
<span id="label_scope" class="radio_group small-buttons">
<input type="radio" id="label_scope_doc" value="text"
name="label_keyword_scope_radio" checked="checked"/>
<label for="label_scope_doc">Text</label>
<input type="radio" id="label_scope_coll" value="regex"
name="label_keyword_scope_radio" val="regex"/>
<label for="label_scope_coll">RegEx</label>
</span>
</div>
</fieldset>
<fieldset class="small-buttons">
<legend>Select Labeling Scope</legend>
<div id="keyword_labeling_scope_select">
<table class="fullwidth">
<tr>
<td>Scope</td>
<td id="keyword_form_scope">
<input type="radio" id="keyword_scope_ac" value="allCollections"
name="keyword_scope_radio" />
<label for="keyword_scope_ac">All Collections</label>
<input type="radio" id="keyword_scope_cc" value="currentCollection"
name="keyword_scope_radio" />
<label for="keyword_scope_cc">Current Collection</label>
<input type="radio" id="keyword_scope_cd" value="currentDocument"
name="keyword_scope_radio" checked="checked" />
<label for="keyword_scope_cd">Current Document</label>
</td>
</tr>
</table>
</div>
</fieldset>
</div>
<div id="label_tab_select">
<fieldset class="small-buttons">
<legend>Select Labeling Function(s)</legend>
<div id="select_labeling_function_select">
<table class="fullwidth">
<tr>
<td>Type</td>
<td id="label_form_select">
<!-- populate with JQuery -->
</td>
</tr>
</table>
</div>
</fieldset>
<fieldset class="small-buttons">
<legend>Select Labeling Scope</legend>
<div id="select_labeling_scope_select">
<table class="fullwidth">
<tr>
<td>Scope</td>
<td id="label_form_scope">
<input type="radio" id="label_scope_ac" value="allCollections"
name="label_select_scope_radio"/>
<label for="label_scope_ac">All Collections</label>
<input type="radio" id="label_scope_cc" value="currentCollection"
name="label_select_scope_radio" />
<label for="label_scope_cc">Current Collection</label>
<input type="radio" id="label_scope_cd" value="currentDocument"
name="label_select_scope_radio" checked="checked"/>
<label for="label_scope_cd" >Current Document</label>
</td>
</tr>
</table>
</div>
</fieldset>
</div>
<div id="label_tab_add">
<fieldset class="small-buttons">
<legend>Add Labeling Function</legend>
<textarea id="add_labeling_function_textarea" class="fullwidth" />
</fieldset>
</div>
</div>
</form>
<!-- Connect dialog -->
<form id="connect_form" class="dialog" title="Connect">
<fieldset class="small-buttons">
<legend>Model API</legend>
<div id="connect_tab_entity">
<table class="fullwidth">
<tr>
<td>Model API</td>
<td>
<input id="connect_form_text" class="fullwidth" placeholder="https://127.0.0.1:9001/api/model/test" />
</td>
</tr>
</table>
</div>
</fieldset>
<fieldset class="small-buttons">
<legend>Model API Text Area</legend>
<textarea id="model_api_textarea" class="fullwidth" />
</fieldset>
</form>
<!-- Options dialog -->
<form id="options_form" class="dialog" title="Options">
<fieldset id="options_form_visual">
<legend>Visual options</legend>
<div class="optionRow">
<span class="optionLabel">Abbreviate labels</span>
<span id="label_abbreviations" class="radio_group small-buttons">
<input type="radio" id="label_abbreviations_off" value="off" name="label_abbrev_radio" />
<label for="label_abbreviations_off" title="Always display full form of labels.">Off</label>
<input type="radio" id="label_abbreviations_on" value="on" name="label_abbrev_radio"
checked="checked" />
<label for="label_abbreviations_on"
title="Abbreviate annotation labels in limited space.">On</label>
</span>
</div>
<div class="optionRow">
<span class="optionLabel">Text background</span>
<span id="text_backgrounds" class="radio_group small-buttons">
<input type="radio" id="text_backgrounds_blank" value="blank" name="text_background_radio" />
<label for="text_backgrounds_blank" title="Blank white text backgrounds.">Blank</label>
<input type="radio" id="text_backgrounds_striped" value="striped" name="text_background_radio"
checked="checked" />
<label for="text_backgrounds_striped"
title="Striped text backgrounds with every second sentence on light gray background.">Striped</label>
</span>
</div>
<div class="optionRow">
<span class="optionLabel">Layout density</span>
<span id="layout_density" class="radio_group small-buttons">
<input type="radio" id="layout_density1" value="1" name="layout_radio" />
<label for="layout_density1"
title="Dense annotation layout: minimizes space taken by annotations.">Dense</label>
<input type="radio" id="layout_density2" value="2" name="layout_radio" checked="checked" />
<label for="layout_density2"
title="Normal annotation layout density: balances between annotation size and readability.">Normal</label>
<input type="radio" id="layout_density3" value="3" name="layout_radio" />
<label for="layout_density3"
title="Spacious annotation layout: allows extra space for annotations to improve readability.">Spacious</label>
</span>
</div>
<div class="optionRow">
<span class="optionLabel">Visualization width</span>
<input id="svg_width_value" maxlength="3" size="3" value="100" style="text-align:right" />
<span id="svg_width_unit" class="radio_group small-buttons">
<input type="radio" id="svg_width_unit_percent" value="%" name="svg_width_radio"
checked="checked" />
<label for="svg_width_unit_percent">percent</label>
<input type="radio" id="svg_width_unit_pixels" value="px" name="svg_width_radio" />
<label for="svg_width_unit_pixels">pixels</label>
</span>
</div>
<div class="optionRow small-buttons">
<span class="optionLabel">Paging</span> size
<input id="paging_size" maxlength="3" size="3" value="10" style="text-align:right" />, step
<input id="paging_step" maxlength="3" size="3" value="5" style="text-align:right" /> sentences
<input type="button" id="paging_clear" value="Clear" />
</div>
</fieldset>
<fieldset id="options_form_annotation" class="login">
<legend>Annotation options</legend>
<div class="optionRow">
<span class="optionLabel">Annotation mode</span>
<span id="annotation_speed" class="radio_group small-buttons">
<input type="radio" id="annotation_speed1" value="1" name="annspeed_radio" checked="checked" />
<label for="annotation_speed1"
title="Careful annotation mode: ask for additional confirmation of annotation changes. Suitable for annotators in training and for mature corpora requiring few changes.">Careful</label>
<input type="radio" id="annotation_speed2" value="2" name="annspeed_radio" />
<label for="annotation_speed2"
title="Normal annotation mode. Suitable for standard annotation processes.">Normal</label>
<input type="radio" id="annotation_speed3" value="3" name="annspeed_radio" />
<label for="annotation_speed3"
title="Rapid annotation mode: activate automatic support for speeding up annotation process. Suitable for experienced annotators performing an established task.">Rapid</label>
<select id="rapid_model" />
</span>
</div>
<div class="optionRow">
<span class="optionLabel">Type Collapse Limit</span>
<input id="type_collapse_limit" maxlength="3" size="3" value="30" style="text-align:right" />
</div>
</fieldset>
<fieldset id="options_form_network">
<legend>Network options</legend>
<div class="optionRow">
<span class="optionLabel">Collaboration</span>
<span class="small-buttons">
<input id="autorefresh_mode" type="checkbox" />
<label for="autorefresh_mode"
title="Toggle the autorefresh mode on/off. When autorefresh is on, the system will periodically check with the server for updates to the document you are working on. This is useful when collaborating on annotation but consumes some resources, so you may wish to turn autorefresh off if there are no simultaneous edits.">Autorefresh</label>
</span>
</div>
</fieldset>
</form>
<!-- More collection information dialog -->
<form id="more_information_dialog" class="dialog" title="Collection information">
<fieldset>
<textarea id="more_info_readme" readonly="readonly" class="borderless" />
</fieldset>
</form>
<!-- Search dialog -->
<form id="search_form" class="dialog" title="Search">
<div id="search_tabs">
<ul>
<li><a href="#search_tab_text">Text</a></li>
<li><a href="#search_tab_entity">Entity</a></li>
<li><a href="#search_tab_event">Event</a></li>
<li><a href="#search_tab_relation">Relation</a></li>
<li><a href="#search_tab_note">Note</a></li>
<!-- XXX removed per #900
<li><a href="#search_tab_load">Load</a></li>
-->
</ul>
<div id="search_tab_text">
<table class="fullwidth">
<tr>
<td>Text</td>
<td>
<input id="search_form_text_text" class="fullwidth" placeholder="Text to match" />
</td>
</tr>
</table>
</div>
<div id="search_tab_entity">
<table class="fullwidth">
<tr>
<td>Type</td>
<td>
<select id="search_form_entity_type" />
</td>
</tr>
<tr>
<td>Text</td>
<td>
<input id="search_form_entity_text" class="fullwidth" placeholder="Text to match (empty=anything)" />
</td>
</tr>
</table>
</div>
<div id="search_tab_event">
<table class="fullwidth">
<tr>
<td>Type</td>
<td colspan="3">
<select id="search_form_event_type" />
</td>
</tr>
<tr>
<td>Trigger</td>
<td colspan="3">
<input id="search_form_event_trigger" class="fullwidth" placeholder="Text to match (empty=anything)" />
</td>
</tr>
<tbody id="search_form_event_roles" />
</table>
</div>
<div id="search_tab_relation">
<table class="fullwidth">
<tr>
<td>Type</td>
<td colspan="2">
<select id="search_form_relation_type" class="fullwidth" />
</td>
</tr>
<tr>
<td>Arg1</td>
<td>
<select id="search_form_relation_arg1_type" class="fullwidth" />
</td>
<td>
<input id="search_form_relation_arg1_text" class="fullwidth" placeholder="Text to match (empty=anything)" />
</td>
</tr>
<tr>
<td>Arg2</td>
<td>
<select id="search_form_relation_arg2_type" class="fullwidth" />
</td>
<td>
<input id="search_form_relation_arg2_text" class="fullwidth" placeholder="Text to match (empty=anything)" />
</td>
</tr>
</table>
<div class="optionRow">
<span class="optionLabel">Show arg text</span>
<span id="search_form_relation_show_arg_text" class="radio_group small-buttons">
<input type="radio" id="search_form_relation_show_arg_text_off"
value="off" name="search_form_relation_show_arg_text_radio"
checked="checked"/>
<label for="search_form_relation_show_arg_text_off"
title="Don't show texts of relation arguments in search results.">off</label>
<input type="radio" id="search_form_relation_show_arg_text_on"
value="on"
name="search_form_relation_show_arg_text_radio"/>
<label for="search_form_relation_show_arg_text_on"
title="Show texts of relation arguments in search results.">on</label>
</span>
</div>
<div class="optionRow">
<span class="optionLabel">Show arg type</span>
<span id="search_form_relation_show_arg_type" class="radio_group small-buttons">
<input type="radio" id="search_form_relation_show_arg_type_off"
value="off" name="search_form_relation_show_arg_type_radio"
checked="checked"/>
<label for="search_form_relation_show_arg_type_off"
title="Don't show types of relation arguments in search results.">off</label>
<input type="radio" id="search_form_relation_show_arg_type_on"
value="on"
name="search_form_relation_show_arg_type_radio"/>
<label for="search_form_relation_show_arg_type_on"
title="Show types of relation arguments in search results.">on</label>
</span>
</div>
</div>
<div id="search_tab_note">
<table class="fullwidth">
<tr>
<td>Category</td>
<td>
<select id="search_form_note_category" class="fullwidth">
<option value="">- Any -</option>
<option value="entity">Entity</option>
<option value="event">Event</option>
<option value="relation">Relation</option>
<option value="sentence">Sentence</option>
</select>
</td>
</tr>
<tr id="search_form_note_type_row">
<td>Type</td>
<td>
<select id="search_form_note_type" class="fullwidth" />
</td>
</tr>
<tr>
<td>Text</td>
<td>
<input id="search_form_note_text" class="fullwidth" placeholder="Text to match (empty=anything)" />
</td>
</tr>
</table>
</div>
<!-- XXX removed per #900
<div id="search_tab_load">
<table class="fullwidth">
<tr>
<td>File:</td>
<td>
<input type="file" name="file" id="search_form_load_file" class="fullwidth"/>
<input type="hidden" name="action" value="searchLoad"/>
</td>
</tr>
</table>
</div>
-->
</div>
<fieldset id="search_options">
<legend>Options</legend>
<a href="" id="advanced_search_option_toggle">Show advanced</a>
<div class="optionRow">
<span class="optionLabel">Search in current</span>
<span id="search_scope" class="radio_group small-buttons">
<input type="radio" id="search_scope_doc" value="document"
name="search_scope_radio" checked="checked"/>
<label for="search_scope_doc"
title="Search in current document only.">document</label>
<input type="radio" id="search_scope_coll" value="collection"
name="search_scope_radio"/>
<label for="search_scope_coll"
title="Search in all documents in current collection.">collection</label>
</span>
</div>
<div class="advancedOptions">
<div class="optionRow">
<span class="optionLabel">Concordancing</span>
<span id="concordancing" class="radio_group small-buttons">
<input type="radio" id="concordancing_off" value="document"
name="concordancing_radio" checked="checked"/>
<label for="concordancing_off"
title="Display matched search results only.">off</label>
<input type="radio" id="concordancing_on" value="collection"
name="concordancing_radio"/>
<label for="concordancing_on"
title="In addition to search results, display also the text context of the matches in Key Word In Context (KWIC) format.">on</label>
</span>
</div>
<div id="context_size_div" class="optionRow">
<span class="optionLabel" style="margin-left:1em;">Context length</span> <input id="context_length" maxlength="3" size="3" value="50" /> characters
</div>
<div class="optionRow">
<span class="optionLabel">Match text as</span>
<span id="text_match" class="radio_group small-buttons">
<input type="radio" id="text_match_word" value="word"
name="text_match_radio" checked="checked"/>
<label for="text_match_word"
title="Match whole words only.">whole word</label>
<input type="radio" id="text_match_substr" value="substring"
name="text_match_radio"/>
<label for="text_match_substr"
title="Match any substring.">any substring</label>
<input type="radio" id="text_match_regex" value="regex"
name="text_match_radio"/>
<label for="text_match_regex"
title="Treat given text as regular expression.">regex</label>
</span>
</div>
<div class="optionRow">
<span class="optionLabel">Match case</span>
<span id="match_case" class="radio_group small-buttons">
<input type="radio" id="match_case_off" value="document"
name="match_case_radio" checked="checked"/>
<label for="match_case_off"
title="Ignore character case in text search ('abc' matches 'ABC')">off</label>
<input type="radio" id="match_case_on" value="collection"
name="match_case_radio"/>
<label for="match_case_on"
title="Require identical character case in text search ('abc' does not match 'ABC')">on</label>
</span>
</div>
</div>
</fieldset>
</form>
<!-- Create dialog -->
<form id="create_document_form" class="dialog" title="Create Document">
<fieldset class="small-buttons">
<legend>Create New Document</legend>
<div>
<table class="fullwidth">
<tr>
<td>Name</td>
<td>
<input id="create_document_form_text" class="fullwidth" placeholder="Name" />
</td>
</tr>
</table>
</div>
</fieldset>
<fieldset class="small-buttons">
<legend>Text</legend>
<textarea id="create_document_textarea" class="fullwidth" />
</fieldset>
</form>
<form id="create_folder_form" class="dialog" title="Create Folder">
<fieldset class="small-buttons">
<legend>Create New Folder</legend>
<div>
<table class="fullwidth">
<tr>
<td>Folder Name</td>
<td>
<input id="folder_name" class="fullwidth" placeholder="Folder Name" />
</td>
</tr>
</table>
</div>
</fieldset>
</form>
<form id="create_entity_form" class="dialog" title="Create Entity">
<fieldset class="small-buttons">
<legend>Create New Entity</legend>
<div>
<table class="fullwidth">
<tr>
<td>Entity Name</td>
<td>
<input id="entity_name" class="fullwidth" placeholder="Entity Name" />
</td>
</tr>
</table>
</div>
</fieldset>
</form>
<!-- Import dialog -->
<form id="import_document_form" class="dialog" title="Import Document">
<fieldset>
<legend>Upload</legend>
<input type="file" id="import_file" multiple="multiple" name="import_file" />
</fieldset>
</form>
<!-- Span dialog (view only) -->
<form id="viewspan_form" class="dialog" title="Span">
<fieldset id="viewspan_selected_fset">
<legend>Text</legend>
<a target="brat_linked" id="viewspan_highlight_link" href="#">Link</a>
<div id="viewspan_selected" />
</fieldset>
<fieldset id="viewspan_search_fieldset">
<legend>Search</legend>
<div id="viewspan_search_links" />
</fieldset>
<fieldset>
<legend>Notes</legend>
<input id="viewspan_notes" class="borderless" readonly="readonly" />
</fieldset>
</form>
<!-- Span dialog (view+edit) -->
<form id="span_form" class="dialog" title="Span">
<!-- Span dialog annotated text -->
<fieldset id="span_selected_fset">
<legend>Text</legend>
<a target="brat_linked" id="span_highlight_link" href="#">Link</a>
<div id="span_selected" />
</fieldset>
<!-- Span dialog search links -->
<fieldset id="span_search_fieldset">
<legend>Search</legend>
<div id="span_search_links" />
</fieldset>
<!-- Span dialog type selector -->
<fieldset>
<div id="entity_and_event_wrapper" class="split_wrapper">
<div id="span_entity_section" class="wrapper_half_left">
<div id="entity_label" class="label-like">Entity type</div>
<div id="entity_types" class="scroll_wrapper_upper">
<div class="scroller" />
</div>
<!-- NOTE: the attribute labels must be *outside* of the
divs they logically belong to prevent scrollers
overflowing them. -->
<div id="entity_attribute_label" class="label-like wrapper_lower_label">Entity attributes</div>
<div id="entity_attributes" class="scroll_wrapper_lower">
<div class="scroller small-buttons" />
</div>
</div>
<div id="span_event_section" class="wrapper_half_right">
<div id="event_label" class="label-like">Event type</div>
<div id="event_types" class="scroll_wrapper_upper">
<div class="scroller" />
</div>
<div id="event_attribute_label" class="wrapper_lower_label label-like">Event attributes</div>
<div id="event_attributes" class="scroll_wrapper_lower">
<div class="scroller small-buttons" />
</div>
</div>
</div>
</fieldset>
<!-- Span dialog normalization -->
<fieldset id="norm_fieldset">
<legend>Normalization</legend>
<div id="norm_container">
<span class="small-buttons">
<button id="norm_list_button">List (<span id="norm_count">0</span>)</button>
<button id="norm_qadd_button">Quick Add</button>
</span>
<input type="hidden" id="norm_json" name="norm_json" value="" />
</div>
</fieldset>
<fieldset>
<legend>Notes</legend>
<div id="span_notes_container">
<input id="span_notes" class="borderless" />
<input id="clear_span_notes_button" type="button" value="✕" title="Clear notes" />
</div>
</fieldset>
</form>
<!-- Rapid mode span dialog -->
<form id="rapid_span_form" class="dialog" title="Span type">
<fieldset id="rapid_span_selected_fset">
<legend>Text</legend>
<div id="rapid_span_selected" />
</fieldset>
<div id="rapid_span_types" class="scroll_fset" style="height:250px">
<fieldset>
<legend>Select type</legend>
<div class="scroller" id="rapid_span_types_div">
<!-- filled dynamically -->
</div>
</fieldset>
</div>
</form>
<!-- Arc dialog -->
<form id="arc_form" class="dialog" title="Arc">
<fieldset id="arc_origin_fset">
<legend>From</legend>
<a target="brat_linked" id="arc_highlight_link" href="#">Link</a>
<div id="arc_origin" />
</fieldset>
<fieldset id="arc_target_fset">
<legend>To</legend>
<div id="arc_target" />
</fieldset>
<div id="arc_roles" class="scroll_fset">
<fieldset>
<legend>Type</legend>
<div class="scroller" />
</fieldset>
</div>
<fieldset id="arc_notes_fieldset">
<legend>Notes</legend>
<div id="arc_notes_container">
<input id="arc_notes" class="borderless" />
<input id="clear_arc_notes_button" type="button" value="✕" title="Clear notes" />
</div>
</fieldset>
</form>
<!-- Login dialog -->
<form id="auth_form" class="dialog" title="Login">
<fieldset>
<legend>Username</legend>
<input id="auth_user" placeholder="Username" class="borderless" />
</fieldset>
<fieldset>
<legend>Password</legend>
<input id="auth_pass" type="password" placeholder="Password" class="borderless" />
</fieldset>
</form>
<!-- Sign up dialog -->
<form id="sign_up_form" class="dialog" title="Sign up">
<fieldset>
<legend>Username</legend>
<input id="sign_up_user" placeholder="Username" class="borderless" />
</fieldset>
<fieldset>
<legend>Password</legend>
<input id="sign_up_passwd" type="password" placeholder="Password" class="borderless" />
</fieldset>
<fieldset>
<legend>Confirm Password</legend>
<input id="sign_up_confirm_passwd" type="password" placeholder="Password" class="borderless" />
</fieldset>
</form>
<!-- Split span annotation dialog -->
<form id="split_form" class="dialog" title="Split the Span">
<fieldset>
<legend>Split Roles</legend>
<div id="split_roles" class="scroll_fset" />
</fieldset>
</form>
<!-- Browser dialog -->