Prevent monkey clicking on labels

Clicking on labels while the spinner is there will not trigger the
hidden checkbox any more.
This commit is contained in:
Vincent Petry 2014-09-26 17:06:16 +02:00
parent 08287e2880
commit ca6f296ae0
1 changed files with 5 additions and 0 deletions

View File

@ -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);