Sha256: e56f6753ad88e14310e3bb03c8bfe548f8dd11ebee21d6ca907c585dba38fb1f
Contents?: true
Size: 757 Bytes
Versions: 6
Compression:
Stored size: 757 Bytes
Contents
$( document ).on('ready turbolinks:load', function() { $('textarea.talkie-comment-body-textarea').mentionsInput({ showAvatars: false, allowRepeat: true, minChars: 2, onDataRequest: function (mode, query, callback) { $.getJSON('/talkie/mentions', { q: query }, function(responseData) { callback.call(this, responseData); }); } }); $("form.talkie-comments-form").on("submit", function(event) { event.stopPropagation(); $commentsForm = $(this); $commentsForm.find('textarea.talkie-comment-body-textarea').mentionsInput('getMentions', function(data) { if(data.length > 0) { $commentsForm.find(".comment-mentions").val(JSON.stringify(data)); } }); }) })
Version data entries
6 entries across 6 versions & 1 rubygems