From 4f484e4dd2a40c4b3c71cd3d241785fb3a7b2eaf Mon Sep 17 00:00:00 2001 From: Duda Dornelles Date: Thu, 20 Nov 2014 13:43:12 -0200 Subject: Adding contacts controller and basic contact search --- .../app/js/mail_view/ui/recipients/recipients_input.js | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) (limited to 'web-ui') diff --git a/web-ui/app/js/mail_view/ui/recipients/recipients_input.js b/web-ui/app/js/mail_view/ui/recipients/recipients_input.js index 8f647d01..78114a39 100644 --- a/web-ui/app/js/mail_view/ui/recipients/recipients_input.js +++ b/web-ui/app/js/mail_view/ui/recipients/recipients_input.js @@ -44,17 +44,7 @@ define([ self; var extractContactNames = function (response) { - return _.flatten(response.contacts, function (contact) { - var filterCriteria = contact.name ? - function (e) { - return { value: contact.name + ' <' + e + '>' }; - } : - function (e) { - return { value: e }; - }; - - return _.map(contact.addresses, filterCriteria); - }); + return _.map(response, function(a) { return { value: a } }); }; function createEmailCompleter() { @@ -70,9 +60,7 @@ define([ filter: extractContactNames } }); - if (features.isEnabled('contacts')) { - emailCompleter.initialize(); - } + emailCompleter.initialize(); return emailCompleter; } -- cgit v1.2.3