Bug fixing: Non-Target lesion in lesion table
location dropdown list in nonTargetLesionDialog is disabled if lesionNumber exists
This commit is contained in:
parent
db21685473
commit
3c8c212416
@ -3,6 +3,8 @@ Timepoints = new Meteor.Collection(null);
|
||||
|
||||
// When nonTarget lesion is added to image, insert data to lesion table
|
||||
function nonTargetToolAdded(e, eventData, lesionData) {
|
||||
|
||||
// Set timepointID
|
||||
lesionData.timepointID = $(e.currentTarget).data('timepointID');
|
||||
|
||||
var locationUID = measurementManagerDAL.isLesionNumberAdded(lesionData);
|
||||
@ -18,12 +20,17 @@ function nonTargetToolAdded(e, eventData, lesionData) {
|
||||
return;
|
||||
}
|
||||
});
|
||||
$("#selectNonTargetLesionLocation option").eq(locationIndex).attr("selected", "selected");
|
||||
// $("#selectNonTargetLesionLocation").attr("disabled", "disabled");
|
||||
|
||||
// Select location in locations dropdown list
|
||||
$("#selectNonTargetLesionLocation option").eq(locationIndex).attr("selected", "selected");
|
||||
$("#selectNonTargetLesionLocation").attr("disabled", "disabled");
|
||||
} else{
|
||||
|
||||
// If selectNonTargetLesionLocation is disabled, make it enable
|
||||
$("#selectNonTargetLesionLocation").removeAttr("disabled");
|
||||
}
|
||||
|
||||
// Save lesionData in Session to use after location and response are selected
|
||||
// Save lesionData in Session to use after location and response are selected in nonTargetLesionDialog
|
||||
Session.set("nonTargetLesionData", lesionData);
|
||||
|
||||
var dialogPointsOnPage = eventData.currentPoints.page;
|
||||
|
||||
@ -96,8 +96,6 @@ Template.nonTargetLesionDialog.events({
|
||||
},
|
||||
|
||||
'click button#nonTargetLesionOK': function() {
|
||||
// Set activeModule parameters in index.html
|
||||
$("#nonTargetLesionLocationDialog").modal("hide");
|
||||
|
||||
var lesionData = Session.get("nonTargetLesionData");
|
||||
// Get selected location data
|
||||
@ -108,7 +106,13 @@ Template.nonTargetLesionDialog.events({
|
||||
// Get selected location data
|
||||
var locationObj = lesionLocationsArray[selectedLocationIndex];
|
||||
lesionData.location = $("#selectNonTargetLesionLocation :selected").text();
|
||||
lesionData.measurementText = $("#selectNonTargetLesionLocationResponse").val();
|
||||
|
||||
var response = $("#selectNonTargetLesionLocationResponse").val();
|
||||
if(response === "-1") {
|
||||
return;
|
||||
}
|
||||
$("#nonTargetLesionLocationDialog").modal("hide");
|
||||
lesionData.measurementText = response;
|
||||
|
||||
// Select first option
|
||||
$("#selectNonTargetLesionLocation").val($("#selectNonTargetLesionLocation option:first").val());
|
||||
@ -119,12 +123,10 @@ Template.nonTargetLesionDialog.events({
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
// Adds location data to trialPatientLocations array and returns locationUID
|
||||
var locationUID = measurementManagerDAL.addNewLocation(locationObj);
|
||||
// Linkk locationUID with activeLesionMeasurementData
|
||||
// Link locationUID with activeLesionMeasurementData
|
||||
lesionData.locationUID = locationUID;
|
||||
|
||||
measurementManagerDAL.addLesionData(lesionData);
|
||||
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user