Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2016-03-18 20:23:54 +0300
committerPhil Hughes <me@iamphill.com>2016-03-18 20:23:54 +0300
commit7dde8b2cf050ca6162f75799e2966015a476b38c (patch)
tree0f7e664c2d5ed55e7d7436295909ae8d8688f5d2 /app/assets/javascripts/notes.js.coffee
parent9280fd4acda1da9ed2435bd83d96892d77f37e90 (diff)
Fix spacing below edit note form
Also changed to allow the CSS to decide what should be hidden when editting
Diffstat (limited to 'app/assets/javascripts/notes.js.coffee')
-rw-r--r--app/assets/javascripts/notes.js.coffee8
1 files changed, 2 insertions, 6 deletions
diff --git a/app/assets/javascripts/notes.js.coffee b/app/assets/javascripts/notes.js.coffee
index 82532216589..ff06c57f2b5 100644
--- a/app/assets/javascripts/notes.js.coffee
+++ b/app/assets/javascripts/notes.js.coffee
@@ -361,14 +361,12 @@ class @Notes
showEditForm: (e) ->
e.preventDefault()
note = $(this).closest(".note")
- note.find(".note-body > .note-text").hide()
- note.find(".note-header").hide()
+ note.addClass "is-editting"
form = note.find(".note-edit-form")
isNewForm = form.is(':not(.gfm-form)')
if isNewForm
form.addClass('gfm-form')
form.addClass('current-note-edit-form')
- form.show()
# Show the attachment delete link
note.find(".js-note-attachment-delete").show()
@@ -402,11 +400,9 @@ class @Notes
cancelEdit: (e) ->
e.preventDefault()
note = $(this).closest(".note")
- note.find(".note-body > .note-text").show()
- note.find(".note-header").show()
+ note.removeClass "is-editting"
note.find(".current-note-edit-form")
.removeClass("current-note-edit-form")
- .hide()
###
Called in response to deleting a note of any kind.