1 $(document).ready(function(){
2 function fullName(row) {
3 if (typeof row.fullname == "string" && row.fullname != '') {
4 return row.nickname + ' (' + row.fullname + ')';
9 $('#notice_data-text').autocomplete($('address .url')[0].href+'main/autocomplete/suggest', {
11 multipleSeparator: " ",
13 formatItem: function(row, i, max){
14 row = eval("(" + row + ")");
15 // the display:inline is because our INSANE stylesheets
16 // override the standard display of all img tags for no
18 var div = $('<div><img style="display:inline; vertical-align: middle"> <span></span></div>')
19 .find('img').attr('src', row.avatar).end()
20 .find('span').text(fullName(row)).end()
23 formatMatch: function(row, i, max){
24 row = eval("(" + row + ")");
27 formatResult: function(row){
28 row = eval("(" + row + ")");
32 return '@' + row.nickname;
34 return '!' + row.nickname;