summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-01-14 23:09:30 -0800
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-01-14 23:09:30 -0800
commit23498337b17fe5f94bd87884ee6773187ec993a8 (patch)
treef0b799f6a3840b4193f76c872f54a1893f2e1c1c /app
parent4babc50eb706834b7707f1cf11849df1d5be9b86 (diff)
downloadgitlab-ce-23498337b17fe5f94bd87884ee6773187ec993a8.tar.gz
Clone comment form on edit. Fixes bug with disappearing textarea or cancel of edit
Diffstat (limited to 'app')
-rw-r--r--app/assets/javascripts/notes.js.coffee9
-rw-r--r--app/assets/stylesheets/sections/note_form.scss2
2 files changed, 7 insertions, 4 deletions
diff --git a/app/assets/javascripts/notes.js.coffee b/app/assets/javascripts/notes.js.coffee
index fcaaa81eaad..d1935d1d007 100644
--- a/app/assets/javascripts/notes.js.coffee
+++ b/app/assets/javascripts/notes.js.coffee
@@ -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.
diff --git a/app/assets/stylesheets/sections/note_form.scss b/app/assets/stylesheets/sections/note_form.scss
index 61eb515faee..cf1bd09e8e1 100644
--- a/app/assets/stylesheets/sections/note_form.scss
+++ b/app/assets/stylesheets/sections/note_form.scss
@@ -157,6 +157,6 @@
min-height: 140px;
}
.note-form-actions {
- background: #FFF;
+ background: transparent;
}
}