in clns-acuity-admin/acuity-core/src/main/resources/public/js/study-setup/main.js [294:357]
var onLeaveStepCallback = function (e, selTab, fromStep, toStep) {
if (fromStep == scope.STUDY_EDIT_STEP_INX &&
toStep != scope.STUDY_SEARCH_STEP_INX) {
if ($("#" + scope.editStudyStep.blockingId).hasClass("open")) {
$("#" + scope.editStudyStep.blockingId).removeClass("open");
$(".enabled").attr('disabled', 'disabled');
}
var validate = scope.editStudyStep.validateStudy();
if (!validate.status) {
$("#" + scope.editStudyStep.blockingId).addClass("open");
$(".enabled").removeAttr('disabled', 'disabled');
if ($.trim(validate.message).length > 0) {
wizardCommonModule.showWarningDialog(validate.message);
}
return false;
}
return scope.editStudyStep.onNextStep(toStep);
} else if (fromStep == scope.STUDY_EDIT_STEP_INX &&
toStep == scope.STUDY_SEARCH_STEP_INX) {
return scope.editStudyStep.onBackStep(toStep);
}
if (fromStep == scope.STUDY_SEARCH_STEP_INX && editStudyWorkflow == null
&& !scope.addedStudyMode) {
return scope.searchStudyStep.selectStudy();
}
if (toStep == scope.STUDY_SEARCH_STEP_INX && !scope.addedStudyMode) {
scope.searchStudyStep.searchStudies(true, true);
}
if (fromStep == scope.STUDY_GROUPING_STEP_INX) {
return scope.groupingsStudyStep.leaveStep(toStep);
}
if (fromStep == scope.STUDY_ALT_LAB_CODES_INX) {
return scope.altLabCodesStudyStep.leaveStep(toStep);
}
if (fromStep == scope.STUDY_BASELINE_DRUGS_STEP_INX) {
return scope.baselineDrugsStep.leaveStep(toStep);
}
if (fromStep == scope.STUDY_EXCLUSION_VALUES_INX) {
return scope.exclusionValuesStudyStep.leaveStep(toStep);
}
if (fromStep == scope.PROJECT_GROUPINGS_STEP_INX) {
return scope.selectProjectGroupingsStep.leaveStep(toStep);
}
if (fromStep == scope.CBIOPORTAL_GENOMIC_PROFILE_STEP_INX) {
return scope.cbioPortalGenomicProfileStep.leaveStep(toStep);
}
if (fromStep == scope.STUDY_MAPPING_STEP_INX && scope.innerSplit) {
if (!scope.mappingStudyStep.leaveStep(toStep)) {
return false;
}
destroyMappingLeftSplitter();
}
return true;
};