diff --git a/apps/files/js/mainfileinfodetailview.js b/apps/files/js/mainfileinfodetailview.js index 4a2067e09e..f73b6a5556 100644 --- a/apps/files/js/mainfileinfodetailview.js +++ b/apps/files/js/mainfileinfodetailview.js @@ -186,6 +186,9 @@ this._previewManager.loadPreview(this.model, $iconDiv, $container); } else { var iconUrl = this.model.get('icon') || OC.MimeType.getIconUrl('dir'); + if (typeof this.model.get('mountType') !== 'undefined') { + iconUrl = OC.MimeType.getIconUrl('dir-' + this.model.get('mountType')) + } $iconDiv.css('background-image', 'url("' + iconUrl + '")'); } this.$el.find('[title]').tooltip({placement: 'bottom'}); diff --git a/core/js/dist/share_backend.js b/core/js/dist/share_backend.js index 9129379f20..4622fb3c6e 100644 Binary files a/core/js/dist/share_backend.js and b/core/js/dist/share_backend.js differ diff --git a/core/js/dist/share_backend.js.map b/core/js/dist/share_backend.js.map index 9701e2a424..3b07cfceb9 100644 Binary files a/core/js/dist/share_backend.js.map and b/core/js/dist/share_backend.js.map differ diff --git a/core/js/share.js b/core/js/share.js index cef05eb647..26b420ab47 100644 --- a/core/js/share.js +++ b/core/js/share.js @@ -269,22 +269,23 @@ OC.Share = _.extend(OC.Share || {}, { var message, recipients, avatars; var ownerId = $tr.attr('data-share-owner-id'); var owner = $tr.attr('data-share-owner'); + var mountType = $tr.attr('data-mounttype'); var shareFolderIcon; var iconClass = 'icon-shared'; action.removeClass('shared-style'); // update folder icon if (type === 'dir' && (hasShares || hasLink || ownerId)) { - if (hasLink) { + if (typeof mountType !== 'undefined' && mountType !== 'shared-root' && mountType !== 'shared') { + shareFolderIcon = OC.MimeType.getIconUrl('dir-' + mountType); + } else if (hasLink) { shareFolderIcon = OC.MimeType.getIconUrl('dir-public'); - } - else { + } else { shareFolderIcon = OC.MimeType.getIconUrl('dir-shared'); } $tr.find('.filename .thumbnail').css('background-image', 'url(' + shareFolderIcon + ')'); $tr.attr('data-icon', shareFolderIcon); } else if (type === 'dir') { var isEncrypted = $tr.attr('data-e2eencrypted'); - var mountType = $tr.attr('data-mounttype'); // FIXME: duplicate of FileList._createRow logic for external folder, // need to refactor the icon logic into a single code path eventually if (isEncrypted === 'true') {