[Pkg-owncloud-commits] [owncloud] 42/107: Fix unshare link click element
David Prévot
taffit at moszumanska.debian.org
Thu Dec 17 19:40:35 UTC 2015
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch stable8
in repository owncloud.
commit e84c58a13f79654379cfac4edf230613b97d47fe
Author: Vincent Petry <pvince81 at owncloud.com>
Date: Mon Dec 7 17:58:17 2015 +0100
Fix unshare link click element
When clicking on the unshare link (trash icon), the correct link element
needs to be used instead of whatever child was clicked. Then, that
element might contain a visible loading icon.
This fixes the spinner detection and also prevents a full page reload in
case the spinner was visible.
---
core/js/sharedialogshareelistview.js | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/core/js/sharedialogshareelistview.js b/core/js/sharedialogshareelistview.js
index dfe5789..daed8a4 100644
--- a/core/js/sharedialogshareelistview.js
+++ b/core/js/sharedialogshareelistview.js
@@ -245,12 +245,14 @@
onUnshare: function(event) {
var $element = $(event.target);
- console.log($element);
+ if (!$element.is('a')) {
+ $element = $element.closest('a');
+ }
- var $loading = $element.siblings('.icon-loading-small').eq(0);
+ var $loading = $element.find('.icon-loading-small').eq(0);
if(!$loading.hasClass('hidden')) {
// in process
- return;
+ return false;
}
$loading.removeClass('hidden');
--
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