summaryrefslogtreecommitdiff
path: root/app/views/notes/index.js.haml
blob: f0826100fbfa59ac5d2c37b1d594e30af63965f6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
- 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();