Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[Bug 722889] Prepopulate To: field of private messages

  • Loading branch information...
commit 8daddbca8a55ef160ab7ee657ee300fecc8b3c39 1 parent 79bf2e7
@tgavankar tgavankar authored
Showing with 7 additions and 0 deletions.
  1. +7 −0 media/js/users.autocomplete.js
View
7 media/js/users.autocomplete.js
@@ -21,12 +21,19 @@ function init() {
return string.replace(regex, "<strong>$1</strong>");
}
+ var prefill = [];
+
+ if($("#id_to").val()) {
+ prefill = [{username: $("#id_to").val(), display_name: null}];
+ }
+
var tokenInputSettings = {
theme: "facebook",
hintText: gettext("Search for a user..."),
queryParam: "term",
propertyToSearch: "username",
tokenValue: "username",
+ prePopulate: prefill,
resultsFormatter: function(item){
var term = $("#token-input-id_to").val();
if (item.display_name) {
Please sign in to comment.
Something went wrong with that request. Please try again.