|
1 --- |
|
2 layout: default |
|
3 javascript: | |
|
4 console.log('yolo'); |
|
5 |
|
6 $(function(){ |
|
7 $("#tooltip").popover({ |
|
8 placement: 'bottom', |
|
9 title: 'annotation', |
|
10 html: true, |
|
11 content: $('#annotation-control').html() |
|
12 }); |
|
13 |
|
14 $("#tooltip2").popover({ |
|
15 placement: 'bottom', |
|
16 title: 'annotation', |
|
17 html: true, |
|
18 content: $('#annotation-control-2').html() |
|
19 }); |
|
20 |
|
21 $('.metacategory').change(function(e){ |
|
22 console.log(e); |
|
23 }); |
|
24 |
|
25 }); |
|
26 --- |
|
27 |
|
28 <div class="container my-3"> |
|
29 |
|
30 <button id="tooltip" type="button" class="btn btn-secondary">Voir tooltip</button> |
|
31 |
|
32 |
|
33 <button id="tooltip2" type="button" class="btn btn-secondary">Voir tooltip (commentaire)</button> |
|
34 |
|
35 </div> |
|
36 |
|
37 <div id="annotation-control" class="invisible"> |
|
38 <select class="metacategory custom-select mb-2 w-100"> |
|
39 |
|
40 <optgroup label="général"> |
|
41 {% for meta in site.data.metacategories %} |
|
42 <option value="{{ meta.label }}">{{ meta.label }}</option> |
|
43 {% endfor %} |
|
44 </optgroup> |
|
45 |
|
46 <optgroup label="groupe"> |
|
47 {% for meta in site.data.metacategories-extra %} |
|
48 <option value="{{ meta.label }}">{{ meta.label }}</option> |
|
49 {% endfor %} |
|
50 </optgroup> |
|
51 </select> |
|
52 |
|
53 <textarea rows="3" name="comment-content" id="about" class="comment-content1 form-control input-md" style="display:none;"></textarea> |
|
54 |
|
55 <div class="text-right"> |
|
56 <button class="btn btn-primary btn-sm mt-1">annoter</button> |
|
57 </div> |
|
58 |
|
59 </div> |
|
60 |
|
61 <div id="annotation-control-2" class="invisible"> |
|
62 <select class="metacategory custom-select mb-2 w-100"> |
|
63 |
|
64 <optgroup label="général"> |
|
65 {% for meta in site.data.metacategories %} |
|
66 <option {% if meta.label == "commentaire" %}selected{% endif %} value="{{ meta.label }}">{{ meta.label }}</option> |
|
67 {% endfor %} |
|
68 </optgroup> |
|
69 |
|
70 <optgroup label="groupe"> |
|
71 {% for meta in site.data.metacategories-extra %} |
|
72 <option value="{{ meta.label }}">{{ meta.label }}</option> |
|
73 {% endfor %} |
|
74 </optgroup> |
|
75 </select> |
|
76 |
|
77 <textarea rows="3" name="comment-content" id="about" class="comment-content form-control input-md"></textarea> |
|
78 |
|
79 <div class="text-right"> |
|
80 <button class="btn btn-primary btn-sm mt-2">annoter</button> |
|
81 </div> |
|
82 |
|
83 </div> |