Cleaned up dialog styles (OHIF-49) and duplicate calls to Worklist Search (credit to @mdg583)

This commit is contained in:
Erik Ziegler committed 2016-08-03 23:19:13 +02:00
1 parent 7d4c76ddb0
commit 1a264f81e5
32 files changed
+240 -197

No files matched your search

@@ -6,6 +6,8 @@ Template.tabTitle.events({
* @param e The click event used to close the tab
*/
'click .close': function(e) {
console.log('click .close');
// Identify the tab title DOM node
var tab = $(e.currentTarget).parents('a[data-toggle="tab"]').eq(0);
@@ -30,10 +30,11 @@ Template.worklist.onRendered(() => {
} else {
// If there is a tab set as active in the Session,
// switch to that now.
console.log('worklist onRendered');
const contentId = Session.get('activeContentId');
// TODO: FIx this it seems to be forcing two switches
switchToTab(contentId);
if (contentId !== 'worklistTab') {
switchToTab(contentId);
}
}
Meteor.subscribe('hangingprotocols');
@@ -15,31 +15,29 @@
<div id="studyListContainer">
<table id="tblStudyList" class="worklistResult table noselect">
<thead>
<tr>
<th>
<div id="_patientName" class="sortingCell">
<span>Patient Name</span>
<i class="{{sortingColumnsIcons.patientName}}">&nbsp;</i>
</div>
<input type="text"
class="form-control worklist-search"
id="patientName"
placeholder="Patient Name">
</th>
<th>
<div id="_patientId" class="sortingCell">
<span>MRN</span>
<i class="{{sortingColumnsIcons.patientId}}">&nbsp;</i>
</div>
<input type="text"
class="form-control worklist-search"
id="patientId"
placeholder="MRN">
</th>
{{#unless isTouchDevice}}
<th>
<div id="_accessionNumber" class="sortingCell">
<tr>
<th class="patientName">
<div id="_patientName" class="sortingCell">
<span>Patient Name</span>
<i class="{{sortingColumnsIcons.patientName}}">&nbsp;</i>
</div>
<input type="text"
class="form-control worklist-search"
id="patientName"
placeholder="Patient Name">
</th>
<th class="patientId">
<div id="_patientId" class="sortingCell">
<span>MRN</span>
<i class="{{sortingColumnsIcons.patientId}}">&nbsp;</i>
</div>
<input type="text"
class="form-control worklist-search"
id="patientId"
placeholder="MRN">
</th>
<th class="accessionNumber">
<div id="_accessionNumber" class="sortingCell ">
<span>Accession #</span>
<i class="{{sortingColumnsIcons.accessionNumber}}">&nbsp;</i>
</div>
@@ -48,22 +46,18 @@
id="accessionNumber"
placeholder="Accession #">
</th>
{{/unless}}
<th>
<div id="_studyDate" class="sortingCell">
<span>Study Date</span>
<i class="{{sortingColumnsIcons.studyDate}}">&nbsp;</i>
</div>
<input type="text"
class="form-control worklist-search"
name="daterange"
id="studyDate"
placeholder="Study Date">
</th>
{{#unless isTouchDevice}}
<th>
<th class="studyDate">
<div id="_studyDate" class="sortingCell">
<span>Study Date</span>
<i class="{{sortingColumnsIcons.studyDate}}">&nbsp;</i>
</div>
<input type="text"
class="form-control worklist-search"
name="daterange"
id="studyDate"
placeholder="Study Date">
</th>
<th class="modalities">
<div id="_modalities" class="sortingCell">
<span>Modality</span>
<i class="{{sortingColumnsIcons.modalities}}">&nbsp;</i>
@@ -73,28 +67,24 @@
id="modality"
placeholder="Modality">
</th>
{{/unless}}
<th>
<div id="_studyDescription" class="sortingCell">
<span>Study Description</span>
<i class="{{sortingColumnsIcons.studyDescription}}">&nbsp;</i>
</div>
<input type="text"
class="form-control worklist-search"
id="studyDescription"
placeholder="Study Description">
</th>
{{#unless isTouchDevice}}
<th>
<div id="_numberOfStudyRelatedInstances" class="sortingCell">
<span># Images</span>
<i class="{{sortingColumnsIcons.numberOfStudyRelatedInstances}}">&nbsp;</i>
</div>
<input type="text" class="form-control worklist-search invisible"/>
</th>
{{/unless}}
</tr>
<th class="studyDescription">
<div id="_studyDescription" class="sortingCell">
<span>Study Description</span>
<i class="{{sortingColumnsIcons.studyDescription}}">&nbsp;</i>
</div>
<input type="text"
class="form-control worklist-search"
id="studyDescription"
placeholder="Study Description">
</th>
<th class="numberOfStudyRelatedInstances">
<div id="_numberOfStudyRelatedInstances" class="sortingCell">
<span># Images</span>
<i class="{{sortingColumnsIcons.numberOfStudyRelatedInstances}}">&nbsp;</i>
</div>
<input type="text" class="form-control worklist-search invisible"/>
</th>
</tr>
</thead>
<tbody id="studyListData">
{{#each studies}}
@@ -102,12 +92,12 @@
{{/each}}
</tbody>
</table>
{{#if showLoadingText}}
{{#if session "showLoadingText"}}
{{>loadingText}}
{{/if}}
{{#if showNotFoundMessage}}
{{#unless numberOfStudies}}
<div class="notFound">No matching results</div>
{{/if}}
{{/unless}}
</div>
</template>
@@ -1,7 +1,4 @@
Session.setDefault('searchResults', {
showLoadingText: true,
showNotFoundMessage: false
});
Session.setDefault('showLoadingText', true);
Template.worklistResult.helpers({
/**
@@ -28,14 +25,6 @@ Template.worklistResult.helpers({
return WorklistStudies.find().count();
},
showLoadingText() {
return Session.get('searchResults').showLoadingText;
},
showNotFoundMessage() {
return Session.get('searchResults').showNotFoundMessage;
},
sortingColumnsIcons() {
const instance = Template.instance();
@@ -116,18 +105,19 @@ function convertStringToStudyDate(dateStr) {
* Inserts the identified studies into the WorklistStudies Collection
*/
function search() {
console.log('search()');
// Show loading message
let searchResults = Session.get('searchResults');
searchResults.showLoadingText = true;
searchResults.showNotFoundMessage = false;
Session.set('searchResults', searchResults);
Session.set('showLoadingText', true);
// Create the filters to be used for the Worklist Search
filter = {
patientName: getFilter($('input#patientName').val()),
patientId: getFilter($('input#patientId').val()),
accessionNumber: getFilter($('input#accessionNumber').val()),
studyDescription: getFilter($('input#studyDescription').val())
studyDescription: getFilter($('input#studyDescription').val()),
studyDateFrom: studyDateFrom,
studyDateTo: studyDateTo
};
// Make sure that modality has a reasonable value, since it is occasionally
@@ -138,14 +128,14 @@ function search() {
WorklistStudies.remove({});
Meteor.call('WorklistSearch', filter, (error, studies) => {
console.log('WorklistSearch');
if (error) {
log.warn(error);
return;
}
// Hide loading text
searchResults.showLoadingText = false;
Session.set('searchResults', searchResults);
Session.set('showLoadingText', false);
if (!studies) {
return;
@@ -165,13 +155,6 @@ function search() {
WorklistStudies.insert(study);
}
});
if (WorklistStudies.find().count() === 0) {
// Show studyNotFound text
searchResults.showNotFoundMessage = true;
Session.set('searchResults', searchResults);
}
});
}
@@ -180,9 +163,6 @@ Template.worklistResult.onCreated(() => {
instance.sortOption = new ReactiveVar();
instance.sortingColumns = new ReactiveDict();
// Retrieve all studies
search();
// Set sortOption
const sortOptionSession = Session.get('sortOption');
if (sortOptionSession) {
@@ -217,6 +197,9 @@ Template.worklistResult.onRendered(() => {
'Last 30 Days': [moment().subtract(29, 'days'), moment()]
}
});
// Retrieve all studies
search();
});
function resetSortingColumns(instance, sortingColumn) {
@@ -50,6 +50,7 @@ $bodyCellHeight = 40px
width: 100%
padding: 0 $tablePadding
position: absolute
overflow: hidden
z-index: 2
.loadingTextDiv
@@ -117,6 +118,7 @@ $bodyCellHeight = 40px
box-sizing: border-box
transition(all 0.15s ease)
placeholder-color($inputPlaceholderColor)
&.invisible
visibility: hidden
@@ -124,20 +126,6 @@ $bodyCellHeight = 40px
&:active, &:hover
background-color: $inputBackgroundColor
&::-webkit-input-placeholder /* WebKit, Blink, Edge */
color: $inputPlaceholderColor
&:-moz-placeholder /* Mozilla Firefox 4 to 18 */
color: $inputPlaceholderColor
opacity: 1
&::-moz-placeholder /* Mozilla Firefox 19+ */
color: $inputPlaceholderColor
opacity: 1
&:-ms-input-placeholder /* Internet Explorer 10-11 */
color: $inputPlaceholderColor
::-webkit-datetime-edit-year-field:not([aria-valuenow]),
::-webkit-datetime-edit-month-field:not([aria-valuenow]),
::-webkit-datetime-edit-day-field:not([aria-valuenow])
@@ -176,3 +164,29 @@ $bodyCellHeight = 40px
border-top: 1px solid #436270
border-bottom: 1px solid #436270
background-color: $hoverColor
@media only screen and (max-width: 1000px)
$tablePaddingMediumScreen = 10px
#studyListContainer
padding: 0
table#tblStudyList
thead > tr > th
&:first-child
padding-left: $tablePaddingMediumScreen
&:last-child
padding-right: $tablePaddingMediumScreen
tbody > tr > td
&:first-child
padding-left: $tablePaddingMediumScreen
&:last-child
padding-right: $tablePaddingMediumScreen
th.accessionNumber, td.accessionNumber,
th.modalities, td.modalities,
th.numberOfStudyRelatedInstances, td.numberOfStudyRelatedInstances
display: none
@@ -1,31 +1,25 @@
<template name="worklistStudy">
<tr class="worklistStudy noselect">
<td>
<td class="patientName">
{{formatPN patientName}}
</td>
<td>
<td class="patientId">
{{patientId}}
</td>
{{#unless isTouchDevice}}
<td>
<td class="accessionNumber">
{{accessionNumber}}
</td>
{{/unless}}
<td>
<td class="studyDate">
{{formatDA studyDate}}
</td>
{{#unless isTouchDevice}}
<td>
<td class="modalities">
{{modalities}}
</td>
{{/unless}}
<td>
<td class="studyDescription">
{{studyDescription}}
</td>
{{#unless isTouchDevice}}
<td>
<td class="numberOfStudyRelatedInstances">
{{numberOfStudyRelatedInstances}}
</td>
{{/unless}}
</tr>
</template>