[Pkg-owncloud-commits] [owncloud] 151/258: Prevent monkey clicking on labels

David Prévot taffit at moszumanska.debian.org
Sat Oct 11 17:22:31 UTC 2014


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository owncloud.

commit 5c0139fdff3a4b6adac113adf387ee273587585c
Author: Vincent Petry <pvince81 at owncloud.com>
Date:   Fri Sep 26 17:06:16 2014 +0200

    Prevent monkey clicking on labels
    
    Clicking on labels while the spinner is there will not trigger the
    hidden checkbox any more.
---
 core/js/share.js | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/core/js/share.js b/core/js/share.js
index dca0a65..49af493 100644
--- a/core/js/share.js
+++ b/core/js/share.js
@@ -917,9 +917,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);
@@ -938,9 +941,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);

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git



More information about the Pkg-owncloud-commits mailing list