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

15 lines
430 B
Text

- 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();