Merge pull request #16127 from owncloud/fix-file-icons-in-shared-file-view
Enable file icons & previews in "Shared ..." categories
This commit is contained in:
commit
46e4d8818c
|
@ -950,7 +950,8 @@
|
||||||
if (fileData.isPreviewAvailable) {
|
if (fileData.isPreviewAvailable) {
|
||||||
var iconDiv = filenameTd.find('.thumbnail');
|
var iconDiv = filenameTd.find('.thumbnail');
|
||||||
// lazy load / newly inserted td ?
|
// lazy load / newly inserted td ?
|
||||||
if (options.animate) {
|
// the typeof check ensures that the default value of animate is true
|
||||||
|
if (typeof(options.animate) === 'undefined' || !!options.animate) {
|
||||||
this.lazyLoadPreview({
|
this.lazyLoadPreview({
|
||||||
path: path + '/' + fileData.name,
|
path: path + '/' + fileData.name,
|
||||||
mime: mime,
|
mime: mime,
|
||||||
|
|
|
@ -68,6 +68,7 @@ class Local {
|
||||||
if (\OC::$server->getPreviewManager()->isMimeSupported($share['mimetype'])) {
|
if (\OC::$server->getPreviewManager()->isMimeSupported($share['mimetype'])) {
|
||||||
$share['isPreviewAvailable'] = true;
|
$share['isPreviewAvailable'] = true;
|
||||||
}
|
}
|
||||||
|
$share['icon'] = substr(\OC_Helper::mimetypeIcon($share['mimetype']), 0, -3) . 'svg';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return new \OC_OCS_Result($shares);
|
return new \OC_OCS_Result($shares);
|
||||||
|
|
|
@ -176,6 +176,7 @@
|
||||||
.map(function(share) {
|
.map(function(share) {
|
||||||
var file = {
|
var file = {
|
||||||
id: share.file_source,
|
id: share.file_source,
|
||||||
|
icon: share.icon,
|
||||||
mimetype: share.mimetype
|
mimetype: share.mimetype
|
||||||
};
|
};
|
||||||
if (share.item_type === 'folder') {
|
if (share.item_type === 'folder') {
|
||||||
|
|
Loading…
Reference in New Issue