LT-354: Converting to the new dialog/form structure
This commit is contained in:
parent
b3b6f91bfe
commit
6e2bef5317
@ -7,35 +7,32 @@
|
|||||||
<svg class="logoImage">
|
<svg class="logoImage">
|
||||||
<use xlink:href="/packages/ohif_viewerbase/assets/icons.svg#icon-ohif-logo"></use>
|
<use xlink:href="/packages/ohif_viewerbase/assets/icons.svg#icon-ohif-logo"></use>
|
||||||
</svg>
|
</svg>
|
||||||
<div class="logoText">
|
<div class="logoText">Open Health Imaging Foundation</div>
|
||||||
Open Health Imaging Foundation
|
|
||||||
</div>
|
|
||||||
</a>
|
</a>
|
||||||
{{ #if studyListToggleText }}
|
{{#if studyListToggleText}}
|
||||||
<a class="btn studyListLinkSection pull-left js-toggle-studyList" id="{{dasherize studyListToggleText}}-btn">
|
<a class="btn studyListLinkSection pull-left js-toggle-studyList" id="{{dasherize studyListToggleText}}-btn">
|
||||||
{{studyListToggleText}}
|
{{studyListToggleText}}
|
||||||
</a>
|
</a>
|
||||||
{{ /if }}
|
{{/if}}
|
||||||
<div class="userAccountSection pull-right">
|
<div class="userAccountSection pull-right">
|
||||||
{{>userAccountMenu}}
|
{{>userAccountMenu}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{ >timeoutCountdownDialog }}
|
{{>timeoutCountdownDialog}}
|
||||||
<div id="studylistTabs" class="tab-content">
|
<div id="studylistTabs" class="tab-content">
|
||||||
<div class="tab-pane active" id="studylistTab">
|
<div class="tab-pane active" id="studylistTab">
|
||||||
<div class="studylistContainer">
|
<div class="studylistContainer">
|
||||||
{{> studylistResult }}
|
{{>studylistResult}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="tab-pane" id="viewerTab">
|
<div class="tab-pane" id="viewerTab">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{ >optionsModal }}
|
{{>optionsModal}}
|
||||||
{{ >serverInformationModal }}
|
{{>serverInformationModal}}
|
||||||
{{ >confirmRemoveTimepointAssociation }}
|
{{>lastLoginModal}}
|
||||||
{{ >lastLoginModal }}
|
{{>progressDialog}}
|
||||||
{{ >progressDialog }}
|
{{>viewSeriesDetailsModal}}
|
||||||
{{ >viewSeriesDetailsModal }}
|
{{>themeSelectorModal}}
|
||||||
{{ >themeSelectorModal }}
|
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@ -14,7 +14,6 @@ var data = {
|
|||||||
additionalTemplates: [
|
additionalTemplates: [
|
||||||
'optionsModal',
|
'optionsModal',
|
||||||
'serverInformationModal',
|
'serverInformationModal',
|
||||||
'confirmRemoveTimepointAssociation',
|
|
||||||
'lastLoginModal',
|
'lastLoginModal',
|
||||||
'viewSeriesDetailsModal'
|
'viewSeriesDetailsModal'
|
||||||
]
|
]
|
||||||
|
|||||||
@ -16,12 +16,12 @@
|
|||||||
{{>UI.contentBlock}}
|
{{>UI.contentBlock}}
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
{{#button class='btn btn-default'
|
{{#button action='cancel'
|
||||||
action='cancel'
|
class=(concat 'btn ' (choose this.cancelClass 'btn-default'))
|
||||||
tagAttributes=(extend this.tagAttributes data-dismiss='modal')
|
tagAttributes=(extend this.tagAttributes data-dismiss='modal')
|
||||||
}}{{choose this.cancelLabel 'Cancel'}}{{/button}}
|
}}{{choose this.cancelLabel 'Cancel'}}{{/button}}
|
||||||
{{#button class='btn btn-primary'
|
{{#button action='confirm'
|
||||||
action='confirm'
|
class=(concat 'btn ' (choose this.confirmClass 'btn-primary'))
|
||||||
}}{{choose this.confirmLabel 'Confirm'}}{{/button}}
|
}}{{choose this.confirmLabel 'Confirm'}}{{/button}}
|
||||||
</div>
|
</div>
|
||||||
{{/form}}
|
{{/form}}
|
||||||
|
|||||||
@ -1,23 +0,0 @@
|
|||||||
<template name="confirmRemoveTimepointAssociation">
|
|
||||||
<div class="modal" id="confirmRemoveTimepointAssociation" tabindex="-1" role="dialog" data-backdrop="static" data-keyboard="false" aria-labelledby="removeAssociationModalLabel">
|
|
||||||
<div class="modal-dialog" role="document">
|
|
||||||
<div class="modal-content">
|
|
||||||
<div class="modal-header">
|
|
||||||
<h4 class="modal-title" id="removeAssociationModalLabel">Remove Association</h4>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="modal-body">
|
|
||||||
Measurements related to this Study and Timepoint will be erased. Do you really want to delete this association?
|
|
||||||
</div>
|
|
||||||
<div class="modal-footer">
|
|
||||||
<button type="button" class="btn btn-default" data-dismiss="modal" id='btnRemoveAssociationModalCancel'>
|
|
||||||
Cancel
|
|
||||||
</button>
|
|
||||||
<a id="removeTimepointAssociations" type="button" class="btn btn-danger" data-dismiss="modal"
|
|
||||||
title="Remove Timepoint Association"> Remove
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
@ -1,6 +0,0 @@
|
|||||||
Template.confirmRemoveTimepointAssociation.events({
|
|
||||||
'click #removeTimepointAssociations': function() {
|
|
||||||
// Remove association
|
|
||||||
StudyList.functions['removeTimepointAssociations']();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
@ -5,6 +5,3 @@ import './associationModal/associationModal.js';
|
|||||||
import './associationModal/studyAssociationTable/studyAssociationTable.html';
|
import './associationModal/studyAssociationTable/studyAssociationTable.html';
|
||||||
import './associationModal/studyAssociationTable/studyAssociationTable.styl';
|
import './associationModal/studyAssociationTable/studyAssociationTable.styl';
|
||||||
import './associationModal/studyAssociationTable/studyAssociationTable.js';
|
import './associationModal/studyAssociationTable/studyAssociationTable.js';
|
||||||
|
|
||||||
import './confirmRemoveTimepointAssociation/confirmRemoveTimepointAssociation.html';
|
|
||||||
import './confirmRemoveTimepointAssociation/confirmRemoveTimepointAssociation.js';
|
|
||||||
|
|||||||
@ -4,28 +4,23 @@
|
|||||||
<li class="divider" role="separator"></li>
|
<li class="divider" role="separator"></li>
|
||||||
|
|
||||||
{{#let classes=getAssociationClasses}}
|
{{#let classes=getAssociationClasses}}
|
||||||
<li class="{{classes}}">
|
<li class="{{classes}}">
|
||||||
<a id="launchStudyAssociation" class="{{classes}}" title="Launch Study Association">Associate</a>
|
<a id="launchStudyAssociation" class="{{classes}}"
|
||||||
</li>
|
title="Launch Study Association">Associate</a>
|
||||||
|
</li>
|
||||||
{{/let}}
|
{{/let}}
|
||||||
|
|
||||||
{{#let classes=getRemoveAssociationClasses}}
|
{{#let classes=getRemoveAssociationClasses}}
|
||||||
<li class="{{classes}}">
|
<li class="{{classes}}">
|
||||||
<a id="launchRemoveAssociation"
|
<a id="removeTimepointAssociations" type="button" class="{{classes}}"
|
||||||
type="button"
|
title="Remove Timepoint Association">Remove Association</a>
|
||||||
class="{{classes}}"
|
</li>
|
||||||
data-toggle="modal"
|
|
||||||
data-target="#confirmRemoveTimepointAssociation"
|
|
||||||
title="Remove Timepoint Association">
|
|
||||||
Remove Association
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
{{/let}}
|
{{/let}}
|
||||||
|
|
||||||
<li class="divider" role="separator"></li>
|
<li class="divider" role="separator"></li>
|
||||||
<li>
|
<li>
|
||||||
<a id="viewSeriesDetails" type="button"
|
<a id="viewSeriesDetails" type="button"
|
||||||
title="View Series Details">View Series Details</a>
|
title="View Series Details">View Series Details</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="disabled"><a class="disabled">Anonymize</a></li>
|
<li class="disabled"><a class="disabled">Anonymize</a></li>
|
||||||
<li class="disabled"><a class="disabled">Send</a></li>
|
<li class="disabled"><a class="disabled">Send</a></li>
|
||||||
|
|||||||
@ -1,5 +1,4 @@
|
|||||||
import { Template } from 'meteor/templating';
|
import { Template } from 'meteor/templating';
|
||||||
import { Meteor } from 'meteor/meteor';
|
|
||||||
import { Random } from 'meteor/random';
|
import { Random } from 'meteor/random';
|
||||||
import { OHIF } from 'meteor/ohif:core';
|
import { OHIF } from 'meteor/ohif:core';
|
||||||
|
|
||||||
@ -31,6 +30,7 @@ function getAssociationAssessment() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return assessment;
|
return assessment;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -73,22 +73,30 @@ StudyList.functions.viewStudies = viewStudies;
|
|||||||
* Removes all present study / timepoint associations from the Clinical Trial
|
* Removes all present study / timepoint associations from the Clinical Trial
|
||||||
*/
|
*/
|
||||||
function removeTimepointAssociations() {
|
function removeTimepointAssociations() {
|
||||||
// Get a Cursor pointing to the selected Studies from the StudyList
|
const dialogSettings = {
|
||||||
const selectedStudies = OHIF.studylist.getSelectedStudies();
|
title: 'Remove Association',
|
||||||
|
message: 'Measurements related to this Study and Timepoint will be erased. Do you really want to delete this association?',
|
||||||
|
confirmClass: 'btn-danger'
|
||||||
|
};
|
||||||
|
|
||||||
// Find the Timepoint that was previously referenced
|
OHIF.ui.showFormDialog('dialogConfirm', dialogSettings).then(() => {
|
||||||
const timepointApi = StudyList.timepointApi;
|
// Get a Cursor pointing to the selected Studies from the StudyList
|
||||||
if (!timepointApi) {
|
const selectedStudies = OHIF.studylist.getSelectedStudies();
|
||||||
OHIF.log.error('Remove Study/Timepoint Association: No Timepoint API found.')
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Loop through the Cursor of Selected Studies
|
// Find the Timepoint that was previously referenced
|
||||||
selectedStudies.forEach(study => {
|
const timepointApi = StudyList.timepointApi;
|
||||||
const studyInstanceUid = study.studyInstanceUid;
|
if (!timepointApi) {
|
||||||
const timepoints = timepointApi.study(studyInstanceUid);
|
OHIF.log.error('Remove Study/Timepoint Association: No Timepoint API found.');
|
||||||
const timepointIds = timepoints.map(t => t.timepointId);
|
return;
|
||||||
timepointApi.disassociateStudy(timepointIds, studyInstanceUid);
|
}
|
||||||
|
|
||||||
|
// Loop through the Cursor of Selected Studies
|
||||||
|
selectedStudies.forEach(study => {
|
||||||
|
const studyInstanceUid = study.studyInstanceUid;
|
||||||
|
const timepoints = timepointApi.study(studyInstanceUid);
|
||||||
|
const timepointIds = timepoints.map(t => t.timepointId);
|
||||||
|
timepointApi.disassociateStudy(timepointIds, studyInstanceUid);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user