Fixing Hanging Protocols issue with timepoint type

This commit is contained in:
Bruno Alves de Faria 2017-02-22 10:15:33 -03:00
parent 19c31ffbb8
commit d45321dae3
3 changed files with 10 additions and 8 deletions

View File

@ -62,7 +62,6 @@ Template.toolbarSection.helpers({
disabled: isToolDisabled
});
// TODO: Get real icons for CR / UN / EX
targetSubTools.push({
id: 'targetCR',
title: 'CR Target',

View File

@ -1,9 +1,9 @@
import { Meteor } from 'meteor/meteor';
import { Template } from 'meteor/templating';
// TODO: [LT-refactor] move this to ohif:hanging-protocols package
const getTimepointType = study => {
const timepointApi = Template.instance().timepointApi;
const instance = Template.instance();
const timepointApi = instance.timepointApi || instance.data.timepointApi;
if (!timepointApi) {
return;
}
@ -16,8 +16,10 @@ const getTimepointType = study => {
return timepoint.timepointType;
};
HP = HP || false;
Meteor.startup(() => {
HP = HP || false;
if (HP) {
HP.addCustomAttribute('timepointType', 'Timepoint Type', getTimepointType);
}
if (HP) {
HP.addCustomAttribute('timepointType', 'Timepoint Type', getTimepointType);
}
});

View File

@ -35,6 +35,7 @@ Package.onUse(function(api) {
api.use('ohif:core');
api.use('ohif:log');
api.use('ohif:study-list');
api.use('ohif:hanging-protocols');
// Client and server imports
api.addFiles('both/index.js', ['client', 'server']);