@@ -4,10 +4,15 @@ App.Comments =
|
||||
$(response_html).insertAfter($("#js-comment-form-#{parent_id}"))
|
||||
|
||||
reset_and_hide_form: (id) ->
|
||||
form = $("#js-comment-form-#{id}")
|
||||
form.val('')
|
||||
form = $("#js-comment-form-#{id} form")
|
||||
input = form.find("textarea")
|
||||
input.val('')
|
||||
form.hide()
|
||||
|
||||
reset_form: (id) ->
|
||||
input = $("#js-comment-form-#{id} form textarea")
|
||||
input.val('')
|
||||
|
||||
toggle_form: (id) ->
|
||||
$("#js-comment-form-#{id}").toggle()
|
||||
|
||||
@@ -16,5 +21,3 @@ App.Comments =
|
||||
id = $(this).data().id
|
||||
App.Comments.toggle_form(id)
|
||||
false
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user