summaryrefslogtreecommitdiffstats
path: root/core/js
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2017-03-14 22:50:32 -0600
committerMorris Jobke <hey@morrisjobke.de>2017-03-14 22:52:28 -0600
commit13aae43d89389d19b750ff036294e5c2e61f9d8d (patch)
tree24b05aea18bfd90644b38335d97c4d40aae6cacd /core/js
parentbe45d6aac9e02890fd162bd2fca4239c4e39bd06 (diff)
downloadnextcloud-server-13aae43d89389d19b750ff036294e5c2e61f9d8d.tar.gz
nextcloud-server-13aae43d89389d19b750ff036294e5c2e61f9d8d.zip
Fix layout of sharing buttons
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'core/js')
-rw-r--r--core/js/sharedialoglinkshareview.js31
1 files changed, 18 insertions, 13 deletions
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;