Merge pull request #1551 from NARKOZ/front-end
add auto-completion for +1, -1 emoji
This commit is contained in:
commit
2cc8d91dad
|
@ -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>"
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue