2012-10-10 00:16:52 +02:00
|
|
|
:javascript
|
|
|
|
$(function() {
|
2012-11-21 20:23:19 +01:00
|
|
|
GitLab.GfmAutoComplete.Members.url = "#{ "/api/v2/projects/#{@project.code}/members" if @project }";
|
|
|
|
GitLab.GfmAutoComplete.Members.params.private_token = "#{current_user.private_token}";
|
2012-10-10 00:16:52 +02:00
|
|
|
|
2012-11-21 20:23:19 +01:00
|
|
|
GitLab.GfmAutoComplete.Emoji.data = #{raw emoji_autocomplete_source};
|
2012-10-10 00:16:52 +02:00
|
|
|
// 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) {
|
2012-10-10 00:16:52 +02:00
|
|
|
return {
|
|
|
|
name: value,
|
|
|
|
insert: value+':',
|
|
|
|
image: '#{image_path("emoji")}/'+value+'.png'
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
2012-11-21 20:23:19 +01:00
|
|
|
GitLab.GfmAutoComplete.setup();
|
2012-10-10 00:16:52 +02:00
|
|
|
});
|