gitlab-org--gitlab-foss/app/views/notes/create.js.haml
2012-12-03 22:51:57 +01:00

16 lines
No EOL
663 B
Text

- if @note.valid?
var noteHtml = "#{escape_javascript(render "notes/note", note: @note)}";
- if note_for_main_target?(@note)
- if @note.for_wall?
NoteList.appendNewWallNote(#{@note.id}, noteHtml);
- else
NoteList.appendNewNote(#{@note.id}, noteHtml);
- else
var firstDiscussionNoteHtml = "#{escape_javascript(render "notes/diff_notes_with_reply", notes: [@note])}";
NoteList.appendNewDiscussionNote("#{@note.discussion_id}", firstDiscussionNoteHtml, noteHtml);
- else
-# TODO: insert form correctly
$(".js-main-target-note").replaceWith("#{escape_javascript(render 'notes/common_form')}");
GitLab.GfmAutoComplete.setup();