PWV-30: Adding preset name to shortcuts preferences
This commit is contained in:
parent
66c27b408f
commit
0be312b787
@ -9,7 +9,7 @@
|
||||
<tbody>
|
||||
{{#each input in this.inputs}}
|
||||
<tr>
|
||||
<td class="text-right p-r-1">{{input.label}}</td>
|
||||
<td class="text-right p-r-1">{{getLabel input}}</td>
|
||||
<td width="200">{{>inputText (extend class='hotkey text-center' key=input.key value=input.value)}}</td>
|
||||
</tr>
|
||||
{{/each}}
|
||||
|
||||
17
Packages/ohif-hotkeys/client/components/formTable.js
Normal file
17
Packages/ohif-hotkeys/client/components/formTable.js
Normal file
@ -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;
|
||||
}
|
||||
});
|
||||
@ -1,4 +1,7 @@
|
||||
import './confirmReplacementPopover.html';
|
||||
|
||||
import './form.html';
|
||||
import './form.js';
|
||||
|
||||
import './formTable.html';
|
||||
import './formTable.js';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user