LT-67: Migrating the remaining DicomWEB inputs to components

This commit is contained in:
Bruno Alves de Faria committed 2016-08-30 11:03:57 -03:00
1 parent 18516b47f0
commit 9e2ab2d21a
4 files changed
+31 -19

No files matched your search

@@ -1,5 +1,6 @@
import { Template } from 'meteor/templating';
import { ReactiveVar } from 'meteor/reactive-var';
import { Tracker } from 'meteor/tracker';
import { DICOMWebServer as dicomSchema } from 'meteor/worklist/both/schema';
import { DIMSEServer as dimseSchema } from 'meteor/worklist/both/schema';
@@ -12,7 +13,7 @@ Template.serverInformationForm.onCreated(() => {
Template.serverInformationForm.onRendered(() => {
const instance = Template.instance();
instance.data.$form = instance.$('form');
instance.data.$form = instance.$('form:first');
instance.data.form = instance.data.$form.data('component');
// Handle the server type
@@ -21,7 +22,7 @@ Template.serverInformationForm.onRendered(() => {
const typeComponent = instance.$('[data-key=type]').data('component');
// Run this computation every time the user change the server type
typeComponent.changeObserver.depend();
typeComponent.depend();
// Get the current server type value
const type = typeComponent.value();
@@ -43,7 +44,7 @@ Template.serverInformationForm.onRendered(() => {
// Check if it is on edit mode and load the saved data
if (mode === 'edit') {
var data = instance.data.currentItem.get();
const data = instance.data.currentItem.get();
instance.data.form.value(data);
}
});