LT-275: Improving add/edit description animations and behaviors

This commit is contained in:
Bruno Alves de Faria 2016-10-19 09:06:40 +01:00 committed by Erik Ziegler
parent 826bf9bf16
commit dd9fa2b789
2 changed files with 11 additions and 43 deletions

View File

@ -31,11 +31,15 @@
@keyframes fadeIn
from
opacity: 0
visibility: hidden
to
opacity: 1
visibility: visible
@keyframes fadeOut
from
opacity: 1
visibility: visible
to
opacity: 0
visibility: hidden

View File

@ -1,7 +1,7 @@
import { OHIF } from 'meteor/ohif:core';
import { Template } from 'meteor/templating';
import { Blaze } from 'meteor/blaze';
import { ReactiveVar } from 'meteor/reactive-var';
import { Tracker } from 'meteor/tracker';
import { _ } from 'meteor/underscore';
import { $ } from 'meteor/jquery';
@ -12,48 +12,6 @@ Template.measureFlow.onCreated(() => {
instance.description = new ReactiveVar('');
instance.descriptionEdit = new ReactiveVar(false);
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'
}];
const items = [
'Abdomen/Chest Wall',
'Adrenal',
@ -195,6 +153,12 @@ Template.measureFlow.events({
}
},
'blur textarea'(event, instance) {
instance.$('.measure-flow .actions').removeClass('fadeOut');
instance.descriptionEdit.set(false);
instance.description.set($(event.currentTarget).val());
},
'click .select-tree-common label'(event, instance) {
// Set the common section clicked flag
instance.commonClicked = true;