Sha256: 0890eba1a655991a39c317347b9939d251523a0391659ffadc75c3baef8bfcf5

Contents?: true

Size: 608 Bytes

Versions: 8

Compression:

Stored size: 608 Bytes

Contents

$(document).delegate ".comment_edit_form_link", 'click', (e)->
  e.preventDefault()
  link = $(e.currentTarget)
  target = $(link.attr('href'))
  $('.comment_edit_form').addClass('hidden').closest('.comment_block').find(".content_block").removeClass('hidden')
  target.removeClass('hidden').closest('.comment_block').find(".content_block").addClass('hidden')

$(document).delegate ".comment_delete_form_link", 'click', (e)->
  e.preventDefault()
  link = $(e.currentTarget)
  target = $(link.attr('href'))
  target.find('form').prepend("<input type='hidden' name='_method' value='delete'></input>").submit()

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
rails_admin_comments-0.2.3.3 app/assets/javascripts/rails_admin/rails_admin_comments.coffee
rails_admin_comments-0.3.0.4 app/assets/javascripts/rails_admin/rails_admin_comments.coffee
rails_admin_comments-0.2.3.2 app/assets/javascripts/rails_admin/rails_admin_comments.coffee
rails_admin_comments-0.3.0.3 app/assets/javascripts/rails_admin/rails_admin_comments.coffee
rails_admin_comments-0.3.0.1 app/assets/javascripts/rails_admin/rails_admin_comments.coffee
rails_admin_comments-0.3.0 app/assets/javascripts/rails_admin/rails_admin_comments.coffee
rails_admin_comments-0.2.1 app/assets/javascripts/rails_admin/rails_admin_comments.coffee
rails_admin_comments-0.2.0 app/assets/javascripts/rails_admin/rails_admin_comments.coffee