Add typeahead to 'add subscriber' input box

(imported from commit 49e9a75d3153e1ac97e924a1bdc971df46d6bc10)
This commit is contained in:
Zev Benjamin 2013-01-10 13:57:34 -05:00
parent 5ffc646972
commit cd60f18752
1 changed files with 12 additions and 0 deletions

View File

@ -360,6 +360,18 @@ $(function () {
error_elem.removeClass("hide").text("Could not fetch subscriber list"); error_elem.removeClass("hide").text("Could not fetch subscriber list");
} }
}); });
sub_row.find('input[name="principal"]').typeahead({
source: typeahead_helper.private_message_typeahead_list,
items: 4,
highlighter: function (item) {
var query = this.query;
return typeahead_helper.highlight_with_escaping(query, item);
},
updater: function (item) {
return typeahead_helper.private_message_mapped[item].email;
}
});
}); });
}); });