summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjoern Schiessle <bjoern@schiessle.org>2017-04-27 09:54:38 +0200
committerMorris Jobke <hey@morrisjobke.de>2017-04-28 23:41:37 -0300
commit68ba8572b2d044f5af38a25a38f9217039a4ccb1 (patch)
treee435e394f8779529ee361e1b516d47695b7d1829
parent072d69ffe46345dcb6423bb4b870a534fc5daccd (diff)
downloadnextcloud-server-68ba8572b2d044f5af38a25a38f9217039a4ccb1.tar.gz
nextcloud-server-68ba8572b2d044f5af38a25a38f9217039a4ccb1.zip
verification button should be clickable directly after status change, not only after page reload
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
-rw-r--r--settings/js/personal.js33
1 files changed, 20 insertions, 13 deletions
diff --git a/settings/js/personal.js b/settings/js/personal.js
index d60f08c47b5..3249382a88c 100644
--- a/settings/js/personal.js
+++ b/settings/js/personal.js
@@ -208,20 +208,27 @@ $(document).ready(function () {
dialog.css('display', 'block');
};
- $(".verify-action").click(function () {
- var account = $(this);
- var accountId = $(this).attr('id');
- $.ajax(
- OC.generateUrl('/settings/users/{account}/verify', {account: accountId}),
- {method: 'GET'}
- ).done(function(data) {
- var dialog = account.closest('.verify').children('.verification-dialog');
- showVerifyDialog(dialog, data.msg, data.code);
- account.attr('title', t('core', 'Verifying …'));
- account.attr('src', OC.imagePath('core', 'actions/verifying.svg'));
- account.removeClass('verify-action');
+ $(".verify").click(function (event) {
- });
+ event.stopPropagation();
+
+ var verify = $(this);
+ var indicator = $(this).children('img');
+ var accountId = indicator.attr('id');
+
+ if (indicator.hasClass('verify-action')) {
+ $.ajax(
+ OC.generateUrl('/settings/users/{account}/verify', {account: accountId}),
+ {method: 'GET'}
+ ).done(function (data) {
+ var dialog = verify.children('.verification-dialog');
+ showVerifyDialog($(dialog), data.msg, data.code);
+ indicator.attr('title', t('core', 'Verifying …'));
+ indicator.attr('src', OC.imagePath('core', 'actions/verifying.svg'));
+ indicator.removeClass('verify-action');
+
+ });
+ }
});