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

18 lines
652 B
Plaintext
Raw Normal View History

:javascript
$(function() {
2012-12-21 18:55:39 +01:00
GitLab.GfmAutoComplete.Members.url = "#{ "/api/v3/projects/#{@project.id}/members" if @project }";
2012-11-21 20:23:19 +01:00
GitLab.GfmAutoComplete.Members.params.private_token = "#{current_user.private_token}";
2012-11-21 20:23:19 +01:00
GitLab.GfmAutoComplete.Emoji.data = #{raw emoji_autocomplete_source};
// convert the list so that the items have the right format for completion
2012-11-21 20:23:19 +01:00
GitLab.GfmAutoComplete.Emoji.data = $.map(GitLab.GfmAutoComplete.Emoji.data, function(value) {
return {
name: value,
insert: value+':',
image: '#{image_path("emoji")}/'+value+'.png'
}
});
2012-11-21 20:23:19 +01:00
GitLab.GfmAutoComplete.setup();
});