summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2015-12-07 17:58:17 +0100
committerVincent Petry <pvince81@owncloud.com>2015-12-07 17:58:17 +0100
commit5567b6cee229c0380d243d1697f926d02db1a3e8 (patch)
tree23e85f99209d41b1a997dbd00da30584679b62f3 /core
parente4c5bf790d670eceac01f2e8c7750182b17123f3 (diff)
downloadnextcloud-server-5567b6cee229c0380d243d1697f926d02db1a3e8.tar.gz
nextcloud-server-5567b6cee229c0380d243d1697f926d02db1a3e8.zip
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.
Diffstat (limited to 'core')
-rw-r--r--core/js/sharedialogshareelistview.js8
1 files changed, 5 insertions, 3 deletions
diff --git a/core/js/sharedialogshareelistview.js b/core/js/sharedialogshareelistview.js
index dfe5789e774..daed8a439bb 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');