mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-04-02 20:08:51 +00:00
(js) Display the attendees editor automatically
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user