diff options
Diffstat (limited to 'core/js/share.js')
-rw-r--r-- | core/js/share.js | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/core/js/share.js b/core/js/share.js index 1c96cfa2232..810a4e7c0a5 100644 --- a/core/js/share.js +++ b/core/js/share.js @@ -32,7 +32,18 @@ OC.Share={ }, loadItem:function(itemType, itemSource) { var data = ''; - if (typeof OC.Share.statuses[itemSource] === 'undefined') { + // Switch file sources to path to check if status is set + if (itemType == 'file' || itemType == 'folder') { + var filename = $('tr').filterAttr('data-id', String(itemSource)).data('file'); + if ($('#dir').val() == '/') { + var item = $('#dir').val() + filename; + } else { + var item = $('#dir').val() + '/' + filename; + } + } else { + var item = itemSource; + } + if (typeof OC.Share.statuses[item] === 'undefined') { checkShares = false; } else { checkShares = true; |