summaryrefslogtreecommitdiffstats
path: root/ogcp/templates/images.html
diff options
context:
space:
mode:
authorAlejandro Sirgo Rica <asirgo@soleta.eu>2024-09-16 13:57:31 +0200
committerAlejandro Sirgo Rica <asirgo@soleta.eu>2024-09-16 13:57:31 +0200
commit053519beae0cb380864773a0cca6dd3d009a5899 (patch)
tree49b8450f9c9ce579ca38589698c802cb03aec9ea /ogcp/templates/images.html
parent2ca2215ed6653dc7bf2cfaf320fee811b376ece8 (diff)
templates: save checkbox state in images and repos
Store the checked checkboxes of the sidebar in Images and Repos. Autoselect the correct server after updating the checkboxes.
Diffstat (limited to 'ogcp/templates/images.html')
-rw-r--r--ogcp/templates/images.html6
1 files changed, 4 insertions, 2 deletions
diff --git a/ogcp/templates/images.html b/ogcp/templates/images.html
index 34d8a87..7a16a0d 100644
--- a/ogcp/templates/images.html
+++ b/ogcp/templates/images.html
@@ -15,7 +15,8 @@
document.addEventListener('readystatechange', () => {
if (document.readyState === 'complete') {
keepTreeState('#servers');
- checkImageServer();
+ keepSelectedClients('images');
+ checkOnChange('image-server');
}
});
</script>
@@ -45,7 +46,8 @@
<input class="form-check-input" type="checkbox" form="imagesForm"
data-server="{{ server_str }}" value="{{ image["id"] }}"
{% if image.get("selected", False) %}checked{% endif %}
- name="{{ image["name"] }}_{{ image["id"] }}" />
+ name="{{ image["name"] }}_{{ image["id"] }}"
+ id="image{{ image["id"] }}"/>
{{ image["name"] }}
</li>
{% endfor %}