diff options
| author | Riyad Preukschas <riyad@informatik.uni-bremen.de> | 2012-12-02 23:14:56 +0100 |
|---|---|---|
| committer | Riyad Preukschas <riyad@informatik.uni-bremen.de> | 2012-12-03 22:51:57 +0100 |
| commit | c20af32ae4adb1ec891e32ea048ae06ef4c7bc5f (patch) | |
| tree | 7d1bdf0b12a850b0bbbd4efe043b474c3b73f898 /app/views/notes/create.js.haml | |
| parent | 6fc10fa2564538bb892090759fdb05604b0e5567 (diff) | |
| download | gitlab-ce-c20af32ae4adb1ec891e32ea048ae06ef4c7bc5f.tar.gz | |
Pull together and rename Notes partials
Diffstat (limited to 'app/views/notes/create.js.haml')
| -rw-r--r-- | app/views/notes/create.js.haml | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/app/views/notes/create.js.haml b/app/views/notes/create.js.haml index 03aec54b018..6ffb0cdee0e 100644 --- a/app/views/notes/create.js.haml +++ b/app/views/notes/create.js.haml @@ -1,4 +1,16 @@ -- if note_for_main_target?(@note) - = render "create_common_note", note: @note +- 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 - = render "create_discussion_note", note: @note + -# TODO: insert form correctly + $(".js-main-target-note").replaceWith("#{escape_javascript(render 'notes/common_form')}"); + GitLab.GfmAutoComplete.setup();
\ No newline at end of file |
