summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Gapczynski <mtgap@owncloud.com>2012-10-28 16:36:17 -0400
committerMichael Gapczynski <mtgap@owncloud.com>2012-10-28 16:36:17 -0400
commite5a74903e453e0628a1544ddc37ee05454a38462 (patch)
treeacbfadd3b98c1d7dad22846cabb9461a3292feb6
parent60e5054ae8bd5e85e6116e52a3de311c71b8b453 (diff)
downloadnextcloud-server-e5a74903e453e0628a1544ddc37ee05454a38462.tar.gz
nextcloud-server-e5a74903e453e0628a1544ddc37ee05454a38462.zip
Try to fix shared status icons again
-rw-r--r--core/js/share.js15
1 files changed, 5 insertions, 10 deletions
diff --git a/core/js/share.js b/core/js/share.js
index c9b3a4288ac..73c74a7cb6d 100644
--- a/core/js/share.js
+++ b/core/js/share.js
@@ -21,9 +21,12 @@ OC.Share={
if (itemType != 'file' && itemType != 'folder') {
$('a.share[data-item="'+item+'"]').css('background', 'url('+image+') no-repeat center');
} else {
+ var file = $('tr').filterAttr('data-file', OC.basename(item));
+ if (file.length > 0) {
+ $(file).find('.fileactions .action').filterAttr('data-action', 'Share').find('img').attr('src', image);
+ }
var dir = $('#dir').val();
- if ($('#dir').val().length > 1) {
- console.log(item);
+ if (dir.length > 1) {
var last = '';
var path = dir;
// Search for possible parent folders that are shared
@@ -37,14 +40,6 @@ OC.Share={
last = path;
path = OC.Share.dirname(path);
}
- } else {
- var file = $('tr').filterAttr('data-file', OC.basename(item));
- if (file.length > 0) {
- var img = $(file).find('.fileactions .action').filterAttr('data-action', 'Share').find('img');
- if (img.attr('src') != OC.imagePath('core', 'actions/public')) {
- img.attr('src', image);
- }
- }
}
}
});