summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--apps/files_sharing/css/sharetabview.css8
-rw-r--r--core/js/sharedialoglinkshareview.js31
2 files changed, 26 insertions, 13 deletions
diff --git a/apps/files_sharing/css/sharetabview.css b/apps/files_sharing/css/sharetabview.css
index 5896e18abad..6fd2b9b3165 100644
--- a/apps/files_sharing/css/sharetabview.css
+++ b/apps/files_sharing/css/sharetabview.css
@@ -28,8 +28,16 @@
padding: 14px;
}
+/* fix the popup menu because the button is shifted and then the menu is not aligned */
+.shareTabView .popovermenu.socialSharingMenu {
+ right: -7px;
+}
+
.shareTabView .popovermenu .clipboardButton {
position: relative;
+ top: initial;
+ right: initial;
+ padding: 18px 0 18px 36px;
}
.shareTabView label {
diff --git a/core/js/sharedialoglinkshareview.js b/core/js/sharedialoglinkshareview.js
index dc8644ab4cd..e7bea516be0 100644
--- a/core/js/sharedialoglinkshareview.js
+++ b/core/js/sharedialoglinkshareview.js
@@ -70,22 +70,21 @@
'{{/if}}'
;
var TEMPLATE_POPOVER_MENU =
- '<div class="popovermenu bubble hidden menu">' +
+ '<div class="popovermenu bubble hidden menu socialSharingMenu">' +
'<ul>' +
'<li>' +
- '<span class="shareOption menuitem">' +
- '<button class="icon clipboardButton icon-clippy"' +
- 'data-clipboard-target="#linkText-{{cid}}">{{copyLabel}}' +
- '</button>' +
- '</span>' +
+ '<a href="#" class="shareOption menuitem clipboardButton" data-clipboard-target="#linkText-{{cid}}">' +
+ '<span class="icon icon-clippy" ></span>' +
+ '<span>{{copyLabel}}</span>' +
+ '</a>' +
'</li>' +
'{{#each social}}' +
'<li>' +
- '<span class="shareOption menuitem">' +
- '<button class="icon {{iconClass}} pop-up"' +
- 'data-url="{{url}}">{{label}}' +
- '</button>' +
- '</span>' +
+ '<a href="#" class="shareOption menuitem pop-up" data-url="{{url}}">' +
+ '<span class="icon {{iconClass}}"' +
+ '></span><span>{{label}}' +
+ '</span>' +
+ '</a>' +
'</li>' +
'{{/each}}' +
'</ul>' +
@@ -173,6 +172,9 @@
var clipboard = new Clipboard('.clipboardButton');
clipboard.on('success', function(e) {
+ event.preventDefault();
+ event.stopPropagation();
+
var $input = $(e.trigger);
$input.tooltip('hide')
.attr('data-original-title', t('core', 'Copied!'))
@@ -489,8 +491,11 @@
},
onPopUpClick: function(event) {
- var url = $(event.target).data('url');
- $(event.target).tooltip('hide');
+ event.preventDefault();
+ event.stopPropagation();
+
+ var url = $(event.currentTarget).data('url');
+ $(event.currentTarget).tooltip('hide');
if (url) {
var width = 600;
var height = 400;