Closed sebawagner closed 4 years ago
BTW Your download button looks weird :( It looks like this for me:
i.e. the caret occupies much less space
I think you need to flush your browser cache or rebuild. What browser are you using?
On Sat, 18 Apr 2020 at 14:37, Maxim Solodovnik notifications@github.com wrote:
BTW Your download button looks weird :( It looks like this for me:
[image: Screenshot from 2020-04-18 09-35-56] https://user-images.githubusercontent.com/3870591/79626143-135a1f80-8158-11ea-9fb3-1b3f69f106da.png
i.e. the caret occupies much less space
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/apache/openmeetings/pull/63#issuecomment-615542484, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABHJ2QGCRQFBNAGWF6K3RSTRNEG7PANCNFSM4MLDHQUA .
-- Sebastian Wagner https://twitter.com/#!/dead_lock seba.wagner@gmail.com
It looks like this in all my browsers (Chrome, Chromium, FF) Also ca be checked here https://getbootstrap.com/docs/4.4/components/dropdowns/
@solomax I added a comment and demo of the issue in: https://issues.apache.org/jira/browse/OPENMEETINGS-2273
But I'm not sure on how to fix the issue anymore, since like you mentioned: We don't know the original file extension since user can rename file. So how would it work at all ?
Hello @sebawagner,
As i noted before:
Due to above
The logic was following: File folder for
IMAGE
contains
- original image
- ** image as
PNG
(will be the same if image uploaded wasPNG
) So to get Original we should list files and filterPNG
:))File folder for
PRESENTATION
contains
- original documment
- list of pages as
PNG
So to get Original we should list files and filterPNG
and
The above method has obvious limitation: it will not work if original file was PDF
so to fix download issue for PDF I would do the following:
public final File getOriginal() {
File f = getFile(null);
if (f != null) {
File p = f.getParentFile();
if (p != null && p.exists()) {
File original = null;
File[] ff = p.listFiles(new OriginalFilter());
if (ff != null && ff.length > 0) {
original = ff[0];
}
if (original == null) {
if (Type.PRESENTATION == type) {
f = getFile(EXTENSION_PDF);
}
} else {
f = original;
}
}
}
return f;
}
i.e. if type is PRESENTATION
and original wasn't found - get PDF
does it make sense?
Please see https://github.com/apache/openmeetings/pull/64 Lets split this discussion on UI vs download into separated PRs. And if I manage to add some Unit tests would also be good.
Fixes OPENMEETINGS-2273
New default view of the panel without selecting anything:
When selecting a file it enables the download button:
This won't fix the dropdown next to the button: