mirror of
https://github.com/humhub/humhub.git
synced 2025-01-17 14:18:27 +01:00
Fix: File preview not visible if initialized in background
This commit is contained in:
parent
6445f151cf
commit
9cad6a8196
@ -353,7 +353,8 @@ humhub.module('file', function (module, require, $) {
|
|||||||
that.add(file)
|
that.add(file)
|
||||||
});
|
});
|
||||||
|
|
||||||
if(!this.$.find('.file-preview-item:visible').length) {
|
// Note we are not using :visible since the preview itself may not visible on init
|
||||||
|
if(!this.$.find('.file-preview-item:not(.hiddenFile)').length) {
|
||||||
this.$.hide();
|
this.$.hide();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -406,6 +407,8 @@ humhub.module('file', function (module, require, $) {
|
|||||||
|
|
||||||
if(!(this.isMedia(file) && this.options.excludeMediaFilesPreview)) {
|
if(!(this.isMedia(file) && this.options.excludeMediaFilesPreview)) {
|
||||||
$file.fadeIn();
|
$file.fadeIn();
|
||||||
|
} else {
|
||||||
|
$file.addClass('hiddenFile');
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -94,7 +94,7 @@ class FilePreview extends JsWidget
|
|||||||
'prevent-popover' => $this->preventPopover,
|
'prevent-popover' => $this->preventPopover,
|
||||||
'popover-position' => $this->popoverPosition,
|
'popover-position' => $this->popoverPosition,
|
||||||
'file-edit' => $this->edit,
|
'file-edit' => $this->edit,
|
||||||
'exclude-media-files-preview' => $this->excludeMediaFilesPreview
|
'exclude-media-files-preview' => (int) $this->excludeMediaFilesPreview
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user