diff options
author | Vincent Petry <pvince81@owncloud.com> | 2015-10-28 17:43:36 +0100 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2015-10-29 12:59:51 +0100 |
commit | 9c9158e6b78c69835cb7280810819fb2cd6f84f7 (patch) | |
tree | 8045f5e8fb80aa377c68d7ba7f0ac498b2475c72 /core/js/share.js | |
parent | 92e63a802c9324ccfcd716bb0461f5b7cc153549 (diff) | |
download | nextcloud-server-9c9158e6b78c69835cb7280810819fb2cd6f84f7.tar.gz nextcloud-server-9c9158e6b78c69835cb7280810819fb2cd6f84f7.zip |
Fix icon update to be more consistent
Makes the details bar show the same icon as in the list.
Diffstat (limited to 'core/js/share.js')
-rw-r--r-- | core/js/share.js | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/core/js/share.js b/core/js/share.js index 1131ae8f112..e14e19a2543 100644 --- a/core/js/share.js +++ b/core/js/share.js @@ -253,14 +253,25 @@ OC.Share = _.extend(OC.Share || {}, { // update folder icon if (type === 'dir' && (hasShares || hasLink || owner)) { if (hasLink) { - shareFolderIcon = OC.imagePath('core', 'filetypes/folder-public'); + shareFolderIcon = OC.MimeType.getIconUrl('dir-public'); } else { - shareFolderIcon = OC.imagePath('core', 'filetypes/folder-shared'); + shareFolderIcon = OC.MimeType.getIconUrl('dir-shared'); } $tr.find('.filename .thumbnail').css('background-image', 'url(' + shareFolderIcon + ')'); + $tr.attr('data-icon', shareFolderIcon); } else if (type === 'dir') { - shareFolderIcon = OC.imagePath('core', 'filetypes/folder'); + 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 (mountType && mountType.indexOf('external') === 0) { + shareFolderIcon = OC.MimeType.getIconUrl('dir-external'); + $tr.attr('data-icon', shareFolderIcon); + } else { + shareFolderIcon = OC.MimeType.getIconUrl('dir'); + // back to default + $tr.removeAttr('data-icon'); + } $tr.find('.filename .thumbnail').css('background-image', 'url(' + shareFolderIcon + ')'); } // update share action text / icon |