LT-275: Moving the selectTree component to measurements package
This commit is contained in:
parent
dd9fa2b789
commit
b1eb68521a
@ -21,7 +21,6 @@ import './mixins/link.js';
|
||||
import './mixins/schemaData.js';
|
||||
import './mixins/select.js';
|
||||
import './mixins/select2.js';
|
||||
import './mixins/selectTree.js';
|
||||
|
||||
// Templates
|
||||
import './templates/button.html';
|
||||
|
||||
@ -20,7 +20,3 @@ import './input/radio.html';
|
||||
import './input/range.html';
|
||||
import './input/select.html';
|
||||
import './input/text.html';
|
||||
import './input/selectTree.html';
|
||||
import './input/selectTree.js';
|
||||
import './input/selectTreeCommon.html';
|
||||
import './input/selectTreeCommon.js';
|
||||
|
||||
@ -1,16 +1,5 @@
|
||||
<template name="componentPlayground">
|
||||
<div class="component-playground">
|
||||
{{>measureFlow treeColumns=true hideCommon=true}}
|
||||
<!--
|
||||
<div class="p-a-3">
|
||||
{{>selectTree
|
||||
key='label'
|
||||
items=instance.items
|
||||
label='Assign label'
|
||||
searchPlaceholder='Search labels'
|
||||
storageKey='measureLabelCommon'
|
||||
}}
|
||||
</div>
|
||||
-->
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -1,48 +1,3 @@
|
||||
Template.componentPlayground.onCreated(() => {
|
||||
const instance = Template.instance();
|
||||
instance.items = [{
|
||||
label: 'Category 1',
|
||||
value: 'Category 1',
|
||||
items: [{
|
||||
label: 'Subcategory 1.1',
|
||||
value: 'Subcategory 1.1'
|
||||
}, {
|
||||
label: 'Subcategory 1.2',
|
||||
value: 'Subcategory 1.2',
|
||||
items: [{
|
||||
label: 'Subcategory 1.2.1',
|
||||
value: 'Subcategory 1.2.1'
|
||||
}, {
|
||||
label: 'Subcategory 1.2.2',
|
||||
value: 'Subcategory 1.2.2',
|
||||
items: [{
|
||||
label: 'Subcategory 1.2.2.1',
|
||||
value: 'Subcategory 1.2.2.1'
|
||||
}, {
|
||||
label: 'Subcategory 1.2.2.2',
|
||||
value: 'Subcategory 1.2.2.2'
|
||||
}]
|
||||
}]
|
||||
}]
|
||||
}, {
|
||||
label: 'Category 2',
|
||||
value: 'Category 2',
|
||||
items: [{
|
||||
label: 'Subcategory 2.1',
|
||||
value: 'Subcategory 2.1'
|
||||
}, {
|
||||
label: 'Subcategory 2.2',
|
||||
value: 'Subcategory 2.2'
|
||||
}, {
|
||||
label: 'Subcategory 2.3',
|
||||
value: 'Subcategory 2.3'
|
||||
}]
|
||||
}, {
|
||||
label: 'Category 3',
|
||||
value: 'Category 3'
|
||||
}];
|
||||
});
|
||||
|
||||
Template.componentPlayground.onRendered(() => {
|
||||
const instance = Template.instance();
|
||||
instance.$('.measure-flow').draggable();
|
||||
|
||||
@ -16,7 +16,3 @@ import './nonTargetLesionDialog/nonTargetLesionDialog.js';
|
||||
import './nonTargetResponseDialog/nonTargetResponseDialog.html';
|
||||
import './nonTargetResponseDialog/nonTargetResponseDialog.styl';
|
||||
import './nonTargetResponseDialog/nonTargetResponseDialog.js';
|
||||
|
||||
import './measureFlow/measureFlow.html';
|
||||
import './measureFlow/measureFlow.styl';
|
||||
import './measureFlow/measureFlow.js';
|
||||
|
||||
@ -2,3 +2,4 @@ import './association';
|
||||
import './caseProgress';
|
||||
import './longitudinal';
|
||||
import './measurementTable';
|
||||
import './measureFlow';
|
||||
|
||||
@ -0,0 +1,5 @@
|
||||
import './selectTree';
|
||||
|
||||
import './measureFlow.html';
|
||||
import './measureFlow.styl';
|
||||
import './measureFlow.js';
|
||||
@ -122,7 +122,7 @@ Template.measureFlow.events({
|
||||
// Wait for DOM re-rendering, resize and focus the description textarea
|
||||
Tracker.afterFlush(() => {
|
||||
const $textarea = instance.$('textarea');
|
||||
$textarea.trigger('input').focus();
|
||||
$textarea.trigger('input').focus().select();
|
||||
});
|
||||
},
|
||||
|
||||
@ -149,6 +149,7 @@ Template.measureFlow.events({
|
||||
|
||||
// Keep the current description if ENTER was pressed
|
||||
if (event.which === 13) {
|
||||
event.preventDefault();
|
||||
instance.description.set($(event.currentTarget).val());
|
||||
}
|
||||
},
|
||||
@ -0,0 +1,6 @@
|
||||
import './mixin.js';
|
||||
|
||||
import './selectTree.html';
|
||||
import './selectTree.js';
|
||||
import './selectTreeCommon.html';
|
||||
import './selectTreeCommon.js';
|
||||
Loading…
Reference in New Issue
Block a user