LT-115: Set CR/UN/EX buttons as enabled for follow-up timepoints
This commit is contained in:
1 parent
7cebd3c91c
commit
cd4a9a51da
7 files changed
+49
-24
No files matched your search
@@ -108,6 +108,17 @@ function getDefaultButtonData() {
|
||||
return buttonData;
|
||||
}
|
||||
|
||||
function setButtonsDisability() {
|
||||
var disabledTools = toolManager.getDisabledTool();
|
||||
disabledTools.forEach(function(toolData) {
|
||||
var tools = toolData.tools;
|
||||
var status = toolData.status;
|
||||
tools.forEach(function(element) {
|
||||
$(element).prop("disabled", status);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
Template.toolbar.events({
|
||||
'click .imageViewerTool': function(e) {
|
||||
$(e.currentTarget).tooltip('hide');
|
||||
@@ -146,6 +157,9 @@ Template.toolbar.onRendered(function() {
|
||||
// Enable tooltips for the layout button
|
||||
var extraTooltipButtons = $('[rel="tooltip"]');
|
||||
extraTooltipButtons.tooltip(OHIF.viewer.tooltipConfig);
|
||||
|
||||
// Set disabled/enabled tool buttons
|
||||
setButtonsDisability();
|
||||
});
|
||||
|
||||
Template.toolbar.helpers({
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
var activeTool = "wwwc";
|
||||
var defaultTool = "wwwc";
|
||||
var disabledTools = [];
|
||||
|
||||
var tools = {};
|
||||
|
||||
@@ -218,5 +219,11 @@ toolManager = {
|
||||
},
|
||||
getDefaultTool: function() {
|
||||
return defaultTool;
|
||||
},
|
||||
addDisabledTool: function(toolData) {
|
||||
disabledTools.push(toolData);
|
||||
},
|
||||
getDisabledTool: function() {
|
||||
return disabledTools;
|
||||
}
|
||||
};
|
||||
Reference in new issue
Block a user