Skip to content

Commit

Permalink
Fix populating group addresses from server data
Browse files Browse the repository at this point in the history
  • Loading branch information
slusarz committed Jan 6, 2015
1 parent 1408057 commit 83f7f8e
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions imp/js/compose.js
Expand Up @@ -901,8 +901,11 @@ var ImpCompose = {
var add = [];
$(a).setValue('').fire('AutoComplete:reset');
r.addr[a].each(function(ob) {
add.push(new IMP_Autocompleter_Elt(ob.v, ob.l, ob.s));
});
add.push(this.autocompleteServerSuggestion(
ob,
new IMP_Autocompleter_Elt(ob.v, ob.l, ob.s)
));
}, this);
this.updateAddrField(a, add);
}, this);
}
Expand Down Expand Up @@ -1110,6 +1113,7 @@ var ImpCompose = {
if (e.g) {
elt.group = e.g;
}
return elt;
},

autocompleteOnAdd: function(v)
Expand All @@ -1133,7 +1137,7 @@ var ImpCompose = {
entry = ob.ac.getEntryByElt(ob.entry);
entry.group.each(function(v) {
ob.ac.addNewItems([ new IMP_Autocompleter_Elt(v.v, v.l, v.s) ]);
});
}, this);
ob.ac.removeEntry(entry);

return true;
Expand Down

0 comments on commit 83f7f8e

Please sign in to comment.