gitlab-org--gitlab-foss/app/views/layouts/_init_auto_complete.html.haml
2012-11-21 20:05:37 +01:00

17 lines
631 B
Text

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