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);