From 880569196a9e50ab00675baebe712bb8ebc3aef8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Elo=C3=ADzio=20Salgado?= Date: Tue, 15 Nov 2016 15:44:10 -0200 Subject: [PATCH] LT-335: Add loading screen prior to display in Viewer --- Packages/ohif-study-list/client/lib/switchToTab.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Packages/ohif-study-list/client/lib/switchToTab.js b/Packages/ohif-study-list/client/lib/switchToTab.js index 59c0760a6..e5946d7ff 100644 --- a/Packages/ohif-study-list/client/lib/switchToTab.js +++ b/Packages/ohif-study-list/client/lib/switchToTab.js @@ -61,6 +61,13 @@ switchToTab = function(contentId) { return; } + var container = $('.tab-content').find('#viewerTab').get(0); + container.innerHTML = ''; + + // Use Blaze to render the Loading Template into the container + // viewStudiesInTab will clear this container + Blaze.renderWithData(Template.loadingText, {}, container); + var studies = ViewerData[contentId].studies; if (studies) { @@ -74,6 +81,7 @@ switchToTab = function(contentId) { // Attempt to retrieve the meta data (it might be cached) OHIF.studylist.getStudiesMetadata(studyInstanceUids, function(studies) { viewStudiesInTab(contentId, studies); + Session.set('GettingStudyMetadata', false); }); } };