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 5028993..0ac67fe 100644
--- a/ogcp/static/js/ogcp.js
+++ b/ogcp/static/js/ogcp.js
@@ -329,6 +329,23 @@ function checkImageServer() {
});
}
+function checkRepoServer() {
+ const repos = $('input:checkbox[form|="reposForm"][name!="repos-server"]')
+ repos.on('change', function() {
+ const selectedServer = $('#' + $.escapeSelector(this.dataset.server));
+ const serversSelector = 'input:checkbox[name|="repos-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);
+ });
+ });
+}
+
function limitCheckboxes() {
const checkboxes = $('input:checkbox[form|="scopesForm"]');