2012-10-10 00:16:52 +02:00
|
|
|
:javascript
|
|
|
|
$(function() {
|
2012-10-16 13:01:40 +02:00
|
|
|
autocompleteMembers.url = "#{ "/api/v2/projects/#{@project.code}/members" if @project }";
|
|
|
|
autocompleteMembers.params.private_token = "#{current_user.private_token}";
|
2012-10-10 00:16:52 +02:00
|
|
|
|
2012-10-16 13:01:40 +02:00
|
|
|
autocompleteEmoji.data = #{raw emoji_autocomplete_source};
|
2012-10-10 00:16:52 +02:00
|
|
|
// convert the list so that the items have the right format for completion
|
2012-10-16 13:01:40 +02:00
|
|
|
autocompleteEmoji.data = $.map(autocompleteEmoji.data, function(value) {
|
2012-10-10 00:16:52 +02:00
|
|
|
return {
|
|
|
|
name: value,
|
|
|
|
insert: value+':',
|
|
|
|
image: '#{image_path("emoji")}/'+value+'.png'
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
setupGfmAutoComplete();
|
|
|
|
});
|