LT-318 Disable Case Progress, Trial, HUD and Measurements panels if the study is not associated

This commit is contained in:
Evren Ozkan authored and Erik Ziegler committed 2016-11-15 08:25:09 +01:00
1 parent 24d3c1bd8a
commit 4dd9ee3f37
7 files changed
+37 -8

No files matched your search

@@ -27,6 +27,12 @@ Template.roundedButtonGroup.events({
'click [data-value]'(event, instance) {
event.preventDefault();
const $target = $(event.currentTarget);
// Stop here if the tool is disabled
if ($target.hasClass('disabled')) {
return;
}
const nullValue = $target.hasClass('active') && instance.data.toggleable;
const value = nullValue ? null : $target.attr('data-value');
instance.setValue(value);
@@ -12,6 +12,10 @@ $height = 25px
text-decoration: none
text-align: center
&.disabled
opacity: 0.5
cursor: not-allowed
.roundedButton
align-items: center
theme('background-color', '$uiGrayDark')
@@ -48,7 +48,8 @@ OHIF.lesiontracker.toggleLesionTrackerToolsButtons = (isEnabled) => {
if (isEnabled) {
toolStates.disabledToolButtons = [];
} else {
toolStates.disabledToolButtons = [ 'bidirectional', 'nonTarget', 'crTool', 'unTool', 'exTool', 'toggleHUD', 'toggleTrial', 'toolbarSectionEntry' ];
toolStates.disabledToolButtons = [ 'bidirectional', 'nonTarget', 'crTool', 'unTool', 'exTool',
'toggleHUD', 'toggleTrial', 'toolbarSectionEntry', 'toggleMeasurements' ];
}
// Reload the updated previous or default states
@@ -122,7 +122,14 @@ Template.caseProgress.helpers({
});
Template.caseProgress.events({
'click .js-finish-case'() {
'click .js-finish-case'(event) {
const $this = $(event.currentTarget);
// Stop here if the tool is disabled
if ($this.hasClass('disabled')) {
return;
}
const instance = Template.instance();
switchToTab('studylistTab');
instance.data.measurementApi.storeMeasurements();
@@ -30,3 +30,7 @@
margin-top: 6px
text-align: center
width: 126px
&.disabled
opacity: 0.5
cursor: not-allowed