|
3 | 3 | <section class="create-exhibit"> |
4 | 4 | {# FIXME: maybe this can be improved #} |
5 | 5 | <link rel="stylesheet" href="{{ static ('css/marker-creation.css') }}"> |
| 6 | + <link rel="stylesheet" href="{{ static ('css/repository-list.css') }}"> |
6 | 7 | <link rel="stylesheet" href="{{ static ('css/label.css') }}"> |
7 | 8 | <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-modal/0.9.1/jquery.modal.min.js"></script> |
8 | 9 | <link rel="stylesheet" |
|
38 | 39 | {{ form.visible_fields()[4] .errors }} |
39 | 40 | <div id="form-modal" class="modal"> |
40 | 41 | <div id="object-modal" class="tab"> |
41 | | - <h4 class="modal-title">{{ _("Select Objects") }}</h4> |
42 | | - <div id="navigation-buttons" |
43 | | - style="display: flex; |
44 | | - justify-content: space-between; |
45 | | - margin-bottom: 15px"> |
46 | | - <button style="width:2.5em; |
47 | | - font-size: larger; |
48 | | - margin:0" |
| 42 | + <div class="modal-nav-header"> |
| 43 | + <button class="modal-nav-btn" |
49 | 44 | id="previous-button-objects" |
50 | 45 | hx-get="/elements/" |
51 | 46 | hx-vals='js:{page: get_page_objects(-1), element_type: "object"}' |
52 | 47 | hx-target="#repo-object" |
53 | 48 | hx-swap="outerHTML"> |
54 | 49 | < |
55 | 50 | </button> |
56 | | - <button style="width:2.5em; |
57 | | - font-size: larger; |
58 | | - margin:0" |
| 51 | + <h4 class="modal-title">{{ _("Select Objects") }}</h4> |
| 52 | + <button class="modal-nav-btn" |
59 | 53 | id="next-button-objects" |
60 | 54 | hx-get="/elements/" |
61 | 55 | hx-vals='js:{page: get_page_objects(1), element_type: "object"}' |
62 | 56 | hx-target="#repo-object" |
63 | | - hx-swap="outerHTML">></button> |
| 57 | + hx-swap="outerHTML" |
| 58 | + {% if total_object_pages <= 1 %}disabled="disabled"{% endif %}>></button> |
64 | 59 | </div> |
65 | 60 | {% with repository_list = objects, element_type="object", htmx="false" %} |
66 | 61 | {% include "core/components/item-list.jinja2" %} |
|
73 | 68 | onclick="validateSubmit()">{{ _("Okay") }}</a> |
74 | 69 | </div> |
75 | 70 | <div id="sound-modal" class="tab"> |
76 | | - <h4 class="modal-title">{{ _("Select Sounds") }}</h4> |
77 | | - <div id="navigation-buttons" |
78 | | - style="display: flex; |
79 | | - justify-content: space-between; |
80 | | - margin-bottom: 15px"> |
81 | | - <button style="width:2.5em; |
82 | | - font-size: larger; |
83 | | - margin:0" |
| 71 | + <div class="modal-nav-header"> |
| 72 | + <button class="modal-nav-btn" |
84 | 73 | id="previous-button-sounds" |
85 | 74 | hx-get="/elements/" |
86 | 75 | hx-vals='js:{page: get_page_sounds(-1), element_type: "sound"}' |
87 | 76 | hx-target="#repo-sound" |
88 | 77 | hx-swap="outerHTML"> |
89 | 78 | < |
90 | 79 | </button> |
91 | | - <button style="width:2.5em; |
92 | | - font-size: larger; |
93 | | - margin:0" |
| 80 | + <h4 class="modal-title">{{ _("Select Sounds") }}</h4> |
| 81 | + <button class="modal-nav-btn" |
94 | 82 | id="next-button-sounds" |
95 | 83 | hx-get="/elements/" |
96 | 84 | hx-vals='js:{page: get_page_sounds(1), element_type: "sound"}' |
97 | 85 | hx-target="#repo-sound" |
98 | | - hx-swap="outerHTML">></button> |
| 86 | + hx-swap="outerHTML" |
| 87 | + {% if total_sound_pages <= 1 %}disabled="disabled"{% endif %}>></button> |
99 | 88 | </div> |
100 | 89 | {% with repository_list = sounds, element_type="sound", htmx="false" %} |
101 | 90 | {% include "core/components/item-list.jinja2" %} |
|
214 | 203 | |
215 | 204 | selected_objects.split(",").forEach(function(id){ |
216 | 205 | augmenteds[id] = id |
217 | | - $("#object-"+id).css("border-bottom","3px solid #a6a6a6"); |
| 206 | + $("#object-"+id).css("border-bottom","3px solid #05f7ae"); |
218 | 207 | }); |
219 | 208 | |
220 | 209 | selected_sounds.split(",").forEach(function(id){ |
221 | 210 | sounds[id] = id |
222 | | - $("#sound-"+id).css("border-bottom","3px solid #a6a6a6"); |
| 211 | + $("#sound-"+id).css("border-bottom","3px solid #05f7ae"); |
223 | 212 | }); |
224 | 213 | |
225 | 214 | } |
|
245 | 234 | else |
246 | 235 | console.error("Unknown item type: " + item_type); |
247 | 236 | }else{ |
248 | | - $(this).css("border-bottom","3px solid #a6a6a6"); |
| 237 | + $(this).css("border-bottom","3px solid #05f7ae"); |
249 | 238 | if (item_type === "object") |
250 | 239 | augmenteds[item_id] = item_id; |
251 | 240 | else if (item_type === "sound") |
|
0 commit comments