LT-275: Creating final measure flow using selectTree component
This commit is contained in:
parent
fe8d256037
commit
795d1bfeba
@ -58,6 +58,7 @@ $gray6 = #303030
|
|||||||
.select-tree-root
|
.select-tree-root
|
||||||
display: inline-block
|
display: inline-block
|
||||||
position: relative
|
position: relative
|
||||||
|
z-index: 0
|
||||||
|
|
||||||
&>.tree-content
|
&>.tree-content
|
||||||
border: 1px solid $gray3
|
border: 1px solid $gray3
|
||||||
@ -183,6 +184,9 @@ $gray6 = #303030
|
|||||||
line-height: 20px
|
line-height: 20px
|
||||||
margin: 0
|
margin: 0
|
||||||
|
|
||||||
|
label
|
||||||
|
display: block
|
||||||
|
|
||||||
.select-tree-root
|
.select-tree-root
|
||||||
|
|
||||||
&>.tree-content
|
&>.tree-content
|
||||||
|
|||||||
@ -0,0 +1,12 @@
|
|||||||
|
<template name="measureFlow">
|
||||||
|
<div class="measure-flow">
|
||||||
|
<button>Add label</button>
|
||||||
|
{{>selectTree
|
||||||
|
key='label'
|
||||||
|
items=instance.items
|
||||||
|
label='Assign label'
|
||||||
|
searchPlaceholder='Search labels'
|
||||||
|
storageKey='measureLabelCommon'
|
||||||
|
}}
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
@ -0,0 +1,50 @@
|
|||||||
|
Template.measureFlow.onCreated(() => {
|
||||||
|
const instance = Template.instance();
|
||||||
|
|
||||||
|
const items = [
|
||||||
|
'Adrenal',
|
||||||
|
'Bladder',
|
||||||
|
'Bone',
|
||||||
|
'Brain',
|
||||||
|
'Breast',
|
||||||
|
'Colon',
|
||||||
|
'Esophagus',
|
||||||
|
'Extremities',
|
||||||
|
'Gallbladder',
|
||||||
|
'Kidney',
|
||||||
|
'Liver',
|
||||||
|
'Lung',
|
||||||
|
'Lymph Node',
|
||||||
|
'Muscle',
|
||||||
|
'Neck',
|
||||||
|
'Other: Soft Tissue',
|
||||||
|
'Ovary',
|
||||||
|
'Pancreas',
|
||||||
|
'Pelvis',
|
||||||
|
'Peritoneum/Omentum',
|
||||||
|
'Prostate',
|
||||||
|
'Retroperitoneum',
|
||||||
|
'Small Bowel',
|
||||||
|
'Spleen',
|
||||||
|
'Stomach',
|
||||||
|
'Subcutaneous'
|
||||||
|
];
|
||||||
|
|
||||||
|
instance.items = [];
|
||||||
|
_.each(items, item => {
|
||||||
|
instance.items.push({
|
||||||
|
label: item,
|
||||||
|
value: item
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
Template.measureFlow.events({
|
||||||
|
'click .tree-leaf input'(event, instance) {
|
||||||
|
console.warn('>>>>event', event);
|
||||||
|
const $label = $(event.currentTarget).closest('label');
|
||||||
|
const $container = $label.closest('.select-tree-root').find('.tree-options:first');
|
||||||
|
const top = $label.position().top;
|
||||||
|
$container.scrollTop(top);
|
||||||
|
}
|
||||||
|
});
|
||||||
@ -0,0 +1,12 @@
|
|||||||
|
.measure-flow
|
||||||
|
|
||||||
|
.select-tree-root>.tree-content>.tree-options
|
||||||
|
margin-right: -20px
|
||||||
|
max-height: 250px
|
||||||
|
overflow-x: hidden
|
||||||
|
overflow-y: scroll
|
||||||
|
position: relative
|
||||||
|
z-index: 2
|
||||||
|
|
||||||
|
.tree-inputs
|
||||||
|
position: relative
|
||||||
@ -175,6 +175,10 @@ Package.onUse(function(api) {
|
|||||||
api.addFiles('client/components/lesionTrackerWorklistStudy/lesionTrackerWorklistStudy.styl', 'client');
|
api.addFiles('client/components/lesionTrackerWorklistStudy/lesionTrackerWorklistStudy.styl', 'client');
|
||||||
api.addFiles('client/components/lesionTrackerWorklistStudy/lesionTrackerWorklistStudy.js', 'client');
|
api.addFiles('client/components/lesionTrackerWorklistStudy/lesionTrackerWorklistStudy.js', 'client');
|
||||||
|
|
||||||
|
api.addFiles('client/components/measureFlow/measureFlow.html', 'client');
|
||||||
|
api.addFiles('client/components/measureFlow/measureFlow.styl', 'client');
|
||||||
|
api.addFiles('client/components/measureFlow/measureFlow.js', 'client');
|
||||||
|
|
||||||
api.addFiles('client/components/timeoutCountdownDialog/timeoutCountdownDialog.html', 'client');
|
api.addFiles('client/components/timeoutCountdownDialog/timeoutCountdownDialog.html', 'client');
|
||||||
api.addFiles('client/components/timeoutCountdownDialog/timeoutCountdownDialog.styl', 'client');
|
api.addFiles('client/components/timeoutCountdownDialog/timeoutCountdownDialog.styl', 'client');
|
||||||
api.addFiles('client/components/timeoutCountdownDialog/timeoutCountdownDialog.js', 'client');
|
api.addFiles('client/components/timeoutCountdownDialog/timeoutCountdownDialog.js', 'client');
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
<template name="componentPlayground">
|
<template name="componentPlayground">
|
||||||
|
<!--
|
||||||
<div class="p-a-3">
|
<div class="p-a-3">
|
||||||
{{>selectTree
|
{{>selectTree
|
||||||
key='label'
|
key='label'
|
||||||
@ -8,4 +9,6 @@
|
|||||||
storageKey='measureLabelCommon'
|
storageKey='measureLabelCommon'
|
||||||
}}
|
}}
|
||||||
</div>
|
</div>
|
||||||
|
-->
|
||||||
|
{{>measureFlow}}
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user