summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorJan-Christoph Borchardt <hey@jancborchardt.net>2017-04-12 15:04:12 +0200
committerJan-Christoph Borchardt <hey@jancborchardt.net>2017-04-12 15:04:12 +0200
commit37145a275f9188290afa38683216c860aea00f91 (patch)
tree341141bdce54d4aaab4002ce87242a40a647d3ab /core
parentaf42ca20252b166bec2da34970137ec790a18328 (diff)
downloadnextcloud-server-37145a275f9188290afa38683216c860aea00f91.tar.gz
nextcloud-server-37145a275f9188290afa38683216c860aea00f91.zip
Fix AdBlock blocking share icon, ref #866
Signed-off-by: Jan-Christoph Borchardt <hey@jancborchardt.net>
Diffstat (limited to 'core')
-rw-r--r--core/css/icons.scss6
-rw-r--r--core/css/inputs.scss5
-rw-r--r--core/js/share.js12
3 files changed, 11 insertions, 12 deletions
diff --git a/core/css/icons.scss b/core/css/icons.scss
index d6a03b3187b..1ca29f22600 100644
--- a/core/css/icons.scss
+++ b/core/css/icons.scss
@@ -326,14 +326,12 @@ img, object, video, button, textarea, input, select {
background-image: url('../img/actions/settings-white.svg?v=1');
}
+/* always use icon-shared, AdBlock blocks icon-share */
+.icon-shared,
.icon-share {
background-image: url('../img/actions/share.svg?v=1');
}
-.icon-shared {
- background-image: url('../img/actions/shared.svg?v=1');
-}
-
.icon-sound {
background-image: url('../img/actions/sound.svg?v=1');
}
diff --git a/core/css/inputs.scss b/core/css/inputs.scss
index 13a164e13f2..e76e5bea150 100644
--- a/core/css/inputs.scss
+++ b/core/css/inputs.scss
@@ -206,6 +206,7 @@ input {
height: 1px;
overflow: hidden;
+ label {
+ padding: 6px 0;
user-select: none;
}
&:disabled + label,
@@ -219,8 +220,8 @@ input {
width: 12px;
vertical-align: middle;
border-radius: 50%;
- margin: 3px;
- margin-top: 1px;
+ margin: 6px;
+ margin-top: -2px;
border: 1px solid nc-lighten($color-main-text, 53%);
}
&:not(:disabled):not(:checked) + label:hover:before,
diff --git a/core/js/share.js b/core/js/share.js
index ba1afe08190..262d0a5d166 100644
--- a/core/js/share.js
+++ b/core/js/share.js
@@ -107,7 +107,7 @@ OC.Share = _.extend(OC.Share || {}, {
}
// TODO: iterating over the files might be more efficient
for (item in OC.Share.statuses){
- var iconClass = 'icon-share';
+ var iconClass = 'icon-shared';
var data = OC.Share.statuses[item];
var hasLink = data.link;
// Links override shared in terms of icon display
@@ -115,7 +115,7 @@ OC.Share = _.extend(OC.Share || {}, {
iconClass = 'icon-public';
}
if (itemType !== 'file' && itemType !== 'folder') {
- $('a.share[data-item="'+item+'"] .icon').removeClass('icon-share icon-public').addClass(iconClass);
+ $('a.share[data-item="'+item+'"] .icon').removeClass('icon-shared icon-public').addClass(iconClass);
} else {
// TODO: ultimately this part should be moved to files_sharing app
var file = $fileList.find('tr[data-id="'+item+'"]');
@@ -173,12 +173,12 @@ OC.Share = _.extend(OC.Share || {}, {
}
} else if (OC.Share.itemShares[index].length > 0) {
shares = true;
- iconClass = 'icon-share';
+ iconClass = 'icon-shared';
}
}
});
if (itemType != 'file' && itemType != 'folder') {
- $('a.share[data-item="'+itemSource+'"] .icon').removeClass('icon-share icon-public').addClass(iconClass);
+ $('a.share[data-item="'+itemSource+'"] .icon').removeClass('icon-shared icon-public').addClass(iconClass);
} else {
var $tr = $('tr').filterAttr('data-id', String(itemSource));
if ($tr.length > 0) {
@@ -262,7 +262,7 @@ OC.Share = _.extend(OC.Share || {}, {
var recipients;
var owner = $tr.attr('data-share-owner');
var shareFolderIcon;
- var iconClass = 'icon-share';
+ var iconClass = 'icon-shared';
action.removeClass('shared-style');
// update folder icon
if (type === 'dir' && (hasShares || hasLink || owner)) {
@@ -312,7 +312,7 @@ OC.Share = _.extend(OC.Share || {}, {
if (hasLink) {
iconClass = 'icon-public';
}
- icon.removeClass('icon-share icon-public').addClass(iconClass);
+ icon.removeClass('icon-shared icon-public').addClass(iconClass);
},
/**
*