Remove some subscription / reactivity / caching bugs and the unnecessary PatientLocations collection

This commit is contained in:
Erik Ziegler committed 2016-02-10 16:38:49 +01:00
1 parent 7d42456f57
commit 9cde04bcfe
43 files changed
+321 -234

No files matched your search

@@ -1,5 +1,10 @@
<template name="tabContent">
<div role="tabpanel" class="tab-pane {{active}}" id="{{contentid}}">
{{ >loadingText }}
{{>loadingText}}
<div class="viewerContainer">
<!-- This extra viewerContainer div only exists to be destroyed when switching tabs.
It is a workaround because Meteor's onDestroyed and destruction handlers don't fire
when removing the actual template from the DOM.-->
</div>
</div>
</template>
@@ -1,4 +1,8 @@
.tab-pane
.loadingTextDiv
h5
color: #777
color: #777
.viewerContainer
height: 100%
width: 100%
@@ -7,9 +7,9 @@
{{ >tabTitle }}
{{ /each }}
</ul>
<div class="tab-content">
<div id="worklistTabs" class="tab-content">
<div role="tabpanel" class="tab-pane active" id="worklistTab">
<div id="worklistContainer" class="container">
<div class="worklistContainer">
{{> worklistResult }}
</div>
</div>
@@ -11,20 +11,13 @@ ViewerData = Session.get('ViewerData') || {};
// Create the WorklistTabs collection
WorklistTabs = new Meteor.Collection(null);
WorklistTabs._debugName = 'WorklistTabs';
// Define the WorklistStudies Collection
// This is a client-side only Collection which
// Stores the list of studies in the Worklist
WorklistStudies = new Meteor.Collection(null);
Template.worklist.onCreated(function() {
var self = this;
if (Worklist.subscriptions) {
Worklist.subscriptions.forEach(function(collectionName) {
self.subscribe(collectionName);
});
}
});
WorklistStudies._debugName = 'WorklistStudies';
Template.worklist.onRendered(function() {
// If there is a tab set as active in the Session,
@@ -9,37 +9,18 @@ body
-ms-user-select: none
user-select: none
input.worklist-search
height: 25px
background-color: #888888
width: 100%
#tblStudyList
tr
height: 20px
.patient-name-input
width: 100%
.worklist-input
width: 100%
.modality-input
width: 100%
.patientid-input
width: 100%
.study-description-input
width: 100%
#worklistTab
background-color: #202020
#worklistContainer
.worklistContainer
background-color: #202020
margin: 0 auto
color: white
width:90%
width: 90%
padding-top: 10px
#tabs
@@ -99,7 +80,7 @@ input.worklist-search
.tab-content
width: 100%
height: calc(100% - 91px)
.tab-pane
width: 100%
height: 100%
@@ -1,5 +1,5 @@
<template name="worklistResult">
<table id="tblStudyList" class="table table-striped noselect">
<table id="tblStudyList" class="worklistResult table table-striped noselect">
<thead>
<tr>
<th>
@@ -115,6 +115,20 @@ function search() {
});
}
Template.worklistResult.onCreated(function() {
console.log('WorklistResult onCreated!');
var self = this;
if (Worklist.subscriptions) {
Worklist.subscriptions.forEach(function(collectionName) {
self.subscribe(collectionName);
});
}
});
Template.worklistResult.onDestroyed(function() {
console.log('WorklistResult onDestroyed!');
});
Template.worklistResult.events({
'keydown input': function(e) {
if (e.which === 13) { // Enter
@@ -15,8 +15,14 @@ table#tblStudyList
#numImages.worklist-search, #modality.worklist-search
visibility: hidden
input.worklist-search
height: 25px
background-color: #888888
width: 100%
tbody
tr
height: 20px
padding: 4px
border: 1px solid #282828
background-color: black
@@ -1,5 +1,6 @@
// Maybe we should use regular Worklist collection?
WorklistSelectedStudies = new Meteor.Collection(null);
WorklistSelectedStudies._debugName = 'WorklistSelectedStudies';
function handleShiftClick(studyRow, data) {
log.info('shiftKey');