| 
									
										
										
										
											2009-08-06 14:39:59 -04:00
										 |  |  | $(document).ready(function(){ | 
					
						
							| 
									
										
										
										
											2009-09-13 21:44:17 -04:00
										 |  |  |             $('#notice_data-text').autocomplete($('address .url')[0].href+'/plugins/Autocomplete/autocomplete.json', { | 
					
						
							| 
									
										
										
										
											2009-08-06 14:39:59 -04:00
										 |  |  |                 multiple: true, | 
					
						
							|  |  |  |                 multipleSeparator: " ", | 
					
						
							| 
									
										
										
										
											2009-08-07 18:00:04 -04:00
										 |  |  |                 minChars: 1, | 
					
						
							| 
									
										
										
										
											2009-08-06 14:39:59 -04:00
										 |  |  |                 formatItem: function(row, i, max){ | 
					
						
							| 
									
										
										
										
											2009-09-13 21:44:17 -04:00
										 |  |  |                     row = eval("(" + row + ")"); | 
					
						
							|  |  |  |                     switch(row.type) | 
					
						
							|  |  |  |                     { | 
					
						
							|  |  |  |                         case 'user': | 
					
						
							|  |  |  |                             return row.nickname + ' (' + row.fullname + ')'; | 
					
						
							|  |  |  |                         case 'group': | 
					
						
							|  |  |  |                             return row.nickname + ' (' + row.fullname + ')'; | 
					
						
							|  |  |  |                     } | 
					
						
							| 
									
										
										
										
											2009-08-06 14:39:59 -04:00
										 |  |  |                 }, | 
					
						
							|  |  |  |                 formatMatch: function(row, i, max){ | 
					
						
							| 
									
										
										
										
											2009-09-13 21:44:17 -04:00
										 |  |  |                     row = eval("(" + row + ")"); | 
					
						
							|  |  |  |                     switch(row.type) | 
					
						
							|  |  |  |                     { | 
					
						
							|  |  |  |                         case 'user': | 
					
						
							|  |  |  |                             return row.nickname; | 
					
						
							|  |  |  |                         case 'group': | 
					
						
							|  |  |  |                             return row.nickname; | 
					
						
							|  |  |  |                     } | 
					
						
							| 
									
										
										
										
											2009-08-06 14:39:59 -04:00
										 |  |  |                 }, | 
					
						
							|  |  |  |                 formatResult: function(row){ | 
					
						
							| 
									
										
										
										
											2009-09-13 21:44:17 -04:00
										 |  |  |                     row = eval("(" + row + ")"); | 
					
						
							|  |  |  |                     switch(row.type) | 
					
						
							|  |  |  |                     { | 
					
						
							|  |  |  |                         case 'user': | 
					
						
							|  |  |  |                             return '@' + row.nickname; | 
					
						
							|  |  |  |                         case 'group': | 
					
						
							|  |  |  |                             return '!' + row.nickname; | 
					
						
							|  |  |  |                     } | 
					
						
							| 
									
										
										
										
											2009-08-06 14:39:59 -04:00
										 |  |  |                 } | 
					
						
							|  |  |  |             }); | 
					
						
							|  |  |  | }); |