{:uriI"file:///home/dantemss/Desktop/commontator/app/assets/javascripts/commontator/mentions.js?type=application/javascript&pipeline=self&id=a53a7da61b7ff5c99f035b51be19aace2ecedbaaa9bb6b3db09df1c95910a80d:ET:load_pathI">/home/dantemss/Desktop/commontator/app/assets/javascripts;T: filenameI"V/home/dantemss/Desktop/commontator/app/assets/javascripts/commontator/mentions.js;T: nameI"commontator/mentions;T:logical_pathI"!commontator/mentions.self.js;T:content_typeI"application/javascript;T: sourceI"Pwindow.Commontator = {}; Commontator._ = window._.noConflict(); Commontator.initMentions = function() { $('.comment_form_field textarea:not(.mentions-added)').each(function(_index, textarea){ $textarea = $(textarea); $form = $textarea.parents('form'); threadId = $textarea.parents('.thread').attr('id').match(/[\d]+/)[0]; $textarea.addClass('mentions-added'); currentValue = $textarea.val(); $textarea.mentionsInput({ elastic: false, showAvatars: false, allowRepeat: true, minChars: 3, onDataRequest:function (mode, query, callback) { $.getJSON('commontator/threads/'+threadId+'/mentions.json', {q: query}, function(responseData) { callback.call(this, responseData.mentions); }); } }); $textarea.val(currentValue); $textarea.on('focusout', function(){ $textarea.mentionsInput('getMentions', function(mentions){ $form.find('input[name="mentioned_ids[]"]').remove(); $(mentions).each(function(_index, mention){ $input = $('', { type: 'hidden', name: 'mentioned_ids[]', value: mention.id }); $form.append($input) }); }); }); }); }; ;T: metadata{ :dependencieso:Set: @hash{ I"environment-version;TTI"environment-paths;TTI"Zprocessors:type=application/javascript&file_type=application/javascript&pipeline=self;TTI"dfile-digest:///home/dantemss/Desktop/commontator/app/assets/javascripts/commontator/mentions.js;TT: requiredo;;{: stubbedo;;{: linkso;;{: charsetI" utf-8;F: digest"%^M/f2=};b.)jfm:>Xg$Ǖ: lengthiP:dependencies_digest"%ZⒽPnWT:8}'cgoK'I:idI"Ea53a7da61b7ff5c99f035b51be19aace2ecedbaaa9bb6b3db09df1c95910a80d;F: mtimel+V