(js) Improve event editor (attendees list)

Respect SOGoSearchMinimumWordLength and hide detailed view after
deleting the last attendee.
This commit is contained in:
Francis Lachapelle
2016-02-29 13:59:31 -05:00
parent da2067dd86
commit 1d25944c43
2 changed files with 11 additions and 3 deletions
@@ -159,6 +159,7 @@
//vm.searchText = null;
vm.cardFilter = cardFilter;
vm.addAttendee = addAttendee;
vm.removeAttendee = removeAttendee;
vm.addAttachUrl = addAttachUrl;
vm.cancel = cancel;
vm.save = save;
@@ -218,6 +219,12 @@
}
}
function removeAttendee(attendee) {
vm.component.deleteAttendee(attendee);
if (vm.component.attendees.length === 0)
vm.showAttendeesEditor = false;
}
function save(form, options) {
if (form.$valid) {
vm.component.$save(options)