Fixed bug LT-85 (Location Response Selections). Work on LT-9 and LT-12

This commit is contained in:
Erik Ziegler committed 2015-12-20 18:24:51 -05:00
1 parent 28cee350ff
commit 220ff065dc
44 files changed
+1515 -824

No files matched your search

@@ -3,3 +3,40 @@ Template.lesionTableRow.helpers({
return Timepoints.find({}, {sort: {timepointName: 1}});
}
});
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
// the specified Timepoint Cell
if (deleteTool === true) {
Meteor.call("removeMeasurement", measurementData.id, function(error, response) {
console.log('Removed!');
});
}
}
Template.lesionTableRow.events({
'dblclick .location': function() {
log.info('Double clicked on Lesion Location cell');
var measurementData = this;
// TODO = Fix this weird issue? Need to set toolData's ID properly..
measurementData.id = this._id;
changeLesionLocationCallback(measurementData, null, doneCallback);
},
'keypress .location': function(e) {
var keyCode = e.keyCode;
if (keyCode === keys.DELETE ||
(keyCode === keys.D && e.ctrlKey === true)) {
var currentMeasurement = Template.parentData(1);
var currentTimepointID = this.timepointID;
showConfirmDialog(function() {
log.info('Removing Lesion: ' + currentMeasurement._id);
clearMeasurementTimepointData(currentMeasurement._id, currentTimepointID);
});
}
}
});