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">
|
||||
<use xlink:href="/packages/ohif_viewerbase/assets/icons.svg#icon-ohif-logo"></use>
|
||||
</svg>
|
||||
<div class="logoText">
|
||||
Open Health Imaging Foundation
|
||||
</div>
|
||||
<div class="logoText">Open Health Imaging Foundation</div>
|
||||
</a>
|
||||
{{ #if studyListToggleText }}
|
||||
<a class="btn studyListLinkSection pull-left js-toggle-studyList" id="{{dasherize studyListToggleText}}-btn">
|
||||
{{studyListToggleText}}
|
||||
</a>
|
||||
{{ /if }}
|
||||
{{#if studyListToggleText}}
|
||||
<a class="btn studyListLinkSection pull-left js-toggle-studyList" id="{{dasherize studyListToggleText}}-btn">
|
||||
{{studyListToggleText}}
|
||||
</a>
|
||||
{{/if}}
|
||||
<div class="userAccountSection pull-right">
|
||||
{{>userAccountMenu}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ >timeoutCountdownDialog }}
|
||||
{{>timeoutCountdownDialog}}
|
||||
<div id="studylistTabs" class="tab-content">
|
||||
<div class="tab-pane active" id="studylistTab">
|
||||
<div class="studylistContainer">
|
||||
{{> studylistResult }}
|
||||
{{>studylistResult}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="tab-pane" id="viewerTab">
|
||||
</div>
|
||||
</div>
|
||||
{{ >optionsModal }}
|
||||
{{ >serverInformationModal }}
|
||||
{{ >confirmRemoveTimepointAssociation }}
|
||||
{{ >lastLoginModal }}
|
||||
{{ >progressDialog }}
|
||||
{{ >viewSeriesDetailsModal }}
|
||||
{{ >themeSelectorModal }}
|
||||
{{>optionsModal}}
|
||||
{{>serverInformationModal}}
|
||||
{{>lastLoginModal}}
|
||||
{{>progressDialog}}
|
||||
{{>viewSeriesDetailsModal}}
|
||||
{{>themeSelectorModal}}
|
||||
</template>
|
||||
|
||||
@ -14,7 +14,6 @@ var data = {
|
||||
additionalTemplates: [
|
||||
'optionsModal',
|
||||
'serverInformationModal',
|
||||
'confirmRemoveTimepointAssociation',
|
||||
'lastLoginModal',
|
||||
'viewSeriesDetailsModal'
|
||||
]
|
||||
@ -29,7 +28,7 @@ Router.route('/', function() {
|
||||
if (Meteor.user() && Meteor.userId()) {
|
||||
if (verifyEmail && Meteor.user().emails && !Meteor.user().emails[0].verified) {
|
||||
this.render('emailVerification', routerOptions);
|
||||
}
|
||||
}
|
||||
else {
|
||||
const contentId = Session.get('activeContentId');
|
||||
if(!contentId) {
|
||||
@ -38,7 +37,7 @@ Router.route('/', function() {
|
||||
this.render('app', routerOptions);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
else {
|
||||
this.render('entrySignIn', routerOptions);
|
||||
}
|
||||
|
||||
@ -16,12 +16,12 @@
|
||||
{{>UI.contentBlock}}
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
{{#button class='btn btn-default'
|
||||
action='cancel'
|
||||
{{#button action='cancel'
|
||||
class=(concat 'btn ' (choose this.cancelClass 'btn-default'))
|
||||
tagAttributes=(extend this.tagAttributes data-dismiss='modal')
|
||||
}}{{choose this.cancelLabel 'Cancel'}}{{/button}}
|
||||
{{#button class='btn btn-primary'
|
||||
action='confirm'
|
||||
{{#button action='confirm'
|
||||
class=(concat 'btn ' (choose this.confirmClass 'btn-primary'))
|
||||
}}{{choose this.confirmLabel 'Confirm'}}{{/button}}
|
||||
</div>
|
||||
{{/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.styl';
|
||||
import './associationModal/studyAssociationTable/studyAssociationTable.js';
|
||||
|
||||
import './confirmRemoveTimepointAssociation/confirmRemoveTimepointAssociation.html';
|
||||
import './confirmRemoveTimepointAssociation/confirmRemoveTimepointAssociation.js';
|
||||
|
||||
@ -4,28 +4,23 @@
|
||||
<li class="divider" role="separator"></li>
|
||||
|
||||
{{#let classes=getAssociationClasses}}
|
||||
<li class="{{classes}}">
|
||||
<a id="launchStudyAssociation" class="{{classes}}" title="Launch Study Association">Associate</a>
|
||||
</li>
|
||||
<li class="{{classes}}">
|
||||
<a id="launchStudyAssociation" class="{{classes}}"
|
||||
title="Launch Study Association">Associate</a>
|
||||
</li>
|
||||
{{/let}}
|
||||
|
||||
{{#let classes=getRemoveAssociationClasses}}
|
||||
<li class="{{classes}}">
|
||||
<a id="launchRemoveAssociation"
|
||||
type="button"
|
||||
class="{{classes}}"
|
||||
data-toggle="modal"
|
||||
data-target="#confirmRemoveTimepointAssociation"
|
||||
title="Remove Timepoint Association">
|
||||
Remove Association
|
||||
</a>
|
||||
</li>
|
||||
<li class="{{classes}}">
|
||||
<a id="removeTimepointAssociations" type="button" class="{{classes}}"
|
||||
title="Remove Timepoint Association">Remove Association</a>
|
||||
</li>
|
||||
{{/let}}
|
||||
|
||||
<li class="divider" role="separator"></li>
|
||||
<li>
|
||||
<a id="viewSeriesDetails" type="button"
|
||||
title="View Series Details">View Series Details</a>
|
||||
title="View Series Details">View Series Details</a>
|
||||
</li>
|
||||
<li class="disabled"><a class="disabled">Anonymize</a></li>
|
||||
<li class="disabled"><a class="disabled">Send</a></li>
|
||||
|
||||
@ -1,5 +1,4 @@
|
||||
import { Template } from 'meteor/templating';
|
||||
import { Meteor } from 'meteor/meteor';
|
||||
import { Random } from 'meteor/random';
|
||||
import { OHIF } from 'meteor/ohif:core';
|
||||
|
||||
@ -31,6 +30,7 @@ function getAssociationAssessment() {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return assessment;
|
||||
}
|
||||
|
||||
@ -73,22 +73,30 @@ StudyList.functions.viewStudies = viewStudies;
|
||||
* Removes all present study / timepoint associations from the Clinical Trial
|
||||
*/
|
||||
function removeTimepointAssociations() {
|
||||
// Get a Cursor pointing to the selected Studies from the StudyList
|
||||
const selectedStudies = OHIF.studylist.getSelectedStudies();
|
||||
const dialogSettings = {
|
||||
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
|
||||
const timepointApi = StudyList.timepointApi;
|
||||
if (!timepointApi) {
|
||||
OHIF.log.error('Remove Study/Timepoint Association: No Timepoint API found.')
|
||||
return;
|
||||
}
|
||||
OHIF.ui.showFormDialog('dialogConfirm', dialogSettings).then(() => {
|
||||
// Get a Cursor pointing to the selected Studies from the StudyList
|
||||
const selectedStudies = OHIF.studylist.getSelectedStudies();
|
||||
|
||||
// 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);
|
||||
// Find the Timepoint that was previously referenced
|
||||
const timepointApi = StudyList.timepointApi;
|
||||
if (!timepointApi) {
|
||||
OHIF.log.error('Remove Study/Timepoint Association: No Timepoint API found.');
|
||||
return;
|
||||
}
|
||||
|
||||
// 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