aboutsummaryrefslogtreecommitdiffstats
path: root/public/js
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2016-08-07 11:01:47 -0700
committerUnknwon <u@gogs.io>2016-08-07 11:01:47 -0700
commit99385db0c418fb49838eb1a23f391cf826d99202 (patch)
tree9c8fe94489becb5a1909d07156cbb8ed81f69d2f /public/js
parent90dd0657b564210746c9c494c8c5b07dd8eee91f (diff)
downloadgitea-99385db0c418fb49838eb1a23f391cf826d99202.tar.gz
gitea-99385db0c418fb49838eb1a23f391cf826d99202.zip
#3320 code cleanup
Diffstat (limited to 'public/js')
-rw-r--r--public/js/gogs.js15
1 files changed, 15 insertions, 0 deletions
diff --git a/public/js/gogs.js b/public/js/gogs.js
index 7ca90b2826..226bb6bae5 100644
--- a/public/js/gogs.js
+++ b/public/js/gogs.js
@@ -187,9 +187,24 @@ function initInstall() {
}
});
+ // TODO: better handling of exclusive relations.
$('#offline-mode input').change(function () {
if ($(this).is(':checked')) {
$('#disable-gravatar').checkbox('check');
+ $('#federated-avatar-lookup').checkbox('uncheck');
+ }
+ });
+ $('#disable-gravatar input').change(function () {
+ if ($(this).is(':checked')) {
+ $('#federated-avatar-lookup').checkbox('uncheck');
+ } else {
+ $('#offline-mode').checkbox('uncheck');
+ }
+ });
+ $('#federated-avatar-lookup input').change(function () {
+ if ($(this).is(':checked')) {
+ $('#disable-gravatar').checkbox('uncheck');
+ $('#offline-mode').checkbox('uncheck');
}
});
$('#disable-registration input').change(function () {