| ... | @@ -272,7 +272,7 @@ class @Notes |
... | @@ -272,7 +272,7 @@ class @Notes |
|
|
note_li = $(".note-row-" + note.id)
|
|
note_li = $(".note-row-" + note.id)
|
|
|
note_li.replaceWith(note.html)
|
|
note_li.replaceWith(note.html)
|
|
|
note_li.find('.note-edit-form').hide()
|
|
note_li.find('.note-edit-form').hide()
|
|
|
note_li.find('.note-text').show()
|
|
note_li.find('.note-body > .note-text').show()
|
|
|
|
|
|
|
|
###
|
|
###
|
|
|
Called in response to clicking the edit note link
|
|
Called in response to clicking the edit note link
|
| ... | @@ -284,7 +284,7 @@ class @Notes |
... | @@ -284,7 +284,7 @@ class @Notes |
|
|
showEditForm: (e) ->
|
|
showEditForm: (e) ->
|
|
|
e.preventDefault()
|
|
e.preventDefault()
|
|
|
note = $(this).closest(".note")
|
|
note = $(this).closest(".note")
|
|
|
note.find(".note-text").hide()
|
|
note.find(".note-body > .note-text").hide()
|
|
|
note.find(".note-header").hide()
|
|
note.find(".note-header").hide()
|
|
|
base_form = note.find(".note-edit-form")
|
|
base_form = note.find(".note-edit-form")
|
|
|
form = base_form.clone().insertAfter(base_form)
|
|
form = base_form.clone().insertAfter(base_form)
|
| ... | @@ -311,7 +311,7 @@ class @Notes |
... | @@ -311,7 +311,7 @@ class @Notes |
|
|
cancelEdit: (e) ->
|
|
cancelEdit: (e) ->
|
|
|
e.preventDefault()
|
|
e.preventDefault()
|
|
|
note = $(this).closest(".note")
|
|
note = $(this).closest(".note")
|
|
|
note.find(".note-text").show()
|
|
note.find(".note-body > .note-text").show()
|
|
|
note.find(".note-header").show()
|
|
note.find(".note-header").show()
|
|
|
note.find(".current-note-edit-form").remove()
|
|
note.find(".current-note-edit-form").remove()
|
|
|
|
|
|
| ... | @@ -345,7 +345,7 @@ class @Notes |
... | @@ -345,7 +345,7 @@ class @Notes |
|
|
removeAttachment: ->
|
|
removeAttachment: ->
|
|
|
note = $(this).closest(".note")
|
|
note = $(this).closest(".note")
|
|
|
note.find(".note-attachment").remove()
|
|
note.find(".note-attachment").remove()
|
|
|
note.find(".note-text").show()
|
|
note.find(".note-body > .note-text").show()
|
|
|
note.find(".js-note-attachment-delete").hide()
|
|
note.find(".js-note-attachment-delete").hide()
|
|
|
note.find(".note-edit-form").hide()
|
|
note.find(".note-edit-form").hide()
|
|
|
|
|
|
| ... | |
... | |
| ... | | ... | |