From 98c052c4b7e92cc1ff69fb1c1478b1436e519261 Mon Sep 17 00:00:00 2001 From: Bruno Alves de Faria Date: Wed, 19 Apr 2017 10:07:48 -0300 Subject: [PATCH] Fixing select2 placeholders and reactivity issues --- .../ohif-core/client/components/base/mixins/select2.js | 2 +- .../client/components/bootstrap/input/select.html | 8 +++----- Packages/ohif-study-list/both/schema/servers.js | 6 +++--- 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/Packages/ohif-core/client/components/base/mixins/select2.js b/Packages/ohif-core/client/components/base/mixins/select2.js index 5be88aa77..3f316d9ba 100644 --- a/Packages/ohif-core/client/components/base/mixins/select2.js +++ b/Packages/ohif-core/client/components/base/mixins/select2.js @@ -98,7 +98,7 @@ OHIF.mixins.select2 = new OHIF.Mixin({ const currentValue = component.value(); Tracker.afterFlush(() => { rebuildSelect2(); - component.value(currentValue); + component.$element.val(currentValue); }); } else { rebuildSelect2(); diff --git a/Packages/ohif-core/client/components/bootstrap/input/select.html b/Packages/ohif-core/client/components/bootstrap/input/select.html index f1b4b3d4a..fae5bd98b 100644 --- a/Packages/ohif-core/client/components/bootstrap/input/select.html +++ b/Packages/ohif-core/client/components/bootstrap/input/select.html @@ -7,11 +7,9 @@ this.wrappers ) options=(clone this.options - multiple=(valueIf this.multiple true false) - placeholder=this.placeholder - minimumResultsForSearch=(valueIf this.hideSearch - -1 this.minimumResultsForSearch - ) + multiple=(choose this.options.multiple this.multiple false) + placeholder=(choose this.options.placeholder this.placeholder) + minimumResultsForSearch=(valueIf this.hideSearch -1 this.options.minimumResultsForSearch) ) )}} {{>UI.contentBlock}} diff --git a/Packages/ohif-study-list/both/schema/servers.js b/Packages/ohif-study-list/both/schema/servers.js index 312c31bdd..b8f89d8a6 100644 --- a/Packages/ohif-study-list/both/schema/servers.js +++ b/Packages/ohif-study-list/both/schema/servers.js @@ -55,8 +55,8 @@ export const DICOMWebServer = new SimpleSchema({ imageRendering: { type: String, label: 'Image rendering', - allowedValues: ['', 'wadouri', 'orthanc'], - valuesLabels: ['', 'WADO URI', 'ORTHANC'] + allowedValues: ['wadouri', 'orthanc'], + valuesLabels: ['WADO URI', 'ORTHANC'] }, qidoRoot: { type: String, @@ -163,7 +163,7 @@ export const UISettings = new SimpleSchema({ type: Number, label: 'Number of days to be used on Study List date filter', min: 1 - } + } }); export const PrefetchSchema = new SimpleSchema({