PWV-3: Creating ohif:log package and partially refactoring ohif:measurements
This commit is contained in:
1 parent
f3f32518c6
commit
60aa1d0982
76 files changed
+410
-479
No files matched your search
+3
-1
@@ -1,6 +1,8 @@
|
||||
import { OHIF } from 'meteor/ohif:core';
|
||||
|
||||
Template.associationModal.events({
|
||||
'click #saveAssociations': function(e) {
|
||||
log.info('Saving associations');
|
||||
OHIF.log.info('Saving associations');
|
||||
const Timepoints = StudyList.timepointApi.timepoints;
|
||||
|
||||
// Close the modal
|
||||
|
||||
+3
-1
@@ -1,3 +1,5 @@
|
||||
import { OHIF } from 'meteor/ohif:core';
|
||||
|
||||
// Use Aldeed's meteor-template-extension package to replace the
|
||||
// default StudyListStudy template.
|
||||
// See https://github.com/aldeed/meteor-template-extension
|
||||
@@ -68,7 +70,7 @@ function removeTimepointAssociations() {
|
||||
// from the Timepoints Collection via a server call
|
||||
Meteor.call('removeTimepoint', timepoint._id, function(error) {
|
||||
if (error) {
|
||||
log.warn(error);
|
||||
OHIF.log.warn(error);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -57,7 +57,7 @@ Template.measurementTable.onRendered(() => {
|
||||
|
||||
// Activate the first lesion
|
||||
if (firstLesion) {
|
||||
activateLesion(firstLesion._id, templateData);
|
||||
OHIF.measurements.activateLesion(firstLesion._id, templateData);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -67,7 +67,7 @@ Template.measurementTable.events({
|
||||
*/
|
||||
/*'click table#tblLesion tbody tr': function(e, template) {
|
||||
var measurementId = $(e.currentTarget).data('measurementid');
|
||||
activateLesion(measurementId, template.data);
|
||||
OHIF.measurements.activateLesion(measurementId, template.data);
|
||||
},*/
|
||||
});
|
||||
|
||||
|
||||
+5
-3
@@ -1,3 +1,5 @@
|
||||
import { OHIF } from 'meteor/ohif:core';
|
||||
|
||||
function doneCallback(measurementData, deleteTool) {
|
||||
// If a Lesion or Non-Target is removed via a dialog
|
||||
// opened by the Lesion Table, we should clear the data for
|
||||
@@ -5,7 +7,7 @@ function doneCallback(measurementData, deleteTool) {
|
||||
if (deleteTool === true) {
|
||||
Meteor.call('removeMeasurement', measurementData.id, function(error, response) {
|
||||
if (error) {
|
||||
log.warn(error);
|
||||
OHIF.log.warn(error);
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -25,7 +27,7 @@ Template.measurementTableRow.events({
|
||||
},
|
||||
|
||||
'dblclick .location': function() {
|
||||
log.info('Double clicked on Lesion Location cell');
|
||||
OHIF.log.info('Double clicked on Lesion Location cell');
|
||||
|
||||
var measurementData = this;
|
||||
|
||||
@@ -50,7 +52,7 @@ Template.measurementTableRow.events({
|
||||
showConfirmDialog(() => {
|
||||
Meteor.call('removeMeasurement', currentMeasurement._id, (error, response) => {
|
||||
if (error) {
|
||||
log.warn(error);
|
||||
OHIF.log.warn(error);
|
||||
}
|
||||
});
|
||||
}, options);
|
||||
|
||||
+2
-2
@@ -43,7 +43,7 @@ function doneCallback(measurementData, deleteTool) {
|
||||
// opened by the Lesion Table, we should clear the data for
|
||||
// the specified Timepoint Cell
|
||||
if (deleteTool === true) {
|
||||
log.info('Confirm clicked!');
|
||||
OHIF.log.info('Confirm clicked!');
|
||||
clearMeasurementTimepointData(measurementData.id, measurementData.timepointId);
|
||||
}
|
||||
}
|
||||
@@ -56,7 +56,7 @@ const keys = {
|
||||
|
||||
Template.measurementTableTimepointCell.events({
|
||||
'dblclick .measurementTableTimepointCell': function() {
|
||||
log.info('Double clicked on a timepoint cell');
|
||||
OHIF.log.info('Double clicked on a timepoint cell');
|
||||
// Search Measurements by lesion and timepoint
|
||||
const currentMeasurement = Template.parentData(1).rowItem;
|
||||
|
||||
|
||||
+7
-7
@@ -1,8 +1,8 @@
|
||||
<template name="measurementTableView">
|
||||
<div class="measurementTableView scrollArea">
|
||||
{{ #let config=measurementConfiguration}}
|
||||
{{ #each measurementType in config.measurementTools}}
|
||||
{{#if measurementType.options.showInMeasurementTable }}
|
||||
{{#let config=measurementConfiguration}}
|
||||
{{#each measurementType in config.measurementTools}}
|
||||
{{#if measurementType.options.showInMeasurementTable}}
|
||||
{{#let collection=(groupByMeasurementNumber measurementType.id)}}
|
||||
{{>measurementTableHeaderRow
|
||||
measurementType=measurementType
|
||||
@@ -16,11 +16,11 @@
|
||||
{{/each}}
|
||||
{{/let}}
|
||||
{{/if}}
|
||||
{{ /each }}
|
||||
{{/each}}
|
||||
|
||||
{{#if config.newMeasurementTool }}
|
||||
{{ #let new=newMeasurements }}
|
||||
{{#if new }}
|
||||
{{#if config.newMeasurementTool}}
|
||||
{{#let new=newMeasurements}}
|
||||
{{#if new}}
|
||||
{{#let collection=new tool=config.newMeasurementTool}}
|
||||
{{>measurementTableHeaderRow
|
||||
measurementType=tool.measurementType
|
||||
|
||||
Reference in new issue
Block a user