gitlabhq/app/views/layouts/_init_auto_complete.html.haml

18 lines
591 B
Plaintext
Raw Normal View History

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