diff options
author | Bjoern Schiessle <bjoern@schiessle.org> | 2017-04-26 15:56:59 +0200 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2017-04-28 23:41:37 -0300 |
commit | a0ca1c04c3ce003a2ce0090965261519dddc17b9 (patch) | |
tree | bf1210213c73a38c14335db19b070ae96f9e7ff6 /settings | |
parent | 5fa0e6df39f7e9df5a9f59b5d8b2c4b507975d41 (diff) | |
download | nextcloud-server-a0ca1c04c3ce003a2ce0090965261519dddc17b9.tar.gz nextcloud-server-a0ca1c04c3ce003a2ce0090965261519dddc17b9.zip |
show and hide verification dialog
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
Diffstat (limited to 'settings')
-rw-r--r-- | settings/css/settings.css | 2 | ||||
-rw-r--r-- | settings/js/personal.js | 21 |
2 files changed, 12 insertions, 11 deletions
diff --git a/settings/css/settings.css b/settings/css/settings.css index 54be375b3ce..253f4d038c5 100644 --- a/settings/css/settings.css +++ b/settings/css/settings.css @@ -155,7 +155,7 @@ input#openid, input#webdav { width:20em; } display: none; right: -9px; top: 40px; - width: 200px; + width: 650px; } .verification-dialog p { padding: 10px; diff --git a/settings/js/personal.js b/settings/js/personal.js index 094fc36ceaf..cbfe4b1e9af 100644 --- a/settings/js/personal.js +++ b/settings/js/personal.js @@ -201,11 +201,11 @@ $(document).ready(function () { } }); - var showVerifyDialog = function(howToVerify, verificationCode) { - var dialog = document.getElementById('verification-dialog'); - $(".verification-dialog-content .explainVerification").text(howToVerify); - $(".verification-dialog-content .verificationCode").text(verificationCode); - dialog.style.display = "block"; + var showVerifyDialog = function(dialog, howToVerify, verificationCode) { + var dialogContent = dialog.children('.verification-dialog-content'); + dialogContent.children(".explainVerification").text(howToVerify); + dialogContent.children(".verificationCode").text(verificationCode); + dialog.css('display', 'block'); }; $(".verify-action").click(function () { @@ -215,18 +215,19 @@ $(document).ready(function () { OC.generateUrl('/settings/users/{account}/verify', {account: accountId}), {method: 'GET'} ).done(function(data) { - showVerifyDialog(data.msg, data.code); + 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'); + }); }); - // When the user clicks on <span> (x), close the modal - $("#verify-dialog-close").click(function() { - var dialog = document.getElementById('verification-dialog'); - dialog.style.display = "none"; + $("body").click(function(){ + var page = $(this); + page.find('.verification-dialog').css('display', 'none'); }); // When the user clicks anywhere outside of the modal, close it |