summaryrefslogtreecommitdiff
path: root/app/views/notes
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/notes')
-rw-r--r--app/views/notes/_reversed_notes_with_form.html.haml12
-rw-r--r--app/views/notes/create.js.haml7
-rw-r--r--app/views/notes/index.js.haml13
3 files changed, 3 insertions, 29 deletions
diff --git a/app/views/notes/_reversed_notes_with_form.html.haml b/app/views/notes/_reversed_notes_with_form.html.haml
deleted file mode 100644
index bb583b8c3b8..00000000000
--- a/app/views/notes/_reversed_notes_with_form.html.haml
+++ /dev/null
@@ -1,12 +0,0 @@
-.js-main-target-form
-- if can? current_user, :write_note, @project
- = render "notes/form"
-
-%ul#new-notes-list.reversed.notes
-%ul#notes-list.reversed.notes
-.notes-busy.js-notes-busy
-
-:javascript
- $(function(){
- NoteList.init("#{@target_id}", "#{@target_type}", "#{project_notes_path(@project)}");
- });
diff --git a/app/views/notes/create.js.haml b/app/views/notes/create.js.haml
index c573d406b73..43e79c69f11 100644
--- a/app/views/notes/create.js.haml
+++ b/app/views/notes/create.js.haml
@@ -2,10 +2,7 @@
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);
+ NoteList.appendNewNote(#{@note.id}, noteHtml);
- else
:plain
var firstDiscussionNoteHtml = "#{escape_javascript(render "notes/diff_notes_with_reply", notes: [@note])}";
@@ -18,4 +15,4 @@
- if note_for_main_target?(@note)
NoteList.errorsOnForm(errorsHtml);
- else
- NoteList.errorsOnForm(errorsHtml, "#{@note.discussion_id}"); \ No newline at end of file
+ NoteList.errorsOnForm(errorsHtml, "#{@note.discussion_id}");
diff --git a/app/views/notes/index.js.haml b/app/views/notes/index.js.haml
index f0826100fbf..826862b1a86 100644
--- a/app/views/notes/index.js.haml
+++ b/app/views/notes/index.js.haml
@@ -1,15 +1,4 @@
- unless @notes.blank?
var notesHtml = "#{escape_javascript(render 'notes/notes')}";
- new_note_ids = @notes.map(&:id)
- - if loading_more_notes?
- NoteList.appendMoreNotes(#{new_note_ids}, notesHtml);
-
- - elsif loading_new_notes?
- NoteList.replaceNewNotes(#{new_note_ids}, notesHtml);
-
- - else
- NoteList.setContent(#{new_note_ids}, notesHtml);
-
-- else
- - if loading_more_notes?
- NoteList.finishedLoadingMore();
+ NoteList.setContent(#{new_note_ids}, notesHtml);