From 9a5a0515f712858f17d699420abb14b602d74137 Mon Sep 17 00:00:00 2001 From: Leonid Andreev Date: Fri, 22 Sep 2017 18:28:56 -0400 Subject: [PATCH] current state of the "lazy" hack. the thumbnails and buttons should be properly rendered. (#4091) --- .../java/edu/harvard/iq/dataverse/DatasetPage.java | 7 ++++--- src/main/webapp/file-download-button-fragment.xhtml | 1 + src/main/webapp/filesFragment.xhtml | 13 +++++++------ 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/src/main/java/edu/harvard/iq/dataverse/DatasetPage.java b/src/main/java/edu/harvard/iq/dataverse/DatasetPage.java index c5ab1feacca..f849dec0be1 100644 --- a/src/main/java/edu/harvard/iq/dataverse/DatasetPage.java +++ b/src/main/java/edu/harvard/iq/dataverse/DatasetPage.java @@ -687,8 +687,8 @@ public boolean isThumbnailAvailable(FileMetadata fileMetadata) { return false; } - - + //logger.info("isThumbnailAvailable() called on file "+dataFileId); + //try{Thread.sleep(1000L);}catch(Exception e){} String thumbnailAsBase64 = ImageThumbConverter.getImageThumbnailAsBase64(fileMetadata.getDataFile(), ImageThumbConverter.DEFAULT_THUMBNAIL_SIZE); @@ -703,12 +703,13 @@ public boolean isThumbnailAvailable(FileMetadata fileMetadata) { } public String getDataFileThumbnailAsBase64(FileMetadata fileMetadata) { + //logger.info("THUMBNAIL REQUESTED FOR DATAFILE "+fileMetadata.getDataFile().getId()); return datafileThumbnailsMap.get(fileMetadata.getDataFile().getId()); } public void enableThumbnails() { pageLoadInProgress = false; - logger.fine("ENABLED thumbnails on the page."); + //logger.info("ENABLED thumbnails on the page."); } public boolean isPageLoadInProgress() { diff --git a/src/main/webapp/file-download-button-fragment.xhtml b/src/main/webapp/file-download-button-fragment.xhtml index 8c67652b23b..aeafbc0de08 100644 --- a/src/main/webapp/file-download-button-fragment.xhtml +++ b/src/main/webapp/file-download-button-fragment.xhtml @@ -138,6 +138,7 @@ diff --git a/src/main/webapp/filesFragment.xhtml b/src/main/webapp/filesFragment.xhtml index 3f628563dcf..ee87b6f38ab 100644 --- a/src/main/webapp/filesFragment.xhtml +++ b/src/main/webapp/filesFragment.xhtml @@ -374,16 +374,17 @@ + - +