Made tabs open before study loads. Added study loading indicator
This commit is contained in:
1 parent
814e6f7741
commit
b5f94412fa
10 files changed
+34
-21
No files matched your search
@@ -1,4 +1,5 @@
|
||||
<template name="tabContent">
|
||||
<div role="tabpanel" class="tab-pane {{active}}" id="{{contentid}}">
|
||||
{{ >loadingText }}
|
||||
</div>
|
||||
</template>
|
||||
@@ -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');
|
||||
|
||||
Reference in new issue
Block a user