Sha256: c0844f7058db824f4c056e7cfc06afd6bd1564869cd6b721a22fd3b6cf69b5b3

Contents?: true

Size: 866 Bytes

Versions: 5

Compression:

Stored size: 866 Bytes

Contents

if @comment.new_record?
  page.select('div#comments div.errors').invoke('update', flash[:error])
  page << "new Effect.Highlight($$('div#comments div.errors')[0]);"
else
  if @comment.user && @comment.user.facebook?
    page << "FB.ui(#{FacebookPublisher.comment_created_hash(truncate_words(@comment.comment), commentable_url(@comment))}, function(){})"
  end    
  
  page.insert_html :after, 'newest_comment', :partial => 'comments/comment', :formats => [:html], :locals => {:comment => @comment, :highlighted => true}  
  page << "tinyMCE.activeEditor.setContent(''); scrollToNewestComment();"
  page.select('#emptycomments').invoke('hide')
end

page.select('#comment_spinner').invoke('hide')

if configatron.recaptcha_pub_key
  page << "if($('dynamic_recaptcha')){Recaptcha.create('#{configatron.recaptcha_pub_key}', $('dynamic_recaptcha') )}"  
end
          

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
community_engine-2.3.2 app/views/comments/create.js.rjs
community_engine-2.3.1 app/views/comments/create.js.rjs
community_engine-2.3.0 app/views/comments/create.js.rjs
community_engine-2.1.0 app/views/comments/create.js.rjs
community_engine-2.0.0 app/views/comments/create.js.rjs