Skip to content
Snippets Groups Projects

[WIP] Moves the stage and ref from the table in a ci commit build to a plain one line text

Closed Tiago Botelho requested to merge tiagonbotelho/gitlab-ce:ci-commit into master
2 files
+ 20
13
Compare changes
  • Side-by-side
  • Inline
Files
2
@@ -31,7 +31,7 @@ class @Notes
@@ -31,7 +31,7 @@ class @Notes
$(document).on "ajax:success", ".js-discussion-note-form", @addDiscussionNote
$(document).on "ajax:success", ".js-discussion-note-form", @addDiscussionNote
# change note in UI after update
# change note in UI after update
$(document).on "ajax:success", "form.edit_note", @updateNote
$(document).on "ajax:success", "form.edit-note", @updateNote
# Edit note link
# Edit note link
$(document).on "click", ".js-note-edit", @showEditForm
$(document).on "click", ".js-note-edit", @showEditForm
@@ -75,7 +75,7 @@ class @Notes
@@ -75,7 +75,7 @@ class @Notes
cleanBinding: ->
cleanBinding: ->
$(document).off "ajax:success", ".js-main-target-form"
$(document).off "ajax:success", ".js-main-target-form"
$(document).off "ajax:success", ".js-discussion-note-form"
$(document).off "ajax:success", ".js-discussion-note-form"
$(document).off "ajax:success", "form.edit_note"
$(document).off "ajax:success", "form.edit-note"
$(document).off "click", ".js-note-edit"
$(document).off "click", ".js-note-edit"
$(document).off "click", ".note-edit-cancel"
$(document).off "click", ".note-edit-cancel"
$(document).off "click", ".js-note-delete"
$(document).off "click", ".js-note-delete"
@@ -355,22 +355,26 @@ class @Notes
@@ -355,22 +355,26 @@ class @Notes
note = $(this).closest(".note")
note = $(this).closest(".note")
note.find(".note-body > .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")
form = note.find(".note-edit-form")
form = base_form.clone().insertAfter(base_form)
isNewForm = form.is(':not(.gfm-form)')
form.addClass('current-note-edit-form gfm-form')
if isNewForm
form.find('.div-dropzone').remove()
form.addClass('gfm-form')
 
form.addClass('current-note-edit-form')
 
form.show()
# Show the attachment delete link
# Show the attachment delete link
note.find(".js-note-attachment-delete").show()
note.find(".js-note-attachment-delete").show()
# Setup markdown form
# Setup markdown form
GitLab.GfmAutoComplete.setup()
if isNewForm
new DropzoneInput(form)
GitLab.GfmAutoComplete.setup()
 
new DropzoneInput(form)
form.show()
textarea = form.find("textarea")
textarea = form.find("textarea")
textarea.focus()
textarea.focus()
autosize(textarea)
 
if isNewForm
 
autosize(textarea)
# HACK (rspeicher/DouweM): Work around a Chrome 43 bug(?).
# HACK (rspeicher/DouweM): Work around a Chrome 43 bug(?).
# The textarea has the correct value, Chrome just won't show it unless we
# The textarea has the correct value, Chrome just won't show it unless we
@@ -379,7 +383,8 @@ class @Notes
@@ -379,7 +383,8 @@ class @Notes
textarea.val ""
textarea.val ""
textarea.val value
textarea.val value
disableButtonIfEmptyField textarea, form.find(".js-comment-button")
if isNewForm
 
disableButtonIfEmptyField textarea, form.find(".js-comment-button")
###
###
Called in response to clicking the edit note link
Called in response to clicking the edit note link
@@ -391,7 +396,9 @@ class @Notes
@@ -391,7 +396,9 @@ class @Notes
note = $(this).closest(".note")
note = $(this).closest(".note")
note.find(".note-body > .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")
 
.removeClass("current-note-edit-form")
 
.hide()
###
###
Called in response to deleting a note of any kind.
Called in response to deleting a note of any kind.
Loading