Clone comment form on edit. Fixes bug with disappearing textarea or cancel of edit
This commit is contained in:
parent
4babc50eb7
commit
23498337b1
2 changed files with 7 additions and 4 deletions
|
@ -280,7 +280,10 @@ class @Notes
|
|||
e.preventDefault()
|
||||
note = $(this).closest(".note")
|
||||
note.find(".note-text").hide()
|
||||
form = note.find(".note-edit-form")
|
||||
note.find(".note-header").hide()
|
||||
base_form = note.find(".note-edit-form")
|
||||
form = base_form.clone().insertAfter(base_form)
|
||||
form.addClass('current-note-edit-form')
|
||||
form.find('.div-dropzone').remove()
|
||||
|
||||
# Show the attachment delete link
|
||||
|
@ -304,8 +307,8 @@ class @Notes
|
|||
e.preventDefault()
|
||||
note = $(this).closest(".note")
|
||||
note.find(".note-text").show()
|
||||
note.find(".js-note-attachment-delete").hide()
|
||||
note.find(".note-edit-form").hide()
|
||||
note.find(".note-header").show()
|
||||
note.find(".current-note-edit-form").remove()
|
||||
|
||||
###
|
||||
Called in response to deleting a note of any kind.
|
||||
|
|
|
@ -157,6 +157,6 @@
|
|||
min-height: 140px;
|
||||
}
|
||||
.note-form-actions {
|
||||
background: #FFF;
|
||||
background: transparent;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue