summaryrefslogtreecommitdiffstats
path: root/ogcp/static
diff options
context:
space:
mode:
Diffstat (limited to 'ogcp/static')
-rw-r--r--ogcp/static/js/ogcp.js17
1 files changed, 17 insertions, 0 deletions
diff --git a/ogcp/static/js/ogcp.js b/ogcp/static/js/ogcp.js
index bdd7581..d5615b8 100644
--- a/ogcp/static/js/ogcp.js
+++ b/ogcp/static/js/ogcp.js
@@ -248,3 +248,20 @@ function RemovePartition(evt) {
});
}
+function checkImageServer() {
+ const images = $('input:checkbox[form|="imagesForm"]:not(:hidden)')
+
+ images.on('change', function() {
+ const selectedServer = $('#' + $.escapeSelector(this.dataset.server));
+ const serversSelector = 'input:checkbox[name|="image-server"]';
+ const nonSelectedServers = $(serversSelector).not(selectedServer);
+
+ selectedServer.prop('checked', true);
+
+ nonSelectedServers.each(function() {
+ $(this).prop('checked', false);
+ const checkboxes = $('input:checkbox[data-server|="' + this.id + '"]');
+ checkboxes.prop('checked', false);
+ });
+ });
+}