From f60ffa923e97a3dda75461d20494b3548e06a8fa Mon Sep 17 00:00:00 2001 From: Francis Lachapelle Date: Fri, 10 Mar 2017 14:48:53 -0500 Subject: [PATCH] (js) Display the attendees editor automatically --- UI/WebServerResources/js/Scheduler/ComponentController.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/UI/WebServerResources/js/Scheduler/ComponentController.js b/UI/WebServerResources/js/Scheduler/ComponentController.js index fab1f2268..d9920f4fe 100644 --- a/UI/WebServerResources/js/Scheduler/ComponentController.js +++ b/UI/WebServerResources/js/Scheduler/ComponentController.js @@ -218,7 +218,7 @@ vm.showRecurrenceEditor = vm.component.$hasCustomRepeat; vm.toggleRecurrenceEditor = toggleRecurrenceEditor; vm.recurrenceMonthDaysAreRequired = recurrenceMonthDaysAreRequired; - vm.showAttendeesEditor = false; + vm.showAttendeesEditor = vm.component.attendees && vm.component.attendees.length; vm.toggleAttendeesEditor = toggleAttendeesEditor; //vm.searchText = null; vm.cardFilter = cardFilter; @@ -276,15 +276,18 @@ } function addAttendee(card) { + var automaticallyExapand = (!vm.component.attendees || vm.component.attendees.length === 0); if (angular.isString(card)) { // User pressed "Enter" in search field, adding a non-matching card if (card.isValidEmail()) { vm.component.addAttendee(new Card({ emails: [{ value: card }] })); + vm.showAttendeesEditor |= automaticallyExapand; vm.searchText = ''; } } else { vm.component.addAttendee(card); + vm.showAttendeesEditor |= automaticallyExapand; } }