diff options
author | Thomas Mueller <thomas.mueller@tmit.eu> | 2012-12-12 12:34:28 +0100 |
---|---|---|
committer | Thomas Mueller <thomas.mueller@tmit.eu> | 2012-12-12 12:34:28 +0100 |
commit | c938a4f791182d86045a45bcffda37c1b6e651f8 (patch) | |
tree | ecf8978f0d28094bdf9d99f125a1d837171cf9e0 | |
parent | 162a2c0fba6f7d7be3aa2372554e4a77a70a3e00 (diff) | |
download | nextcloud-server-c938a4f791182d86045a45bcffda37c1b6e651f8.tar.gz nextcloud-server-c938a4f791182d86045a45bcffda37c1b6e651f8.zip |
feedback to the user while request is being processed
-rw-r--r-- | core/js/share.js | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/core/js/share.js b/core/js/share.js index 9f71f1bb66b..df5ebf008b4 100644 --- a/core/js/share.js +++ b/core/js/share.js @@ -170,7 +170,7 @@ OC.Share={ html += '</div>'; html += '<form id="emailPrivateLink" >'; html += '<input id="email" style="display:none; width:65%;" value="" placeholder="'+t('core', 'Email link to person')+'" type="text" />'; - html += '<input id="emailButton" style="display:none;" type="submit" value="'+t('core', 'Send')+'" />'; + html += '<input id="emailButton" style="display:none; float:right;" type="submit" value="'+t('core', 'Send')+'" />'; html += '</form>'; } html += '<div id="expiration">'; @@ -564,7 +564,14 @@ $(document).ready(function() { var file = $('tr').filterAttr('data-id', String(itemSource)).data('file'); var email = $('#email').val(); if (email != '') { - $.post(OC.filePath('core', 'ajax', 'share.php'), { action: 'email', toaddress: email, link: link, itemType: itemType, itemSource: itemSource, file: file}, function(result) { + $('#email').attr('disabled', "disabled"); + $('#email').val(t('core', 'Sending ...')); + $('#emailButton').attr('disabled', "disabled"); + + $.post(OC.filePath('core', 'ajax', 'share.php'), { action: 'email', toaddress: email, link: link, itemType: itemType, itemSource: itemSource, file: file}, + function(result) { + $('#email').attr('disabled', "false"); + $('#emailButton').attr('disabled', "false"); if (result && result.status == 'success') { $('#email').css('font-weight', 'bold'); $('#email').animate({ fontWeight: 'normal' }, 2000, function() { |