diff options
author | Vincent Petry <pvince81@owncloud.com> | 2014-09-26 17:06:16 +0200 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2014-09-26 17:07:14 +0200 |
commit | ca6f296ae04712304c4b962804bd127e75c1496d (patch) | |
tree | b54dfa626d059b1690999b155393227ba88f1225 /core/js | |
parent | 08287e2880b6ebe42008fd436302fc780af75f7f (diff) | |
download | nextcloud-server-ca6f296ae04712304c4b962804bd127e75c1496d.tar.gz nextcloud-server-ca6f296ae04712304c4b962804bd127e75c1496d.zip |
Prevent monkey clicking on labels
Clicking on labels while the spinner is there will not trigger the
hidden checkbox any more.
Diffstat (limited to 'core/js')
-rw-r--r-- | core/js/share.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/core/js/share.js b/core/js/share.js index 3341c56295c..5632ecba971 100644 --- a/core/js/share.js +++ b/core/js/share.js @@ -920,9 +920,12 @@ $(document).ready(function() { if (oc_appconfig.core.enforcePasswordForPublicLink === false) { $loading.removeClass('hidden'); $button.addClass('hidden'); + $button.prop('disabled', true); + OC.Share.share(itemType, itemSource, OC.Share.SHARE_TYPE_LINK, '', OC.PERMISSION_READ, itemSourceName, expireDateString, function(data) { $loading.addClass('hidden'); $button.removeClass('hidden'); + $button.prop('disabled', false); OC.Share.showLink(data.token, null, itemSource); $('#dropdown').trigger(new $.Event('sharesChanged', {shares: OC.Share.currentShares})); OC.Share.updateIcon(itemType, itemSource); @@ -941,9 +944,11 @@ $(document).ready(function() { if ($('#linkText').val() !== '') { $loading.removeClass('hidden'); $button.addClass('hidden'); + $button.prop('disabled', true); OC.Share.unshare(itemType, itemSource, OC.Share.SHARE_TYPE_LINK, '', function() { $loading.addClass('hidden'); $button.removeClass('hidden'); + $button.prop('disabled', false); OC.Share.itemShares[OC.Share.SHARE_TYPE_LINK] = false; $('#dropdown').trigger(new $.Event('sharesChanged', {shares: OC.Share.currentShares})); OC.Share.updateIcon(itemType, itemSource); |