PWV-30: Adding preset name to shortcuts preferences
This commit is contained in:
1 parent
66c27b408f
commit
0be312b787
3 files changed
+21
-1
No files matched your search
@@ -9,7 +9,7 @@
|
|||||||
<tbody>
|
<tbody>
|
||||||
{{#each input in this.inputs}}
|
{{#each input in this.inputs}}
|
||||||
<tr>
|
<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>
|
<td width="200">{{>inputText (extend class='hotkey text-center' key=input.key value=input.value)}}</td>
|
||||||
</tr>
|
</tr>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
|
|||||||
@@ -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 './confirmReplacementPopover.html';
|
||||||
|
|
||||||
import './form.html';
|
import './form.html';
|
||||||
import './form.js';
|
import './form.js';
|
||||||
|
|
||||||
import './formTable.html';
|
import './formTable.html';
|
||||||
|
import './formTable.js';
|
||||||
Reference in new issue
Block a user