mirror of
https://github.com/wahyd4/gitlabhq.git
synced 2026-08-18 17:16:08 +10:00
Fix spacing below edit note form
Also changed to allow the CSS to decide what should be hidden when editting
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
display: none;
|
||||
}
|
||||
|
||||
.new_note, .edit_note {
|
||||
.new_note, .note-edit-form {
|
||||
.note-form-actions {
|
||||
margin-top: $gl-padding;
|
||||
}
|
||||
|
||||
@@ -100,6 +100,18 @@ ul.notes {
|
||||
display: block;
|
||||
position: relative;
|
||||
|
||||
&.is-editting {
|
||||
.note-header,
|
||||
.note-text,
|
||||
.edited-text {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.note-edit-form {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
|
||||
.note-body {
|
||||
overflow: auto;
|
||||
|
||||
|
||||
@@ -5,6 +5,6 @@
|
||||
= render 'projects/zen', f: f, attr: :note, classes: 'note_text js-note-text js-task-list-field'
|
||||
= render 'projects/notes/hints'
|
||||
|
||||
.note-form-actions
|
||||
.note-form-actions.clearfix
|
||||
= f.submit 'Save Comment', class: 'btn btn-nr btn-save btn-grouped js-comment-button'
|
||||
= link_to 'Cancel', '#', class: 'btn btn-nr btn-cancel note-edit-cancel'
|
||||
|
||||
Reference in New Issue
Block a user