diff options
author | Zach Copley <zach@controlyourself.ca> | 2009-08-08 18:11:47 +0000 |
---|---|---|
committer | Zach Copley <zach@controlyourself.ca> | 2009-08-08 18:11:47 +0000 |
commit | e3bb64cd6ceb9519aaed435fcb7dccb7e16e674d (patch) | |
tree | 97f5b0a35565a4300f352dc308ee0089926c0f4e /plugins/Autocomplete/Autocomplete.js | |
parent | c03d5932877c15eb673febabda5227df2173fbad (diff) | |
parent | 932d1fb7ce06081c788ea088171fd69ef03cd394 (diff) |
Merge branch '0.8.x' into twitter-oauth
Diffstat (limited to 'plugins/Autocomplete/Autocomplete.js')
-rw-r--r-- | plugins/Autocomplete/Autocomplete.js | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/plugins/Autocomplete/Autocomplete.js b/plugins/Autocomplete/Autocomplete.js new file mode 100644 index 000000000..759ed60ae --- /dev/null +++ b/plugins/Autocomplete/Autocomplete.js @@ -0,0 +1,19 @@ +$(document).ready(function(){ + $.getJSON($('address .url')[0].href+'/api/statuses/friends.json?user_id=' + current_user['id'] + '&lite=true&callback=?', + function(friends){ + $('#notice_data-text').autocomplete(friends, { + multiple: true, + multipleSeparator: " ", + formatItem: function(row, i, max){ + return '@' + row.screen_name + ' (' + row.name + ')'; + }, + formatMatch: function(row, i, max){ + return '@' + row.screen_name; + }, + formatResult: function(row){ + return '@' + row.screen_name; + } + }); + } + ); +}); |