Commit 1186fd0cebd4db017bbc6bc531b5b5f83a62710f
- Diff rendering mode:
- inline
- side by side
static/text-annotation.css
(4 / 0)
  | |||
14 | 14 | width: 700px; | |
15 | 15 | box-shadow: 3px 3px 3px #468847; | |
16 | 16 | } | |
17 | #list-anno { | ||
18 | width: 500px; | ||
19 | margin: -250px 0 0 28%; | ||
20 | } |
static/text-annotation.js
(16 / 1)
  | |||
42 | 42 | function(data) { | |
43 | 43 | //console.log(data); | |
44 | 44 | $('#list-anno .modal-body').html(data); | |
45 | $('#list-anno').modal(); | ||
45 | $('#list-anno').modal({ | ||
46 | backdrop: false, | ||
47 | }); | ||
46 | 48 | }); | |
47 | 49 | }; | |
48 | 50 | ||
… | … | ||
77 | 77 | '<div id="list-anno" class="modal hide fade" role="dialog" aria-labelledby="list-anno-label" aria-hidden="true">'+ | |
78 | 78 | ' <div class="modal-header">'+ | |
79 | 79 | ' <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>'+ | |
80 | ' <button type="button" class="pull-right" onclick="shiftModal();" style="margin-right:10px;">⇔</button>'+ | ||
80 | 81 | ' <h3>Annotations</h3>'+ | |
81 | 82 | ' </div>'+ | |
82 | 83 | ' <div class="modal-body">'+ | |
… | … | ||
87 | 87 | ' </div>'+ | |
88 | 88 | '</div>'; | |
89 | 89 | }; | |
90 | window.shiftModal = function() { | ||
91 | var margin_left = $('#list-anno').css('marginLeft'); | ||
92 | var margin = Number(margin_left.split('px')[0]); | ||
93 | console.log(margin); | ||
94 | if(margin < 100) { | ||
95 | $('#list-anno').css('marginLeft', '28%'); | ||
96 | } | ||
97 | else { | ||
98 | $('#list-anno').css('marginLeft', '-28%'); | ||
99 | } | ||
100 | }; | ||
90 | 101 | ||
91 | 102 | var modal_template = function() { | |
92 | 103 | return '<div id="annotation-tree" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> <div id="myModalLabel"> <h3>Annotation attributes</h3> <small>Select attributes for annotation</small> </div> </div> <div class="modal-body"> <div id="stats"> <div id="node-info"></div> <div id="selected-nodes"></div> </div> <div id="infovis"></div> <div id="status"></div> </div> <div class="modal-footer"> <button class="btn" data-dismiss="modal" aria-hidden="true">Close</button> <button class="btn btn-primary" onclick="closeAnnotationTree();">Save changes</button> </div> </div>'; | |
… | … | ||
127 | 127 | event.stopPropagation(); | |
128 | 128 | event.preventDefault(); | |
129 | 129 | var elem = event.target; | |
130 | elem.removeEventListener('click', onClick); | ||
130 | 131 | elem.style.border = 'none'; | |
131 | 132 | elem.style.boxShadow = ''; | |
132 | 133 | //console.log('clicked', elem); |
templates/blank.html
(1 / 1)
  | |||
1 | 1 | {% for obj in content %} | |
2 | 2 | <div class="well"> | |
3 | 3 | {% for key in content[obj].keys() %} | |
4 | <p><b>{{ key }}</b>: {{ content[obj][key] }}</p> | ||
4 | <p><b>{{ key }}</b>: {{ content[obj][key] }}</p> | ||
5 | 5 | {% endfor %} | |
6 | 6 | </div> | |
7 | 7 | {% endfor %} |