PWV-30: Adding preset name to shortcuts preferences

This commit is contained in:
Bruno Alves de Faria authored and Erik Ziegler committed 2017-06-14 09:19:49 +02:00
1 parent 66c27b408f
commit 0be312b787
3 files changed
+21 -1

No files matched your search

@@ -0,0 +1,17 @@
import { Template } from 'meteor/templating';
import { OHIF } from 'meteor/ohif:core';
Template.hotkeysFormTable.helpers({
getLabel(input) {
let result = input.label;
if (input.key.indexOf('WLPreset') === 0) {
const presetIndex = parseInt(input.key.replace('WLPreset', ''));
const preset = OHIF.viewer.wlPresets[presetIndex];
if (preset.id) {
result += ` (${preset.id})`;
}
}
return result;
}
});