Commit 6df515a5 authored by Nihad Abbasov's avatar Nihad Abbasov

add auto-completion for +1, -1 emoji

parent c3efcf7a
...@@ -39,6 +39,12 @@ ...@@ -39,6 +39,12 @@
:javascript :javascript
$(function(){ $(function(){
var names = #{@project.users.pluck(:name)}; var names = #{@project.users.pluck(:name)}, emoji = ['+1', '-1'];
$('.note-text').atWho('@', { data: names }); var emoji = $.map(emoji, function(value, i) {return {key:value + ':', name:value}});
$('#note_note').
atWho('@', { data: names }).
atWho(':', {
data: emoji,
tpl: "<li data-value='${key}'>${name} #{escape_javascript image_tag('emoji/${name}.png', :size => '20x20')}</li>"
});
}); });
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment