aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2021-06-15 11:10:25 +0200
committerJoas Schilling <coding@schilljs.com>2021-06-15 11:10:25 +0200
commitcd8386be046e6ef2f6cd336d39e1e0aec815b3ab (patch)
tree7cf92ac5e26e18942a38879bee1cb7b7491811b8
parenteb4e4c462b4d72833aec1f2ba4b97ffe52d1387e (diff)
downloadnextcloud-server-cd8386be046e6ef2f6cd336d39e1e0aec815b3ab.tar.gz
nextcloud-server-cd8386be046e6ef2f6cd336d39e1e0aec815b3ab.zip
Fix avatar actions
Signed-off-by: Joas Schilling <coding@schilljs.com>
-rw-r--r--apps/settings/js/settings/personalInfo.js10
1 files changed, 8 insertions, 2 deletions
diff --git a/apps/settings/js/settings/personalInfo.js b/apps/settings/js/settings/personalInfo.js
index f53e120dcf5..a6c57e55d7c 100644
--- a/apps/settings/js/settings/personalInfo.js
+++ b/apps/settings/js/settings/personalInfo.js
@@ -313,7 +313,10 @@ window.addEventListener('DOMContentLoaded', function () {
}
});
- $('#selectavatar').click(function () {
+ $('#selectavatar').click(function (event) {
+ event.stopPropagation();
+ event.preventDefault();
+
OC.dialogs.filepicker(
t('settings', "Select a profile picture"),
function (path) {
@@ -345,7 +348,10 @@ window.addEventListener('DOMContentLoaded', function () {
);
});
- $('#removeavatar').click(function () {
+ $('#removeavatar').click(function (event) {
+ event.stopPropagation();
+ event.preventDefault();
+
$.ajax({
type: 'DELETE',
url: OC.generateUrl('/avatar/'),