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

18 lines
654 B
Plaintext
Raw Normal View History

:javascript
$(function() {
2012-11-23 19:31:09 +01:00
GitLab.GfmAutoComplete.Members.url = "#{ "/api/v2/projects/#{@project.path}/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();
});