diff options
author | Raghu Nayyar <hey@raghunayyar.com> | 2016-09-01 11:43:34 +0200 |
---|---|---|
committer | Raghu Nayyar <hey@raghunayyar.com> | 2016-09-17 14:38:26 +0200 |
commit | 16711a2f99ecb83aa937533bcf49d19d86a4ef03 (patch) | |
tree | 93eb2e9ea05684651c757c635c040e2a0f4a5c38 /settings | |
parent | 91ffb635955e1e67cc956208faa16f801852dc8a (diff) | |
download | nextcloud-server-16711a2f99ecb83aa937533bcf49d19d86a4ef03.tar.gz nextcloud-server-16711a2f99ecb83aa937533bcf49d19d86a4ef03.zip |
Removes the check mark after 5 second timeout.
Diffstat (limited to 'settings')
-rw-r--r-- | settings/js/personal.js | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/settings/js/personal.js b/settings/js/personal.js index 04dbd51e99d..e2bfcbe3ad2 100644 --- a/settings/js/personal.js +++ b/settings/js/personal.js @@ -197,6 +197,15 @@ $(document).ready(function () { if($('#pass2').length) { $('#pass2').showPassword().keyup(); } + + var removeloader = function () { + setTimeout(function(){ + if ($('.password-state').length > 0) { + $('.password-state').remove(); + } + }, 5000) + }; + $("#passwordbutton").click(function () { OC.msg.startSaving('#password-error-msg'); var isIE8or9 = $('html').hasClass('lte9'); @@ -211,10 +220,13 @@ $(document).ready(function () { $('#passwordchanged').hide(); $('#passworderror').hide(); $("#passwordbutton").attr('disabled', 'disabled'); + $("#passwordbutton").after("<span class='password-loading icon icon-loading-small-dark password-state'></span>"); // Ajax foo $.post(OC.generateUrl('/settings/personal/changepassword'), post, function (data) { if (data.status === "success") { + $(".password-loading").remove(); $("#passwordbutton").after("<span class='checkmark icon icon-checkmark password-state'></span>"); + removeloader(); $('#pass1').val(''); $('#pass2').val('').change(); OC.msg.finishedSaving('#password-error-msg', data); |