Made tabs open before study loads. Added study loading indicator
This commit is contained in:
parent
814e6f7741
commit
b5f94412fa
@ -1,5 +1,5 @@
|
||||
<template name="viewer">
|
||||
<div id="viewer" class="viewer">
|
||||
<div id="viewer">
|
||||
{{ >lesionDialog }}
|
||||
{{ >hidingPanel }}
|
||||
<div id="viewportAndLesionTable">
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
.viewer
|
||||
#viewer
|
||||
width: 100%
|
||||
height: 100%
|
||||
margin: 0
|
||||
|
||||
@ -5,6 +5,11 @@ function defaultHangingProtocol(inputData) {
|
||||
var viewportRows = inputData.viewportRows;
|
||||
var viewportColumns = inputData.viewportColumns;
|
||||
|
||||
if (!studies.length) {
|
||||
log.warn("No studies provided to Hanging Protocol");
|
||||
return;
|
||||
}
|
||||
|
||||
// This is the most basic hanging protocol.
|
||||
var stacks = [];
|
||||
studies.forEach(function(study) {
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
.loadingTextDiv
|
||||
margin: 30px
|
||||
|
||||
h5
|
||||
text-align: center
|
||||
@ -1,4 +1,5 @@
|
||||
<template name="tabContent">
|
||||
<div role="tabpanel" class="tab-pane {{active}}" id="{{contentid}}">
|
||||
{{ >loadingText }}
|
||||
</div>
|
||||
</template>
|
||||
4
Packages/worklist/components/tabContent/tabContent.styl
Normal file
4
Packages/worklist/components/tabContent/tabContent.styl
Normal file
@ -0,0 +1,4 @@
|
||||
.tab-pane
|
||||
.loadingTextDiv
|
||||
h5
|
||||
color: #777
|
||||
@ -1 +1,4 @@
|
||||
|
||||
.tabTitle
|
||||
button.close
|
||||
// Prevent blue glow around button in Chrome
|
||||
outline: none
|
||||
@ -54,6 +54,8 @@ switchToTab = function(contentId) {
|
||||
|
||||
Session.set('studies', data.studies);
|
||||
|
||||
// Remove the loading text template that is inside by default
|
||||
container.innerHTML = "";
|
||||
UI.renderWithData(Template.viewer, data, container);
|
||||
var imageViewer = $("#viewer");
|
||||
if (imageViewer) {
|
||||
@ -67,24 +69,20 @@ switchToTab = function(contentId) {
|
||||
};
|
||||
|
||||
|
||||
openNewTab = function(studyInstanceUid) {
|
||||
getStudyMetadata(studyInstanceUid, function(study) {
|
||||
var title = study.seriesList[0].instances[0].patientName;
|
||||
var contentid = generateUUID();
|
||||
openNewTab = function(studyInstanceUid, title) {
|
||||
var contentid = generateUUID();
|
||||
var data = {
|
||||
title: title,
|
||||
contentid: contentid,
|
||||
};
|
||||
tabs.insert(data);
|
||||
|
||||
var data = {
|
||||
title: title,
|
||||
contentid: contentid,
|
||||
};
|
||||
tabs.insert(data);
|
||||
|
||||
ViewerData[contentid] = {
|
||||
title: title,
|
||||
contentid: contentid,
|
||||
studyInstanceUid: studyInstanceUid
|
||||
};
|
||||
switchToTab(contentid);
|
||||
});
|
||||
ViewerData[contentid] = {
|
||||
title: title,
|
||||
contentid: contentid,
|
||||
studyInstanceUid: studyInstanceUid
|
||||
};
|
||||
switchToTab(contentid);
|
||||
};
|
||||
|
||||
Template.worklist.onRendered(function() {
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
Template.worklistStudy.events({
|
||||
'click': function () {
|
||||
openNewTab(this.studyInstanceUid);
|
||||
openNewTab(this.studyInstanceUid, this.patientName);
|
||||
}
|
||||
});
|
||||
@ -29,6 +29,7 @@ Package.onUse(function (api) {
|
||||
api.addFiles('components/tabTitle/tabTitle.styl', 'client');
|
||||
|
||||
api.addFiles('components/tabContent/tabContent.html', 'client');
|
||||
api.addFiles('components/tabContent/tabContent.styl', 'client');
|
||||
|
||||
api.addFiles('components/worklistStudy/worklistStudy.html', 'client');
|
||||
api.addFiles('components/worklistStudy/worklistStudy.js', 'client');
|
||||
|
||||
Loading…
Reference in New Issue
Block a user