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

18 lines
593 B
Plaintext
Raw Normal View History

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